@@ -59,17 +59,17 @@ JOBID=$(sbatch <<-EOT | awk '{print $4}'
5959 . ./mfc.sh load -c p -m $device
6060
6161 # user script contents
62- tmpbuild=/storage/scratch1/6/sbryngelson3/mytmp_build
63- currentdir=$tmpbuild /run-$(( RANDOM % 900 ))
62+ export tmpbuild=/storage/scratch1/6/sbryngelson3/mytmp_build
63+ export currentdir=$tmpbuild /run-$(( RANDOM % 900 ))
6464 mkdir -p $tmpbuild
6565 mkdir -p $currentdir
6666 export TMPDIR=$currentdir
6767
6868 n_test_threads=8
6969
70- build_opts=""
70+ export build_opts=""
7171 if [ "$device " = "gpu" ]; then
72- build_opts="--gpu"
72+ export build_opts="--gpu"
7373 fi
7474 echo "build_opts =" $build_opts
7575
@@ -86,10 +86,10 @@ JOBID=$(sbatch <<-EOT | awk '{print $4}'
8686 ./mfc.sh test --dry-run -j $n_test_threads $build_opts
8787
8888 if [ "$device " = "gpu" ]; then
89- gpu_count=$( nvidia-smi -L | wc -l) # number of GPUs on node
90- gpu_ids=$( seq -s ' ' 0 $(( $gpu_count - 1 )) ) # 0,1,2,...,gpu_count-1
91- device_opts="-g $gpu_ids "
92- n_test_threads=` expr $gpu_count \* 2`
89+ export gpu_count=$( nvidia-smi -L | wc -l) # number of GPUs on node
90+ export gpu_ids=$( seq -s ' ' 0 $(( $gpu_count - 1 )) ) # 0,1,2,...,gpu_count-1
91+ export device_opts="-g $gpu_ids "
92+ export n_test_threads=` expr $gpu_count \* 2`
9393 fi
9494
9595 ./mfc.sh test --max-attempts 3 -a -j $n_test_threads $device_opts -- -c phoenix
0 commit comments