Changeset 1301 for trunk/NVTK/INSTALL/JOBS/lance_batch.ksh
- Timestamp:
- 2009-02-09T18:15:38+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NVTK/INSTALL/JOBS/lance_batch.ksh
r1297 r1301 2 2 # $Id$ 3 3 ###################################################### 4 # Original : C. Talandier for ESOPA5 # Contact : opatlod@locean-ipsl.upmc.fr4 # Original : C. Talandier for NEMO team 5 # Contact : nemo_st@locean-ipsl.upmc.fr 6 6 # 7 7 # INPUT ARGS: 3 + 1 optional … … 9 9 # - MTIME : timing/no timing (timing or notiming) 10 10 # - JOBTOL: jobs to launch: all, long, 1_short or gtime 11 # - OWNEXP: name of the experience performed 11 12 # - REFTAG: (optional): reference tag name to which current 12 13 # version will be compare to … … 55 56 ##### Begin Users modifications 56 57 ########################################################## 57 # IODIR : directory where to get ORCA2_LIM_nemo_v 2.tar58 # IODIR : directory where to get ORCA2_LIM_nemo_v3.1.tar 58 59 # PRC : total number of processors which will be used 59 60 ########################################################## … … 68 69 MTIME=$2 69 70 JOBTOL=$3 70 REFTAG=$4 71 OWNEXP=$4 72 REFTAG=$5 71 73 RUN=$(basename `pwd`) 72 74 … … 127 129 fi 128 130 129 sed -e "s /^$W_XX *//" job_${CONF}.ksh | grep -v '^#-T- ' > job_${CONF}.$$131 sed -e "s%^$W_XX *%%" job_${CONF}.ksh | grep -v '^#-T- ' > job_${CONF}.$$ 130 132 131 133 # -------------------------------------------------------------- … … 138 140 'ax6_mono' ) 139 141 CAR_JNAM=$( grep '\# @ job_name' jhd_${TARGET}_${RUN} ) 140 sed -e "s /$CAR_JNAM/\# @ job_name = ${RUN}${CONF}/" \142 sed -e "s%$CAR_JNAM%\# @ job_name = ${RUN}${CONF}%" \ 141 143 jhd_${TARGET}_${RUN} > jhd_${TARGET}_${RUN}_tmp ;; 142 144 'aix6' ) 143 145 CAR_JNAM=$( grep '\# @ job_name' jhd_${TARGET}_${RUN} ) 144 146 CAR_JMPI=$( grep '\# @ total_tasks' jhd_${TARGET}_${RUN} ) 145 sed -e "s /$CAR_JNAM/\# @ job_name = ${RUN}${CONF}/" \146 -e "s /$CAR_JMPI/\# @ total_tasks = ${PRC}/" \147 sed -e "s%$CAR_JNAM%\# @ job_name = ${RUN}${CONF}%" \ 148 -e "s%$CAR_JMPI%\# @ total_tasks = ${PRC}%" \ 147 149 jhd_${TARGET}_${RUN} > jhd_${TARGET}_${RUN}_tmp ;; 148 150 'sx8brodie' ) … … 152 154 if [ ${RUN} = 'mpi' -o ${RUN} = 'omp' ] ; then 153 155 CAR_JMPI=$( grep '\#PBS -l cpunum_job' jhd_${TARGET}_${RUN} ) 154 sed -e "s /$CAR_JNAM/\#PBS -N ${RUN}${CONF}/" \155 -e "s /$CAR_JNAMO/\#PBS -o ${RUN}${CONF}_std/" \156 -e "s /$CAR_JNAME/\#PBS -e ${RUN}${CONF}_err/" \157 -e "s /$CAR_JMPI/\#PBS -l cpunum_job=${PRC}/" \156 sed -e "s%$CAR_JNAM%\#PBS -N ${RUN}${CONF}%" \ 157 -e "s%$CAR_JNAMO%\#PBS -o ${RUN}${CONF}_std%" \ 158 -e "s%$CAR_JNAME%\#PBS -e ${RUN}${CONF}_err%" \ 159 -e "s%$CAR_JMPI%\#PBS -l cpunum_job=${PRC}%" \ 158 160 jhd_${TARGET}_${RUN} > jhd_${TARGET}_${RUN}_tmp 159 161 else 160 sed -e "s /$CAR_JNAM/\#PBS -N ${RUN}${CONF}/" \161 -e "s /$CAR_JNAMO/\#PBS -o ${RUN}${CONF}_std/" \162 -e "s /$CAR_JNAME/\#PBS -e ${RUN}${CONF}_err/" \162 sed -e "s%$CAR_JNAM%\#PBS -N ${RUN}${CONF}%" \ 163 -e "s%$CAR_JNAMO%\#PBS -o ${RUN}${CONF}_std%" \ 164 -e "s%$CAR_JNAME%\#PBS -e ${RUN}${CONF}_err%" \ 163 165 jhd_${TARGET}_${RUN} > jhd_${TARGET}_${RUN}_tmp 164 166 fi ;; … … 224 226 CAR_RTG_tmp=$( grep 'REF_TAG=xxx' job_tmp_${RUN}.ksh ) 225 227 CAR_RTG=`echo $CAR_RTG_tmp | cut -f 1 -d " " ` 228 CAR_MYO_tmp=$( grep 'MYO_EXP=xxx' job_tmp_${RUN}.ksh ) 229 CAR_MYO=`echo $CAR_MYO_tmp | cut -f 1 -d " " ` 226 230 CAR_TSY_tmp=$( grep 'TSYMB=xxx' job_tmp_${RUN}.ksh ) 227 231 CAR_TSY=`echo $CAR_TSY_tmp | cut -f 1 -d " " ` 228 232 229 sed -e "s/$CAR_TYPE/type=${jobnam[$ind]}/" \ 230 -e "s/$CAR_RUN/RUN=$RUN/" \ 231 -e "s/$CAR_MPP/NB_PROCS=$PRC/" \ 232 -e "s@$CAR_SUB@LAUNCH='$LAUN'@" \ 233 -e "s/$CAR_EXE/LEXE='$LSUB'/" \ 234 -e "s/$CAR_PER/CPERF='$LPERF'/" \ 235 -e "s?$CAR_INP?D_INPUT=$IODIR?" \ 236 -e "s/$CAR_GET/D_GET=$CMDGET/" \ 237 -e "s/$CAR_RTG/REF_TAG=$REFTAG/" \ 238 -e "s/$CAR_TSY/TSYMB=$SYMBOL/" \ 239 job_tmp_${RUN}.ksh > job_${RUN}_${jobnam[$ind]}.ksh 233 sed -e "s%$CAR_TYPE%type=${jobnam[$ind]}%" \ 234 -e "s%$CAR_RUN%RUN=$RUN%" \ 235 -e "s%$CAR_MPP%NB_PROCS=$PRC%" \ 236 -e "s%$CAR_SUB%LAUNCH='$LAUN'%" \ 237 -e "s%$CAR_EXE%LEXE='$LSUB'%" \ 238 -e "s%$CAR_PER%CPERF='$LPERF'%" \ 239 -e "s%$CAR_INP%D_INPUT=$IODIR%" \ 240 -e "s%$CAR_GET%D_GET=$CMDGET%" \ 241 -e "s%$CAR_RTG%REF_TAG=$REFTAG%" \ 242 -e "s%$CAR_MYO%MYO_EXP=$OWNEXP%" \ 243 -e "s%$CAR_TSY%TSYMB=$SYMBOL%" \ 244 job_tmp_${RUN}.ksh > job_${RUN}_${jobnam[$ind]}_${OWNEXP}.ksh 240 245 241 246 if [ ${jobnam[$ind]} = 'gtime' ] ; then … … 243 248 case ${TARGET} in 244 249 'ax6_mono' | 'aix6' ) 245 CAR_JTIM=$( grep '\# @ wall_clock_limit' job_${RUN}_${jobnam[$ind]} .ksh )246 sed -e "s /$CAR_JTIM/\# @ wall_clock_limit = ${LJTIM}/" \247 job_${RUN}_${jobnam[$ind]} .ksh > job_${RUN}_${jobnam[$ind]}.ksh_tmp ;;250 CAR_JTIM=$( grep '\# @ wall_clock_limit' job_${RUN}_${jobnam[$ind]}_${OWNEXP}.ksh ) 251 sed -e "s%$CAR_JTIM%\# @ wall_clock_limit = ${LJTIM}%" \ 252 job_${RUN}_${jobnam[$ind]}_${OWNEXP}.ksh > job_${RUN}_${jobnam[$ind]}.ksh_tmp ;; 248 253 'sx8brodie' ) 249 CAR_JTIMP=$( grep '\#PBS -l cputim_prc' job_${RUN}_${jobnam[$ind]} .ksh )250 CAR_JTIMJ=$( grep '\#PBS -l cputim_job' job_${RUN}_${jobnam[$ind]} .ksh )251 sed -e "s /$CAR_JTIMP/\#PBS -l cputim_prc=${LJTIM}/" \252 -e "s /$CAR_JTIMJ/\#PBS -l cputim_job=${LJTIMJ}/" \253 job_${RUN}_${jobnam[$ind]} .ksh > job_${RUN}_${jobnam[$ind]}.ksh_tmp ;;254 CAR_JTIMP=$( grep '\#PBS -l cputim_prc' job_${RUN}_${jobnam[$ind]}_${OWNEXP}.ksh ) 255 CAR_JTIMJ=$( grep '\#PBS -l cputim_job' job_${RUN}_${jobnam[$ind]}_${OWNEXP}.ksh ) 256 sed -e "s%$CAR_JTIMP%\#PBS -l cputim_prc=${LJTIM}%" \ 257 -e "s%$CAR_JTIMJ%\#PBS -l cputim_job=${LJTIMJ}%" \ 258 job_${RUN}_${jobnam[$ind]}_${OWNEXP}.ksh > job_${RUN}_${jobnam[$ind]}.ksh_tmp ;; 254 259 esac 255 mv job_${RUN}_${jobnam[$ind]}.ksh_tmp job_${RUN}_${jobnam[$ind]} .ksh260 mv job_${RUN}_${jobnam[$ind]}.ksh_tmp job_${RUN}_${jobnam[$ind]}_${OWNEXP}.ksh 256 261 257 262 fi 258 263 259 chmod 750 job_${RUN}_${jobnam[$ind]}.ksh 260 mv job_${RUN}_${jobnam[$ind]}.ksh ${dirjob[$ind]}/. 264 chmod 750 job_${RUN}_${jobnam[$ind]}_${OWNEXP}.ksh 265 266 if [ ! -d ${dirjob[$ind]}/$OWNEXP ] ; then 267 mkdir ${dirjob[$ind]}/$OWNEXP 268 fi 269 mv job_${RUN}_${jobnam[$ind]}_${OWNEXP}.ksh ${dirjob[$ind]}/${OWNEXP}/. 261 270 262 271 if [ ${jobnam[$ind]} != '2_short' ] ; then 263 cd ${dirjob[$ind]} 264 ${LAUN}job_${RUN}_${jobnam[$ind]} .ksh &265 cd ../ 272 cd ${dirjob[$ind]}/${OWNEXP} 273 ${LAUN}job_${RUN}_${jobnam[$ind]}_${OWNEXP}.ksh & 274 cd ../.. 266 275 fi 267 276 … … 282 291 CAR_LJOB=`echo $CAR_LJOB_tmp | cut -f 1 -d " " ` 283 292 284 sed -e "s /$CAR_LJOB/LJOBS=${LLJOBS}/" cron_jobs.ksh > cron_jobs.$$293 sed -e "s%$CAR_LJOB%LJOBS=${LLJOBS}%" cron_jobs.ksh > cron_jobs.$$ 285 294 mv cron_jobs.$$ cron_jobs.ksh && rm -rf cron_jobs.$$ 286 295 chmod 744 cron_jobs.ksh
Note: See TracChangeset
for help on using the changeset viewer.