Skip to content

Commit

Permalink
Clean script
Browse files Browse the repository at this point in the history
Fix validate flag

Fix
  • Loading branch information
guilara committed Aug 5, 2024
1 parent ba2c34a commit 4121fc5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 32 deletions.
8 changes: 4 additions & 4 deletions support/Environments/urania.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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\
Expand Down
8 changes: 4 additions & 4 deletions support/Python/Schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down Expand Up @@ -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
)
Expand Down Expand Up @@ -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
Expand Down
31 changes: 7 additions & 24 deletions support/SubmitScripts/Urania.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down

0 comments on commit 4121fc5

Please sign in to comment.