-
Notifications
You must be signed in to change notification settings - Fork 3
Add configure target and sample jobscript for Helma CPU cluster. #635
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| *.o | ||
| *.so | ||
| *.mod | ||
| *.smod | ||
| *.out | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| // This file is a fake implementation of the MKL function mkl_serv_get_cpu_true, | ||
| // which is used by MKL to determine if the CPU is an Intel CPU. | ||
| // This is used to trick MKL into thinking that it is running on an Intel CPU, | ||
| // which allows it to use the optimized code paths for Intel CPUs, even when running on an AMD CPU. | ||
| // This has shown to improve performance on AMD CPUs significantly, especially on AMD Zen CPUs. | ||
| // See: https://danieldk.eu/Software/Misc/Intel-MKL-on-AMD-Zen | ||
|
|
||
| int mkl_serv_intel_cpu_true(void) { | ||
| return 1; | ||
| } | ||
|
|
||
| typedef int (*fakeintel_fptr)(void); | ||
|
|
||
| fakeintel_fptr mkl_serv_get_cpu_true(void) { | ||
| return &mkl_serv_intel_cpu_true; | ||
| } | ||
|
jonasschwab marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| #!/bin/bash -l | ||
| # | ||
| # Sample jobscript for Helma CPU of NHR@FAU | ||
| # | ||
| # The following jobscript contains a few 'variables' marked by the ##...## pattern. | ||
| # The user has to provide the appropriate values, e.g. replace ##Nnodes## by 1 if the job is supposed to run on a single node. | ||
| # Most variables are self-explanatory, one exception might be Nthreads, which is referring to the number of OpenMP threads per MPI task. | ||
| # In general we found that ALF does not profit from hyper-threading such that we suggest to only use physical cores. | ||
| # | ||
| # On Helma, a single node has 384 cores. | ||
| # There are two partitions, "cpu" and "preempt_cpu". | ||
| # -"cpu": Single-node and multi-node jobs are possible. | ||
| # Multi-node jobs always get all 384 cores of each node, | ||
| # while single-node jobs can request cores in multiples of 48 (one NUMA domain). | ||
| # -"preempt_cpu": | ||
| # Only single node, but an arbitrary number of cores is allowed. | ||
| # The walltime is up to 48 hours, but jobs might get cancelled after 2 hours | ||
| # to make room for jobs in the "cpu" partition (with a grace time as in the GPU preempt partition). | ||
| # | ||
| # For single node jobs, the number of cores is ##NtaskPnode## * ##Nthreads##. | ||
| # | ||
|
jonasschwab marked this conversation as resolved.
|
||
| #SBATCH --job-name ##NAME## | ||
| #SBATCH --output=out.%j.log | ||
| #SBATCH --error=err.%j.log | ||
| #Notification and type | ||
| #SBATCH --mail-type=ALL | ||
| #SBATCH --mail-user=##EMAIL## | ||
| # Wall clock limit (HH:MM:SS): | ||
| #SBATCH --time=##TIME## | ||
| #SBATCH --no-requeue | ||
| #Setup of execution environment | ||
| #SBATCH --export=NONE | ||
|
|
||
| #available partitions: cpu, preempt_cpu | ||
| #SBATCH --partition=##PARTITION## | ||
|
jonasschwab marked this conversation as resolved.
|
||
| #SBATCH --nodes=##Nnodes## | ||
| #SBATCH --ntasks-per-node=##NtaskPnode## | ||
| #SBATCH --cpus-per-task=##Nthreads## | ||
|
|
||
| unset SLURM_EXPORT_ENV | ||
| module --force switch gpu-env/2025 cpu-env/2026 | ||
| module load intel/2025.3.1 | ||
| module load intelmpi/2021.17.0 | ||
| module load mkl/2024.2.2 | ||
|
|
||
| # the following environment variables generate an optimal pinning (to the best of our knowledge) | ||
| # This DOES NOT have to be adapted to the choice of Ntasks | ||
| # FIRST EXCEPTION: If you chose to use hyper-threading (not recommended) you should set I_MPI_PIN_CELL=cpu | ||
| # SECOND EXCEPTION: The following environment variables are Intel specific. | ||
| #export KMP_AFFINITY=verbose,granularity=fine,compact | ||
| export KMP_AFFINITY=granularity=fine,compact | ||
| export I_MPI_PIN_CELL=core | ||
| export I_MPI_PIN_DOMAIN=auto:cache | ||
| export I_MPI_PIN_ORDER=scatter | ||
|
|
||
| export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK | ||
|
|
||
| # Uncomment the following line to speed up MKL by making it believe it runs on an Intel CPU. | ||
| # After `make`, `libfakeintel.so` is expected under `Libraries/Modules/`; use its absolute path here, e.g.: | ||
| # export LD_PRELOAD=/absolute/path/to/ALF/Libraries/Modules/libfakeintel.so | ||
|
|
||
| bash ./out_to_in.sh | ||
| mpiexec -n $SLURM_NTASKS ##EXECUTABLE## | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.