Due to a shift in policy, from 0900 GMT on Wednesday 14th July 2021, we will be disabling ssh access to the server for external users. External users who wish to continue to access code repositories on the server will need to switch to using https. This can be accomplished in the following way: 1) On the repo on gitlab, use the clone dialogue and select ‘Clone with HTTPS’ to get the address of the repo; 2) From within the checkout of your repo run: $ git remote set-url origin HTTPS_ADDRESS. Here, replace HTTPS_ADDRESS with the address you have just copied from GitLab. Pulls and pushes will now require you to enter a username and password rather than using a ssh key. If you would prefer not to enter a password each time, you might consider caching your login credentials.

Commit d870b9ea authored by Pierre Cazenave's avatar Pierre Cazenave

Modify the run script to be able to launch multiple jobs simultaneously using...

Modify the run script to be able to launch multiple jobs simultaneously using the same model inputs.
parent c2fe8e71
......@@ -2,15 +2,60 @@
# Script to generate a .pbs file and launch the job.
if [ $# -ne 2 ]; then
echo "Usage: $(basename $0) NPROCS TEMPLATE"
exit 1
MODELS=(models/*.nml) # model namelists
for ((m=0; m<${#MODELS[@]}; m++)); do
# Create a run directory for this model.
SUFFIX=$(echo ${MODELS[m]} | cut -f2- -d_ | sed 's/_run.nml//g')
# The launch directory should have only symlinks in it.
if [ ! -d ./launch/$SUFFIX ]; then
mkdir -p ./launch/$SUFFIX
mv ./launch/$SUFFIX/FVCOM.* logs
find ./launch/$SUFFIX/ -type l -delete
# Make the relevant output directory
if [ ! -d ./output/$SUFFIX ]; then
mkdir -p ./output/$SUFFIX
cd ./launch/$SUFFIX
# Prep the launch directory.
ln -s ../../${MODELS[m]} tst_run.nml
ln -s ../../../tstinp
ln -s ../../output/$SUFFIX output
ln -s ../../logs
ln -s ../../fvcom
# Fix the PBS file.
sed "s,__NODES__,$NODES,g;s,__TPN__,$TPN,g;s,__POPMOD__,HP,g;s,__TASKS__,$PROCS,g" $TEMPLATE > $PBS
sed -i 's,^RUNDIR=/home_nfs/pica/models/FVCOM/fvcom-examples/Estuary/run,RUNDIR=/home_nfs/pica/models/FVCOM/fvcom-examples/Estuary/run/launch/'${SUFFIX}',g' $PBS
#sed -i 's/^CASENAME=tst/CASENAME=tst_'${SUFFIX}'/g' $PBS
# GO! GO! GO!
qsub -qworkq $PBS
rm $PBS
sed "s,__NODES__,$NODES,g;s,__TPN__,$TPN,g;s,__POPMOD__,HP,g;s,__TASKS__,$PROCS,g" $TEMPLATE > $PBS
cd ~-
mv FVCOM.* logs
qsub -qworkq $PBS
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment