File tree Expand file tree Collapse file tree 1 file changed +11
-19
lines changed Expand file tree Collapse file tree 1 file changed +11
-19
lines changed Original file line number Diff line number Diff line change @@ -40,29 +40,21 @@ if [ -f config.sh ]; then
40
40
fi
41
41
42
42
# # set the output directory
43
- outdir=$EPHEMERAL /$exp
43
+ outdir=$DA_WORKDIR /$exp
44
44
45
45
echo " writing job.$exp ."
46
46
47
47
# # write new job.exp file for HPC
48
- echo " #PBS -l walltime=${WALLTIME} " > job.$exp
49
- echo " #PBS -l select=${NNODE} :ncpus=${NCPU} :mem=${MEM} " >> job.$exp
50
-
51
- # # load modules required for the execution
52
- echo " module load intel/2025a netCDF/4.9.2-iimpi-2023a netCDF-Fortran/4.6.1-iimpi-2023a FFTW/3.3.9-intel-2021a CMake/3.29.3-GCCcore-13.3.0 git/2.45.1-GCCcore-13.3.0" >> job.$exp
53
-
54
- # # copy files to execution and output directory
55
- echo " mkdir -p $outdir " >> job.$exp
56
- echo " cp -r $inputdir /* $outdir " >> job.$exp
57
-
58
- # # go to execution and output directory
59
- echo " pushd $outdir " >> job.$exp
60
-
61
- # # execute program with mpi
62
- echo " mpiexec -n $(( $NCPU * $NNODE )) $DA_BUILD $outdir /namoptions.$exp > $outdir /output.$exp 2>&1" >> job.$exp
63
-
64
- # # gather output files from cores in a single file
65
- echo " $DA_TOOLSDIR /gather_outputs.sh $outdir " >> job.$exp
48
+ cat << EOF > job.$exp
49
+ #PBS -l walltime=${WALLTIME}
50
+ #PBS -l select=${NNODE} :ncpus=${NCPU} :mem=${MEM}
51
+ module load intel/2025a netCDF/4.9.2-iimpi-2023a netCDF-Fortran/4.6.1-iimpi-2023a FFTW/3.3.9-intel-2021a CMake/3.29.3-GCCcore-13.3.0 git/2.45.1-GCCcore-13.3.0
52
+ mkdir -p $outdir
53
+ cp -r $inputdir /* $outdir
54
+ pushd $outdir
55
+ mpiexec -n $(( $NCPU * $NNODE )) $DA_BUILD $outdir /namoptions.$exp > $outdir /output.$exp 2>&1
56
+ $DA_TOOLSDIR /gather_outputs.sh $outdir
57
+ EOF
66
58
67
59
# # submit job.exp file to queue
68
60
qsub job.$exp
You can’t perform that action at this time.
0 commit comments