File indexing completed on 2024-07-17 05:11:48 UTC
view on githubraw file Latest commit acacc28f on 2024-07-17 03:59:01 UTC
5fb27a7146 Patr*0001
0002
3a516654c6 Jean*0003
0004
0005
0006
0007
0c2658e191 Jean*0008
3a516654c6 Jean*0009
0010 adm_diva_nb=`sed -n '/^ *add_DIVA_runs *=/p' run_ADM_DIVA | sed 's/ //g'`
0011 echo " Divided Adjoint Run: $adm_diva_nb"
0012 eval "let $adm_diva_nb"
0013
0014
5fb27a7146 Patr*0015
3a516654c6 Jean*0016 extraRuns=`expr $add_DIVA_runs - 1`
0c2658e191 Jean*0017 if test $
0018 rm -f costfunction*0000 costfinal divided.ctrl snapshot*
0019
0020 echo "Run $add_DIVA_runs times + final run:"
3a516654c6 Jean*0021 for ii in `seq 0 $extraRuns` ; do
acacc28f7f Jean*0022 echo " --> starts DIVA run # $ii :"
0c2658e191 Jean*0023 ./mitgcmuv_ad > output_adm.txt.diva_${ii}
acacc28f7f Jean*0024 echo -n " <-- DIVA run # $ii : done"
0025 if test -f divided.ctrl ; then
0026 echo -n ", divided.ctrl :" ; cat divided.ctrl
0027 else echo ", no 'divided.ctrl' file" ; fi
0028
0c2658e191 Jean*0029 done
acacc28f7f Jean*0030 echo " --> Final DIVA run :"
0c2658e191 Jean*0031 ./mitgcmuv_ad > output_adm.txt
acacc28f7f Jean*0032 echo -n " <-- Final run : done"
0033 if test -f divided.ctrl ; then echo -n ", divided.ctrl :" ; cat divided.ctrl
0034 else echo "" ; fi
0c2658e191 Jean*0035 else
0036 if [ $1 -ge 1 ] ; then
0037 rm -f costfunction*0000 costfinal divided.ctrl snapshot*
0038
0039 echo "Run $add_DIVA_runs times + final run (use 'mpirun -np $1' ):"
3a516654c6 Jean*0040 for ii in `seq 0 $extraRuns` ; do
acacc28f7f Jean*0041 echo " --> starts DIVA run # $ii :"
0c2658e191 Jean*0042 mpirun -np $1 ./mitgcmuv_ad
acacc28f7f Jean*0043 echo -n " <-- DIVA run # $ii : done"
0c2658e191 Jean*0044 mv -f STDOUT.0000 STDOUT.0000.diva_${ii}
acacc28f7f Jean*0045 if test -f divided.ctrl ; then
0046 echo ", divided.ctrl :"
0047 cat divided.ctrl
0048 else echo ", no 'divided.ctrl' file" ; fi
0c2658e191 Jean*0049 done
acacc28f7f Jean*0050 echo " --> Final DIVA run :"
0c2658e191 Jean*0051 mpirun -np $1 ./mitgcmuv_ad
acacc28f7f Jean*0052 echo -n " <-- Final run : done"
0053 if test -f divided.ctrl ; then echo ", divided.ctrl :" ; cat divided.ctrl
0054 else echo "" ; fi
0c2658e191 Jean*0055 fi
0056 fi