Changeset 13378 for utils/CI/sette_ticket2459/prepare_job.sh
- Timestamp:
- 2020-08-05T19:25:54+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
utils/CI/sette_ticket2459/prepare_job.sh
r12798 r13378 122 122 # loop on tarfiles 123 123 # read file name and directory 124 while read tar_file dir_conf_forc 125 do 126 echo looking for tarfile ${tar_file} and directory ${FORCING_DIR}/${dir_conf_forc} ; echo looking for tarfile ${tar_file} and directory ${FORCING_DIR}/${dir_conf_forc} >> ${SETTE_DIR}/output.sette 127 if [ -f ${FORCING_DIR}/${tar_file} ] && [ -d ${FORCING_DIR}/${dir_conf_forc} ] ; then 128 # Tarfile and input dir ar there, only check the links 129 echo "Tarfile and input dir ar there, only check the links" >> ${SETTE_DIR}/output.sette 130 # extract tarfile 131 else 132 133 if [ ! -f ${FORCING_DIR}/${tar_file} ] ; then 134 echo "tarfile ${FORCING_DIR}/${tar_file} cannot be found we stop " ; exit 2 ; fi 135 136 echo "mkdir ${FORCING_DIR}/${dir_conf_forc}" >> ${SETTE_DIR}/output.sette 137 mkdir ${FORCING_DIR}/${dir_conf_forc} 138 cd ${FORCING_DIR}/${dir_conf_forc} 139 echo " extract from tarfile ${FORCING_DIR}/${tar_file} in ${FORCING_DIR}/${dir_conf_forc}" >> ${SETTE_DIR}/output.sette 140 tar xvof ${FORCING_DIR}/${tar_file} ; gunzip -f `find . -name "*.gz"` 141 fi 142 # Tarfile and input dir ar there, only check the links 143 cd ${FORCING_DIR}/${dir_conf_forc} 144 for fida in * 145 do 124 while read tar_file dir_conf_forc 125 do 126 echo looking for tarfile ${tar_file} and directory ${FORCING_DIR}/${dir_conf_forc} 127 echo looking for tarfile ${tar_file} and directory ${FORCING_DIR}/${dir_conf_forc} >> ${SETTE_DIR}/output.sette 128 if [ -d ${FORCING_DIR}/${dir_conf_forc} ] ; then 129 # input dir ar there, only check the links 130 echo "input dir ar there, only check the links" >> ${SETTE_DIR}/output.sette 131 # extract tarfile 132 else 133 if [ ! -f ${FORCING_DIR}/${tar_file} ] ; then 134 echo "tarfile ${FORCING_DIR}/${tar_file} cannot be found we stop " ; exit 2 ; fi 135 136 echo " extract from tarfile ${FORCING_DIR}/${tar_file} in ${FORCING_DIR}/${dir_conf_forc}" >> ${SETTE_DIR}/output.sette 137 138 istgz=$( echo ${FORCING_DIR}/${tar_file} | grep -c "gz$" ) 139 if [ $istgz -eq 1 ] 140 then 141 withdir=$( tar tfz ${FORCING_DIR}/${tar_file} | head -n 1 | grep -c "${dir_conf_forc}/$" ) 142 else 143 withdir=$( tar tf ${FORCING_DIR}/${tar_file} | head -n 1 | grep -c "${dir_conf_forc}/$" ) 144 fi 145 if [ $withdir -eq 0 ] 146 then 147 mkdir ${FORCING_DIR}/${dir_conf_forc} 148 cd ${FORCING_DIR}/${dir_conf_forc} 149 else 150 cd ${FORCING_DIR} 151 fi 152 if [ $istgz -eq 1 ] 153 then 154 tar xvfz ${FORCING_DIR}/${tar_file} 155 else 156 tar xvf ${FORCING_DIR}/${tar_file} 157 [ $( ls -1 *gz 2>/dev/null | wc -l ) -gt 0 ] && gunzip -f *gz 158 fi 159 fi 160 # Tarfile and input dir ar there, only check the links 161 cd ${FORCING_DIR}/${dir_conf_forc} 162 for fida in * 163 do 146 164 [ -f ${EXE_DIR}/${fida} ] || ln -s ${FORCING_DIR}/${dir_conf_forc}/${fida} ${EXE_DIR}/${fida} 147 148 149 165 done 166 done < ${SETTE_DIR}/$INPUTARFILE 167 150 168 else 151 echo "no input file to be searched "169 echo "no input file to be searched " 152 170 fi 153 171 ################################################################ … … 252 270 ;; 253 271 X64_JEANZAY*) #Setup for Jean-Zay 254 export GROUP_IDRIS=`echo ${ USER} |cut -c 2-4`272 export GROUP_IDRIS=`echo ${IDRPROJ}` 255 273 ;; 256 274 openmpi_KARA_MERCATOR*) … … 264 282 NB_PROC_NODE=40 265 283 NB_NODES=$( echo $NB_PROC | awk '{print $1 - $1 % $NB_PROC_NODE }' | awk '{print $1 / $NB_PROC_NODE }' ) 284 ;; 285 dahu_ifort*) 286 NB_PROC_NODE=32 287 SELECT="nodes=1" 266 288 ;; 267 289 *) … … 299 321 mv run_sette_test1.job run_sette_test.job 300 322 ;; 323 dahu_ifort*) 324 cat run_sette_test.job | sed -e"s/SELECT/${SELECT}/" > run_sette_test1.job 325 mv run_sette_test1.job run_sette_test.job 326 ;; 301 327 esac 302 328 #
Note: See TracChangeset
for help on using the changeset viewer.