-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from zwicker-group/templates
Improved job script tempaltes
- Loading branch information
Showing
5 changed files
with
73 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
export PYTHONPATH=../py-modelrunner # likely path of package, relative to current base path | ||
|
||
if [ ! -z $1 ] | ||
then | ||
# test pattern was specified | ||
echo 'Run unittests with pattern '$1':' | ||
./run_tests.py --unit --pattern "$1" -- \ | ||
-o log_cli=true --log-cli-level=debug -vv | ||
else | ||
# test pattern was not specified | ||
echo 'Run all unittests:' | ||
./run_tests.py --unit -- \ | ||
-o log_cli=true --log-cli-level=debug -vv | ||
fi |
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,19 @@ | ||
#!/bin/bash -l | ||
|
||
export PYTHONPATH={{ PACKAGE_PATH }}:$PYTHONPATH | ||
|
||
{% if CONFIG.num_threads is number %} | ||
# set the number of threads to use | ||
export MKL_NUM_THREADS={{ CONFIG.num_threads }} | ||
export NUMBA_NUM_THREADS={{ CONFIG.num_threads }} | ||
export NUMEXPR_NUM_THREADS={{ CONFIG.num_threads }} | ||
export OMP_NUM_THREADS={{ CONFIG.num_threads }} | ||
export OPENBLAS_NUM_THREADS={{ CONFIG.num_threads }} | ||
{% endif %} | ||
|
||
{% if OUTPUT_FOLDER is defined and OUTPUT_FOLDER %} | ||
mkdir -p {{ OUTPUT_FOLDER }} | ||
{% endif %} | ||
|
||
# Run the program | ||
{{ CONFIG.python_bin }} -m modelrunner {{ MODEL_FILE }} --a {{ PARAMETERS.a }} |
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