-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f7a0ba
commit 6bec166
Showing
4 changed files
with
85 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/bin/bash -l | ||
#SBATCH -N 1 | ||
#SBATCH -C cpu | ||
#SBATCH -q regular | ||
#SBATCH -A m2755 | ||
#SBATCH -t 02:00:00 | ||
|
||
CONDA_ROOT="/global/homes/t/ttian20/.conda/envs/vpi" | ||
GIT_REPO="ulissigroup/vasp-interactive" | ||
if [ -z "$GIT_REF" ] | ||
then | ||
GIT_REF="main" | ||
fi | ||
# conda activate vpi | ||
export PATH=${CONDA_ROOT}/bin:$PATH | ||
|
||
uid=`uuidgen` | ||
root=$SCRATCH/vpi-runner/$uid | ||
mkdir -p $root && cd $root | ||
jobid=${SLURM_JOB_ID} | ||
echo "Job ID $jobid" | ||
echo "Running tests under $root" | ||
gh repo clone $GIT_REPO | ||
cd vasp-interactive | ||
git checkout $GIT_REF | ||
echo "Check to $GIT_REF" | ||
export MODPATH=`realpath .` | ||
# export TMPDIR=$SCRATCH | ||
|
||
export SHIFTER_IMAGE=ulissigroup/kubeflow_vasp:beef_vdw | ||
|
||
res="true" | ||
for ver in "vasp.5.4.4.pl2" "vasp.6.3.0_pgi_mkl" | ||
do | ||
echo "Testing VaspInteractive on $ver" | ||
for f in tests/test*.py | ||
do | ||
abs_f=`realpath $f` | ||
VASP_COMMAND="mpirun -np 32 --bind-to core --oversubscribe /opt/${ver}/bin/vasp_std" | ||
shifter --image=$SHIFTER_IMAGE --env=VASP_COMMAND="$VASP_COMMAND" --env=PYTHONPATH="$MODPATH" --env=TEMPDIR="$SCRATCH" -- pytest -svv ${abs_f} | ||
# pytest -svv $f | ||
if [[ $? != 0 ]] | ||
then | ||
res="false" | ||
killall vasp_std | ||
break | ||
fi | ||
killall vasp_std | ||
done | ||
module unload vasp | ||
if [[ $res == "false" ]] | ||
then | ||
break | ||
fi | ||
done | ||
|
||
if [[ $res == "true" ]] | ||
then | ||
echo "All test pass!" | ||
else | ||
echo "Test fail. See output" | ||
fi | ||
|
||
|
||
gh workflow run perlmutter_shifter_status.yml -f signal=$res -f jobid=$jobid -f path=$root | ||
|
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