-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] PICMI Usage in HPC Batch Scripts #4911
base: development
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Try to incorporate the same level of details for PICMI as for executable usage in HPC batch scripts.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,9 +24,21 @@ | |
#SBATCH -o WarpX.o%j | ||
#SBATCH -e WarpX.e%j | ||
|
||
# executable & inputs file or python interpreter & PICMI script here | ||
EXE=./warpx | ||
INPUTS=inputs | ||
# PICMI Python script or executable? | ||
USE_PICMI=true | ||
|
||
if [[ "${USE_PICMI}" = true ]] | ||
then | ||
EXE=python3 | ||
INPUTS=PICMI_script.py | ||
# for GPU-aware MPI in PICMI, set | ||
# Simulation(..., warpx_amrex_use_gpu_aware_mpi=True) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Something I've thought about is allowing setting of input parameters from the command line when using Python. Something like |
||
GPU_AWARE_MPI="" | ||
else | ||
EXE=./warpx | ||
INPUTS=inputs.in | ||
GPU_AWARE_MPI="amrex.use_gpu_aware_mpi=1" | ||
fi | ||
|
||
# pin to closest NIC to GPU | ||
export MPICH_OFI_NIC_POLICY=GPU | ||
|
@@ -36,9 +48,6 @@ export MPICH_OFI_NIC_POLICY=GPU | |
export SRUN_CPUS_PER_TASK=16 | ||
export OMP_NUM_THREADS=${SRUN_CPUS_PER_TASK} | ||
|
||
# GPU-aware MPI optimizations | ||
GPU_AWARE_MPI="amrex.use_gpu_aware_mpi=1" | ||
|
||
# CUDA visible devices are ordered inverse to local task IDs | ||
# Reference: nvidia-smi topo -m | ||
srun --cpu-bind=cores bash -c " | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good idea. Maybe set
USE_PICMI=false
here so the default behavior is the same as previously.