From 4121fc50ce1db61b813a01617dd39731e3a710eb Mon Sep 17 00:00:00 2001 From: Guillermo Lara Date: Wed, 31 Jul 2024 13:26:48 +0000 Subject: [PATCH] Clean script Fix validate flag Fix --- support/Environments/urania.sh | 8 ++++---- support/Python/Schedule.py | 8 ++++---- support/SubmitScripts/Urania.sh | 31 +++++++------------------------ 3 files changed, 15 insertions(+), 32 deletions(-) diff --git a/support/Environments/urania.sh b/support/Environments/urania.sh index 80a2d9536480b..1544ca40ee210 100644 --- a/support/Environments/urania.sh +++ b/support/Environments/urania.sh @@ -20,9 +20,10 @@ spectre_load_modules() { module load paraview/5.10 # Load Spack environment source /u/guilara/repos/spack/share/spack/setup-env.sh - spack env activate env3_spectre_impi + source /urania/u/guilara/repos/spack/var/spack/environments\ +/env3_spectre_impi/loads # Load python environment - source $SPECTRE_HOME/env/bin/activate + source /u/guilara/envs/spectre_env } spectre_unload_modules() { @@ -57,8 +58,7 @@ spectre_run_cmake() { -D MEMORY_ALLOCATOR=JEMALLOC \ -D BUILD_PYTHON_BINDINGS=ON \ -D MACHINE=Urania \ - -D Python_EXECUTABLE=${SPECTRE_HOME}/env/bin/python \ - -D Catch2_DIR=/u/guilara/repos/Catch2/install_dir/lib64/cmake/Catch2 \ + -D Catch2_DIR=/u/guilara/repos/Catch2/install_dir/lib64/cmake/Catch2 -D MPI_C_COMPILER=/mpcdf/soft/SLE_15/packages/skylake\ /impi/gcc_11-11.2.0/2021.7.1/bin/mpigcc \ -D MPI_CXX_COMPILER=/mpcdf/soft/SLE_15/packages/skylake\ diff --git a/support/Python/Schedule.py b/support/Python/Schedule.py index f8654a8088a17..e5be7775e65f4 100644 --- a/support/Python/Schedule.py +++ b/support/Python/Schedule.py @@ -149,7 +149,7 @@ def schedule( submit: Optional[bool] = None, clean_output: bool = False, force: bool = False, - validate: Optional[bool] = None, + validate: Optional[bool] = True, extra_params: dict = {}, **kwargs, ) -> Optional[subprocess.CompletedProcess]: @@ -551,8 +551,8 @@ def schedule( force=force, ) - if validate or validate is None: - # Validate input file + # Validate input file + if validate: validate_input_file( input_file_path.resolve(), executable=executable, work_dir=run_dir ) @@ -868,7 +868,7 @@ def scheduler_options(f): ) @click.option( "--validate/--no-validate", - default=None, + default=True, help="Validate or skip the validation of the input file.", ) # Scheduling options diff --git a/support/SubmitScripts/Urania.sh b/support/SubmitScripts/Urania.sh index 974ad0056128e..c6ee572518b2b 100644 --- a/support/SubmitScripts/Urania.sh +++ b/support/SubmitScripts/Urania.sh @@ -3,49 +3,32 @@ # Distributed under the MIT License. # See LICENSE.txt for details. -# Supercomputer at the Max Planck Computing Data Facility. -# More information: +# Uranina -- HPC cluster of ACR division of MPI for Grav Physics, housed at the +# Max Planck Computing & Data Facility. # https://docs.mpcdf.mpg.de/doc/computing/clusters/systems/Gravitational_Physics_ACR.html {% block head %} {{ super() -}} -#SBATCH -D ./ #SBATCH --nodes {{ num_nodes | default(1) }} #SBATCH --ntasks-per-node=1 #SBATCH --ntasks-per-core=1 #SBATCH --cpus-per-task=72 -#SBATCH --mem=240000 #SBATCH -t {{ time_limit | default("1-00:00:00") }} -#SBATCH -p {{ queue | default("p.debug") }} +#SBATCH -p {{ queue | default("p.urania") }} {% endblock %} {% block charm_ppn %} -# One thread for communication +# Two thread for communication CHARM_PPN=$(expr ${SLURM_CPUS_PER_TASK} - 2) {% endblock %} {% block list_modules %} # Load compiler and MPI modules with explicit version specifications, # consistently with the versions used to build the executable. -module purge -module load gcc/11 -module load impi/2021.7 -module load boost/1.79 -module load gsl/1.16 -module load cmake/3.26 -module load hdf5-serial/1.12.2 -module load anaconda/3/2021.11 +source ${SPECTRE_HOME}/support/Environments/urania.sh +spectre_load_modules +spectre_setup_charm_paths -# Load Spack environment -source /u/guilara/repos/spack/share/spack/setup-env.sh -spack env activate env3_spectre_impi - -# Define Charm paths -export CHARM_ROOT=/u/guilara/charm_impi_2/mpi-linux-x86_64-smp -export PATH=$PATH:/u/guilara/charm_impi_2/mpi-linux-x86_64-smp/bin - -# Load python environment -source $SPECTRE_HOME/env/bin/activate {% endblock %} {% block run_command %}