forked from MFlowCode/MFC
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Batch files per computer (MFlowCode#240 & MFlowCode#287)
- Loading branch information
1 parent
aa652b9
commit d1787a8
Showing
12 changed files
with
288 additions
and
324 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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,50 @@ | ||
#!/usr/bin/env bash | ||
#> | ||
#> This file is part of the ./mfc.sh run subsystem. Expressions enclosed in | ||
#> curly braces are expanded and evaluated using Python's eval() function and | ||
#> data from ./mfc.sh run. The resulting file is submitted to the queue system. | ||
#> | ||
#BSUB -J {name} | ||
#BSUB -nnodes {nodes} | ||
#BSUB -N | ||
#BSUB -P {account} | ||
#BSUB -W {walltime[:-3]} | ||
|
||
|
||
. ./mfc.sh load -c s -m {'g' if gpu else 'c'} | ||
|
||
|
||
#> | ||
#> The MFC prologue sets up the environment required to run MFC prior to | ||
#> execution and starts the timer. | ||
#> | ||
{MFC::PROLOGUE} | ||
|
||
|
||
#> | ||
#> Iterate over all MFC binaries (as specified through --targets) and execute | ||
#> them, one by one, with profiling enabled if requested. | ||
#> | ||
for binpath in {MFC::BINARIES}; do | ||
|
||
echo -e ":) Running $binpath:" | ||
echo "" | ||
|
||
jsrun \ | ||
{'--smpiargs="-gpu"' if gpu else ''} \ | ||
--nrs {tasks_per_node*nodes} \ | ||
--cpu_per_rs 1 \ | ||
--gpu_per_rs {1 if gpu else 0} \ | ||
--tasks_per_rs 1 \ | ||
{MFC::PROFILER} "$binpath" | ||
|
||
echo "" | ||
|
||
done | ||
|
||
|
||
#> | ||
#> The MFC epilogue stops the timer and prints the execution summary. It also | ||
#> performs some cleanup and housekeeping tasks before exiting. | ||
#> | ||
{MFC::EPILOGUE} |
This file contains 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,54 @@ | ||
#!/usr/bin/env bash | ||
#> | ||
#> This file is part of the ./mfc.sh run subsystem. Expressions enclosed in | ||
#> curly braces are expanded and evaluated using Python's eval() function and | ||
#> data from ./mfc.sh run. The resulting file is submitted to the queue system. | ||
#> | ||
#BSUB -J {name} | ||
#BSUB -nnodes {nodes} | ||
#BSUB -N | ||
#BSUB -P {account} | ||
#BSUB -W {walltime[:-3]} | ||
|
||
|
||
#> | ||
#> Load the same modules as the ones currently loaded in the login shell. These | ||
#> are usually the ones used to compile MFC. | ||
#> | ||
{MFC::MODULES} | ||
|
||
|
||
#> | ||
#> The MFC prologue sets up the environment required to run MFC prior to | ||
#> execution and starts the timer. | ||
#> | ||
{MFC::PROLOGUE} | ||
|
||
|
||
#> | ||
#> Iterate over all MFC binaries (as specified through --targets) and execute | ||
#> them, one by one, with profiling enabled if requested. | ||
#> | ||
for binpath in {MFC::BINARIES}; do | ||
|
||
echo -e ":) Running $binpath:" | ||
echo "" | ||
|
||
jsrun \ | ||
{'--smpiargs="-gpu"' if gpu else ''} \ | ||
--nrs {tasks_per_node*nodes} \ | ||
--cpu_per_rs 1 \ | ||
--gpu_per_rs {1 if gpu else 0} \ | ||
--tasks_per_rs 1 \ | ||
{MFC::PROFILER} "$binpath" | ||
|
||
echo "" | ||
|
||
done | ||
|
||
|
||
#> | ||
#> The MFC epilogue stops the timer and prints the execution summary. It also | ||
#> performs some cleanup and housekeeping tasks before exiting. | ||
#> | ||
{MFC::EPILOGUE} |
This file contains 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,65 @@ | ||
#!/usr/bin/env bash | ||
#> | ||
#> This file is part of the ./mfc.sh run subsystem. Expressions enclosed in | ||
#> curly braces are expanded and evaluated using Python's eval() function and | ||
#> data from ./mfc.sh run. The resulting file is submitted to the queue system. | ||
#> | ||
#PBS -N {name} | ||
#PBS -l nodes={nodes}:ppn={tasks_per_node} | ||
#PBS -A {account} | ||
#PBS -l walltime={walltime} | ||
#PBS -q {partition} | ||
#PBS -M {email} | ||
#> | ||
#> Note: The following options aren't enabled by default. | ||
#> They serve as a guide to users that wish to pass | ||
#> more options to the batch system. | ||
#> | ||
|
||
|
||
#> | ||
#> Load the same modules as the ones currently loaded in the login shell. These | ||
#> are usually the ones used to compile MFC. | ||
#> | ||
{MFC::MODULES} | ||
|
||
|
||
#> | ||
#> The MFC prologue sets up the environment required to run MFC prior to | ||
#> execution and starts the timer. | ||
#> | ||
{MFC::PROLOGUE} | ||
|
||
|
||
#> | ||
#> Iterate over all MFC binaries (as specified through --targets) and execute | ||
#> them, one by one, with profiling enabled if requested. | ||
#> | ||
for binpath in {MFC::BINARIES}; do | ||
|
||
echo -e ":) Running $binpath:" | ||
|
||
if command -v srun > /dev/null 2>&1; then | ||
srun \ | ||
--nodes {nodes} \ | ||
--ntasks-per-node {tasks_per_node} \ | ||
{MFC::PROFILER} "$binpath" | ||
|
||
#> | ||
#> srun --mpi=pmix \ | ||
#> {MFC::PROFILER} "$binpath" | ||
else | ||
mpirun \ | ||
-np {tasks_per_node*nodes} \ | ||
{MFC::PROFILER} "$binpath" | ||
|
||
fi | ||
|
||
done | ||
|
||
|
||
#> | ||
#> The MFC epilogue stops the timer and prints the execution summary. It also | ||
#> performs some cleanup and housekeeping tasks before exiting. | ||
#> | ||
{MFC::EPILOGUE} |
Oops, something went wrong.