Changeset 5722
- Timestamp:
- Jun 26, 2025, 12:30:39 AM (6 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOL/LMDZ_Setup/setup.sh
r5632 r5722 17 17 # NOTE: you must set mthend accordingly ! 18 18 testmode="n" 19 20 # instll : either "y" or "n" 21 # default : y if n LMDZ will not be installed and compiled 22 install="n" 19 23 20 24 # Radiative code: "oldrad" / "rrtm" / "ecrad" … … 130 134 -r "svn_release" either the svn release number or "last" (default <$svn>) 131 135 -d IMxJMxLM to run in resolution IM x JM x LM (default <$resol>) 132 -install 136 -install y/n pour installer et compiler le modele 133 137 -f mo/yr pour tourner en mensuel ou annuel (default <$freq>) 134 138 -rad RAD Radiation … … 155 159 "-name") SIM=$2; shift 2;; 156 160 "-save_pub") save_pub=$2 ; shift 2 ;; 161 "-install") install=$2; shift 2;; 157 162 "-rad") rad=$2; shift 2;; 158 163 "-netcdf") netcdf=$2; shift 2;; … … 280 285 281 286 if [[ -d $MODEL ]]; then echo "Found existing install at MODEL=$MODEL"; fi 282 echo "Installing model" 283 cd "$LMDZD" 284 cp "$local_d/install_lmdz.sh" . 285 chmod +x install_lmdz.sh 286 local make_j=8 287 # We launch using $MPICMD, except if it's using mpirun (no srun equivalent for bash script) => if supported, the compilation runs in a cluster job 288 jobcmd="\"$RUNBASHCMD $make_j\"" 289 if [[ ${hostname:0:5} = "jean-" ]]; then jobcmd="\"$RUNBASHCMD $make_j --partition=compil\""; fi # On JeanZay: compile on the <compil> partition 290 if [[ $(echo "$RUNBASHCMD" | cut -c -4) = "bash" ]]; then 291 jobcmd="bash" 292 fi 293 echo "./install_lmdz.sh -noclean $optim -v $version $svnopt -d $resol -rad $rad -bench compile_only $parallel $ins_cosp $ins_xios $ins_aero $ins_inlandsis -name $LMDZname -veget $veget -netcdf $netcdf -arch $ARCH -make_j $make_j -jobcmd $jobcmd" $save_pub_opt >> install_lmdz_options.$$.sh 294 chmod +x install_lmdz_options.$$.sh 295 echo "Running install_lmdz_options.$$.sh" 296 set -o pipefail 297 ./install_lmdz_options.$$.sh 298 #gcm=$MODEL/$(./install_lmdz_options.$$.sh | tee /dev/tty | tail -n 1 | sed -n "s:.* executable is \(.*\.e\).*:\1:p") 287 if [[ $install = "y" ]]; then 288 echo "Installing model" 289 cd "$LMDZD" 290 cp "$local_d/install_lmdz.sh" . 291 chmod +x install_lmdz.sh 292 local make_j=8 293 # We launch using $MPICMD, except if it's using mpirun (no srun equivalent for bash script) => if supported, the compilation runs in a cluster job 294 jobcmd="\"$RUNBASHCMD $make_j\"" 295 if [[ ${hostname:0:5} = "jean-" ]]; then jobcmd="\"$RUNBASHCMD $make_j --partition=compil\""; fi # On JeanZay: compile on the <compil> partition 296 if [[ $(echo "$RUNBASHCMD" | cut -c -4) = "bash" ]]; then 297 jobcmd="bash" 298 fi 299 echo "./install_lmdz.sh -noclean $optim -v $version $svnopt -d $resol -rad $rad -bench compile_only $parallel $ins_cosp $ins_xios $ins_aero $ins_inlandsis -name $LMDZname -veget $veget -netcdf $netcdf -arch $ARCH -make_j $make_j -jobcmd $jobcmd" $save_pub_opt >> install_lmdz_options.$$.sh 300 chmod +x install_lmdz_options.$$.sh 301 echo "Running install_lmdz_options.$$.sh" 302 set -o pipefail 303 ./install_lmdz_options.$$.sh 304 #gcm=$MODEL/$(./install_lmdz_options.$$.sh | tee /dev/tty | tail -n 1 | sed -n "s:.* executable is \(.*\.e\).*:\1:p") 305 gcm=$MODEL/bin/gcm.e 306 set +o pipefail 307 mv install_lmdz.sh install_lmdz.$$.sh 308 else 309 echo "install=n no need to install and recompile the model (already done)" 299 310 gcm=$MODEL/bin/gcm.e 300 set +o pipefail 301 mv install_lmdz.sh install_lmdz.$$.sh 311 fi 302 312 cd "$local_d" 303 313 }
Note: See TracChangeset
for help on using the changeset viewer.