Changeset 503 for palm/trunk/SCRIPTS
- Timestamp:
- Mar 3, 2010 12:27:06 AM (15 years ago)
- Location:
- palm/trunk/SCRIPTS
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/.mrun.config.default
r410 r503 31 31 %compiler_name mpif90 <hi> parallel 32 32 %compiler_name_ser ifort <hi> parallel 33 %cpp_options -D__mpi2:-DMPI_REAL=MPI_DOUBLE_PRECISION:-DMPI_2REAL=MPI_2DOUBLE_PRECISION:-D__netcdf :-D__netcdf_64bit<hi> parallel33 %cpp_options -D__mpi2:-DMPI_REAL=MPI_DOUBLE_PRECISION:-DMPI_2REAL=MPI_2DOUBLE_PRECISION:-D__netcdf <hi> parallel 34 34 %netcdf_inc -I:<replace by netcdf include path> <hi> parallel 35 35 %netcdf_lib -L<replace by netcdf library path>:-lnetcdf <hi> parallel 36 %mopts -j:4 <hi> parallel 36 37 %fopts -axW:-cpp:-r8:-nbs:-convert:little_endian:-I:<replace by mpi include path> <hi> parallel 37 38 %lopts -axW:-cpp:-r8:-nbs:-Vaxlib:-L:<replace by mpi library path> <hi> parallel … … 64 65 # Combine all particle information files 65 66 OC:[[ -f PARTICLE_INFOS/_0000 ]] && cat PARTICLE_INFOS/* >> PARTICLE_INFO 66 #67 # Collect plot data (2d/3d) into one file68 OC:combine_plot_fields.x69 67 # 70 68 #---------------------------------------------------------------------------- -
palm/trunk/SCRIPTS/.mrun.config.imuk_hlrn
r494 r503 37 37 %compiler_name mpif90 lcmuk parallel 38 38 %compiler_name_ser ifort lcmuk parallel 39 %cpp_options -D__mpi2:-DMPI_REAL=MPI_DOUBLE_PRECISION:-DMPI_2REAL=MPI_2DOUBLE_PRECISION:-D__netcdf :-D__netcdf_64bitlcmuk parallel39 %cpp_options -D__mpi2:-DMPI_REAL=MPI_DOUBLE_PRECISION:-DMPI_2REAL=MPI_2DOUBLE_PRECISION:-D__netcdf lcmuk parallel 40 40 %netcdf_inc -I:/muksoft_64/packages/netcdf/3.6.2/include lcmuk parallel 41 41 %netcdf_lib -L/muksoft_64/packages/netcdf/3.6.2/lib:-lnetcdf lcmuk parallel 42 %mopts -j:4 lcmuk parallel 42 43 %fopts -axW:-cpp:-r8:-nbs:-convert:little_endian:-I:/muksoft_64/packages/mpich2/2.1.0.5/include lcmuk parallel 43 44 %lopts -axW:-cpp:-r8:-nbs:-Vaxlib:-L:/muksoft_64/packages/mpich2/2.1.0.5/lib lcmuk parallel … … 53 54 %netcdf_inc -I:/sw/dataformats/netcdf/3.6.2/include lcsgih parallel 54 55 %netcdf_lib -L/sw/dataformats/netcdf/3.6.2/lib:-lnetcdf:-lnetcdff lcsgih parallel 56 %mopts -j:4 lcsgih parallel 55 57 %fopts -g:-w:-xT:-O3:-cpp:-r8:-ftz:-fno-alias:-no-prec-div:-no-prec-sqrt:-ip:-nbs:-convert:little_endian lcsgih parallel 56 58 %lopts -g:-w:-xT:-O3:-cpp:-r8:-ftz:-fno-alias:-no-prec-div:-no-prec-sqrt:-ip:-nbs:-Vaxlib lcsgih parallel … … 82 84 # Combine all particle information files 83 85 OC:[[ -f PARTICLE_INFOS/_0000 ]] && cat PARTICLE_INFOS/* >> PARTICLE_INFO 84 #85 # Collect plot data (2d/3d) into one file86 OC:combine_plot_fields.x87 86 # 88 87 #---------------------------------------------------------------------------- -
palm/trunk/SCRIPTS/.mrun.config.imuk_ice2_netcdf4
r494 r503 37 37 %compiler_name mpif90 lcmuk parallel 38 38 %compiler_name_ser ifort lcmuk parallel 39 %cpp_options -D__mpi2:-DMPI_REAL=MPI_DOUBLE_PRECISION:-DMPI_2REAL=MPI_2DOUBLE_PRECISION:-D__netcdf :-D__netcdf_64bitlcmuk parallel39 %cpp_options -D__mpi2:-DMPI_REAL=MPI_DOUBLE_PRECISION:-DMPI_2REAL=MPI_2DOUBLE_PRECISION:-D__netcdf lcmuk parallel 40 40 %netcdf_inc -I:/muksoft_64/packages/netcdf/3.6.2/include lcmuk parallel 41 41 %netcdf_lib -L/muksoft_64/packages/netcdf/3.6.2/lib:-lnetcdf lcmuk parallel 42 %mopts -j:4 lcmuk parallel 42 43 %fopts -axW:-cpp:-r8:-nbs:-convert:little_endian:-I:/muksoft_64/packages/mpich2/2.1.0.5/include lcmuk parallel 43 44 %lopts -axW:-cpp:-r8:-nbs:-Vaxlib:-L:/muksoft_64/packages/mpich2/2.1.0.5/lib lcmuk parallel … … 83 84 # Combine all particle information files 84 85 OC:[[ -f PARTICLE_INFOS/_0000 ]] && cat PARTICLE_INFOS/* >> PARTICLE_INFO 85 #86 # Collect plot data (2d/3d) into one file87 OC:combine_plot_fields.x88 86 # 89 87 #---------------------------------------------------------------------------- -
palm/trunk/SCRIPTS/mbuild
r493 r503 1 1 #!/bin/ksh 2 # mbuild - Programmuebersetzungsscript2 # mbuild - script for compiling the PALM code and its utility programs 3 3 # $Id$ 4 4 5 # Prozedur zur Uebersetzung von Programmteilen mittels make-Mechanismus 6 # auf einem Remote-Rechner, ausgehend von Quellcode auf einem lokalen 7 # Rechner 8 9 # Folgende Probleme existieren unter Linux, wenn keine AT&T-Korn-Shell 10 # verwendet wird: 11 # Wertzuweisungen an Variablen innerhalb von DO-Schleifen werden nicht 12 # nach aussen weitergegeben. "while read line" funktioniert nicht 13 # innerhalb einer Pipe. 14 15 # letzte Aenderung: 16 # 06/05/02 - Siggi - Beginn der Entwicklung 17 # 12/06/02 - Siggi - Abschluss der Entwicklungsarbeiten 18 # 23/06/02 - Siggi - voerst kein make-clean, Abbruch bei batch-mode 19 # 24/07/02 - Siggi - Keine Verwendung der temporaeren Datei tmp_mbuild 20 # unter linux mehr noetig, da nun AT&T-Korn-Shell 21 # benutzt wird 22 # 12/09/02 - Siggi - ibmh (hanni.hlrn.de) validiert 23 # 19/12/02 - Siggi - ibmb validiert 5 # Procedure to compile code on local and remote hosts using the 6 # make-mechanism. The source code must be provided on the local host. 7 8 # Last changes: 9 # 06/05/02 - Siggi - start development 10 # 12/06/02 - Siggi - first version finished 11 # 12/09/02 - Siggi - ibmh (hanni.hlrn.de) included 12 # 19/12/02 - Siggi - ibmb included 24 13 # 05/02/03 - Siggi - hostname nobela included 25 14 # 04/03/03 - Siggi - host nech included … … 116 105 # removed; modules should now be given in the 117 106 # configuration file 118 119 120 121 # VARIABLENVEREINBARUNGEN + DEFAULTWERTE 107 # 02/03/10 - Siggi - utility programs are created separately for each 108 # block in the configuration file, 109 # parallel make for utility programs 110 111 112 # VARIABLE DECLARATIONS + DEFAULT VALUES 122 113 compile_utility_programs=false 123 114 config_file=.mrun.config … … 142 133 typeset -L40 version="MBUILD 2.1 Rev$Rev$" 143 134 144 # FEHLERBEHANDLUNG145 # BEIEXIT:135 # ERROR HANDLING 136 # IN CASE OF EXIT: 146 137 trap 'rm -rf $working_directory/tmp_mbuild 147 138 if [[ $locat != normal ]] … … 153 144 154 145 155 # BEITERMINAL-BREAK:146 # IN CASE OF TERMINAL-BREAK: 156 147 trap 'rm -rf $working_directory/tmp_mbuild 157 148 printf "\n\n +++ mbuild killed by \"^C\" \n\n" … … 162 153 tmp_mbuild=${working_directory}/tmp_mbuild 163 154 164 # SHELLSCRIPT-OPTIONEN EINLESEN155 # READ SHELLSCRIPT-OPTIONS 165 156 while getopts :c:h:m:s:u option 166 157 do … … 178 169 179 170 180 # PRUEFEN, OB KONFIGURATIONS-DATEI VORHANDEN171 # CHECK, IF CONFIGURATION-FILE EXISTS 181 172 if [[ ! -f $config_file ]] 182 173 then … … 189 180 190 181 191 # LOKALEN RECHNER ERMITTELN182 # DETERMINE THE LOCAL HOST 192 183 local_host_real_name=$(hostname) 193 184 # local_addres=$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}') … … 195 186 196 187 197 # HOST-IDENTIFIER (local_host) AUS KONFIGURATIONSDATEI BESTIMMEN188 # DETERMINE HOST-IDENTIFIER (local_host) FROM THE CONFIG-FILE 198 189 line="" 199 190 grep "%host_identifier" $config_file > $tmp_mbuild … … 238 229 239 230 240 # BENUTZERNAMEN AUF LOKALEM RECHNER AUS KONFIGURATIONSDATEI ERMITTELN231 # DETERMINE USER NAME ON LOCAL HOST FROM THE CONFIG-FILE 241 232 line="" 242 233 grep " $local_host" $config_file | grep "%remote_username" > $tmp_mbuild … … 258 249 259 250 260 # LOKALEN QUELLTEXTPFAD ERMITTELN. 261 # ZUERST PRUEFEN, OB EIN GLOBALER QUELLTEXTPFAD FUER ALLE RECHNER 262 # VEREINBART WURDE. 263 # DAZU ZUNAECHST ALLE IN DER KONFIGURATIONSDATEI VEREINBARTEN GLOBALEN 264 # VARIABLEN SETZEN, WEIL DIESE EVTL. IN PFADNAMEN VERWENDET WERDEN 251 # DETERMINE LOCAL SOURCE-CODE PATH. 252 # FIRST CHECK, IF A GLOBAL SOURCE-CODE PATH HAS BEEN DECLARED FOR ALL HOSTS. 253 # THEREFORE, FIRST SET ALL GLOBAL VARIABLES DECLARED IN THE CONFIG-FILE, 254 # BECAUSE THEY MAY BE USED AS PART OF THE PATH NAME. 265 255 line="" 266 256 grep "%" $config_file > $tmp_mbuild … … 272 262 value=`echo $line | cut -d" " -s -f2` 273 263 eval export $var=\$value 274 # eval echo \" $var=\$$var \" # AUSGABE ZU TESTZWECKEN275 264 fi 276 265 done < $tmp_mbuild 277 266 278 # N UN PRUEFEN, OB EIN GLOBALER QUELLTEXTPFAD VEREINBART WURDE267 # NOW CHECK, IF A GLOBAL SOURCE-CODE-PATH HAS BEEN DECLARED 279 268 line="" 280 269 grep "%source_path" $config_file > $tmp_mbuild … … 317 306 318 307 319 # GLOBALEN DEPOSITORY-PFAD ERMITTELN308 # DETERMINE GLOBAL DEPOSITORY-PATH 320 309 line="" 321 310 grep "%depository_path" $config_file > $tmp_mbuild … … 333 322 334 323 335 # PRUEFEN, OB IN KONFIGURATIONSDATEI EIN HAUPTPROGRAMM 336 # VEREINBART WURDE 324 # CHECK, IF A MAIN PROGRAM HAS BEEN DEFINED IN THE CONFIG-FILE 337 325 if [[ $(grep -c "%mainprog" $config_file) != 1 ]] 338 326 then … … 352 340 353 341 354 # MAKEFILE vorhanden342 # CHECK IF MAKEFILE EXITS 355 343 [[ "$makefile" = "" ]] && makefile=$local_source_path/Makefile 356 344 if [[ ! -f $makefile ]] … … 363 351 364 352 365 # HEADER- AUSGABE (TEIL1: MELDUNGEN UEBER LOKALEN RECHNER)353 # HEADER-OUTPUT (PART1: MESSAGES CONCERNING THE LOCAL HOST) 366 354 calltime=$(date) 367 355 printf "\n" … … 389 377 then 390 378 391 # IN JEDEM FALL ALLEN DATEIEN WRITE-PERMIT GEBEN, DAMIT ES AUF392 # DEN REMOTE-RECHNERN NICHT EVTL. ZU PROBLEMEN BEIM UEBERSCHREIBEN KOMMT379 # IN ANY CASE, GIVE ALL FILES WRITE-PERMIT, IN ORDER TO AVOID PROBLEMS 380 # WITH OVERWRITING FILES ON THE REMOTE HOST 393 381 cd $local_source_path 394 382 printf "\n\n *** tar of makefile and source files in $local_source_path" … … 400 388 401 389 402 # BESTAETIGUNG ZUM WEITERMACHEN EINHOLEN390 # GET CONFIRMATION TO CONTINUE 403 391 if [[ $host = all ]] 404 392 then … … 487 475 then 488 476 printf "\n +++ remote host \"$remote_host\" unknown"; 489 printf "\n please inform S. Raasch!"477 printf "\n please inform PALM group support!" 490 478 fi;; 491 479 esac … … 588 576 589 577 remote_md=$(eval echo $remote_md) 590 [[ "$condition1" != "" ]] && remote_md=${remote_md}_$condition1 591 [[ "$condition2" != "" ]] && remote_md=${remote_md}_$condition2 578 block="" 579 [[ "$condition1" != "" ]] && block=_$condition1 580 [[ "$condition2" != "" ]] && block=${block}_$condition2 581 remote_md==${remote_md}$block 592 582 593 583 … … 803 793 804 794 805 # get modules to be load 795 # get modules to be loaded 806 796 line="" 807 797 grep "$remote_host_string" $config_file | grep "%modules" > $tmp_mbuild … … 959 949 if [[ $answer = c || $answer = C ]] 960 950 then 961 silent= false951 silent=true 962 952 fi 963 953 if [[ $answer = s || $answer = S ]] … … 1042 1032 then 1043 1033 module_calls="module load ${modules};" 1034 else 1035 module_calls="" 1044 1036 fi 1045 1037 … … 1138 1130 ssh ${remote_username}@${remote_addres} "[[ ! -d ${remote_ud} ]] && (echo \" *** ${remote_ud} will be created\"; mkdir -p ${remote_ud}); [[ ! -d ${remote_ud}/../SCRIPTS ]] && (echo \" *** ${remote_ud}/../SCRIPTS will be created\"; mkdir -p ${remote_ud}/../SCRIPTS)" 1139 1131 else 1140 # TIT ERLAUBT NUR DIE AUSF ï¿œHRUNG GANZ BESTIMMTER KOMMANDOS1132 # TIT ERLAUBT NUR DIE AUSFUEHRUNG GANZ BESTIMMTER KOMMANDOS 1141 1133 # MIT SSH, DESHALB AUFRUF PER PIPE 1142 1134 print "[[ ! -d ${remote_ud} ]] && (echo \" *** ${remote_ud} will be created\"; mkdir -p ${remote_ud}); [[ ! -d ${remote_ud}/../SCRIPTS ]] && (echo \" *** ${remote_ud}/../SCRIPTS will be created\"; mkdir -p ${remote_ud}/../SCRIPTS)" | ssh ${remote_username}@${remote_addres} 2>&1 … … 1146 1138 if [[ $local_host = decalpha ]] 1147 1139 then 1148 # DECALPHA BENUTZT BEI NICHTANGABE DES VOLLST ï¿œNDIGEN PFADES1140 # DECALPHA BENUTZT BEI NICHTANGABE DES VOLLSTAENDIGEN PFADES 1149 1141 # IRGENDEIN ANDERES SCP (WAS NICHT FUNKTIONIERT). AUSSERDEM 1150 1142 # KOENNEN DOLLAR-ZEICHEN NICHT BENUTZT WERDEN … … 1181 1173 if [[ $remote_host = nech ]] 1182 1174 then 1183 make_call_string="sxmake F90=$compiler_name F90_SER=$compiler_name_ser COPT=\"$cpp_options\" F90FLAGS=\"$compiler_options\" LDFLAGS=\"$loader_options\" "1184 else 1185 make_call_string="make F90=$compiler_name F90_SER=$compiler_name_ser COPT=\"$cpp_options\" F90FLAGS=\"$compiler_options\" LDFLAGS=\"$loader_options\" "1175 make_call_string="sxmake $make_options BLOCK=$block F90=$compiler_name F90_SER=$compiler_name_ser COPT=\"$cpp_options\" F90FLAGS=\"$compiler_options\" LDFLAGS=\"$loader_options\" " 1176 else 1177 make_call_string="make $make_options BLOCK=$block F90=$compiler_name F90_SER=$compiler_name_ser COPT=\"$cpp_options\" F90FLAGS=\"$compiler_options\" LDFLAGS=\"$loader_options\" " 1186 1178 fi 1187 1179 … … 1190 1182 then 1191 1183 module_calls="module load ${modules};" 1184 else 1185 module_calls="" 1192 1186 fi 1193 1187 … … 1292 1286 1293 1287 1294 # NEUE VERSION AUF LOKALEM RECHNER ZUSAMMENPACKEN1288 # TAR NEW VERSION ON LOCAL HOST 1295 1289 printf "\n *** tar update on local host ..." 1296 1290 tar -cf ${mainprog}_current_version.tar *.$suf *.o *.mod … … 1303 1297 echo " *** compiling the utility programs ..." 1304 1298 cd ${local_source_path}/../UTIL 1305 make F90=$compiler_name F90_SER=$compiler_name_ser COPT="$cpp_options" F90FLAGS="$compiler_options" LDFLAGS="$loader_options" 1299 1300 # TOUCH FILES IN ORDER TO FORCE COMPILATION FOR EVERY BLOCK 1301 touch *.f90 1302 make $make_options BLOCK=$block F90=$compiler_name F90_SER=$compiler_name_ser COPT="$cpp_options" F90FLAGS="$compiler_options" LDFLAGS="$loader_options" 1306 1303 cd - > /dev/null 1307 1304 fi … … 1325 1322 1326 1323 1327 # ABSCHLIESSENDE ARBEITEN1324 # FINAL WORK 1328 1325 rm -f hosts_found_in_config_file 1329 1326 -
palm/trunk/SCRIPTS/mrun
r493 r503 1 1 #!/bin/ksh 2 # mrun - Plot-Shellskript2 # mrun - script for running PALM jobs 3 3 # $Id$ 4 4 5 # Prozedur zum Starten von Modellaeufen 6 7 # letzte Aenderung: 5 # Procedure for interactive/batch PALM runs (initial runs and automatic 6 # restart runs) 7 8 # Last changes: 8 9 # 03/03/94 - Siggi - Entwicklungsbeginn 9 10 # 21/03/94 - Siggi - Entwicklungsabschluss (Version 1.0) … … 200 201 # 08/02/10 - Siggi - loading of modules now controlled via configuration 201 202 # file (modules) 203 # 02/03/10 - Siggi - for each block in the configuration file, separate 204 # utility programs are used, combine_plot_fields is 205 # directly called and must not be given by an output 206 # command in the configuration file any more 202 207 203 208 … … 671 676 locat=options; exit 672 677 fi 678 block=_$cond1 679 [[ -n $cond2 ]] && block=${block}_$cond2 673 680 fi 674 681 … … 973 980 /home/COAR/NC/raasch/pub/interpret_config_necriam.x 974 981 else 975 interpret_config.x 982 983 if [[ "$host" != $localhost ]] 984 then 985 986 # REMOTE JOB FROM LOCAL HOST: JUST TAKE THE FIRST EXECUTABLE FOUND 987 interpret_config_executable=`ls -1 ${PALM_BIN}/interpret_config*.x 2>/dev/null` 988 if [[ $? != 0 ]] 989 then 990 printf "\n\n +++ no interpret_config found" 991 printf "\n run \"mbuild -u -h ...\" to generate utilities for this host" 992 locat=interpret_config; exit 993 fi 994 interpret_config_executable=`echo $interpret_config_executable | cut -d" " -f1` 995 $interpret_config_executable 996 997 else 998 999 # CHECK, IF THERE IS AN EXECUTABLE FOR THE BLOCK 1000 if [[ ! -f ${PALM_BIN}/interpret_config${block}.x ]] 1001 then 1002 printf "\n\n +++ no interpret_config found for given block \"$cond1 $cond2\"" 1003 printf "\n run \"mbuild -u -h ...\" to generate utilities for this block" 1004 locat=interpret_config; exit 1005 else 1006 interpret_config${block}.x 1007 fi 1008 1009 fi 976 1010 fi 977 1011 rm .mrun_environment … … 3355 3389 fi 3356 3390 3357 # if [[ $scirocco = true ]]3358 # then3359 # mpiexec -machinefile hostfile -n $ii a.out $ROPTS3360 # else3361 # mpirun -machinefile hostfile -np $ii a.out $ROPTS3362 # fi3363 3391 fi 3364 3392 elif [[ $host = decalpha ]] … … 3470 3498 3471 3499 fi 3500 fi 3501 3502 3503 3504 # Call of combine_plot_fields in order to merge single files written 3505 # by each PE into one file. 3506 if [[ ! -f ${PALM_BIN}/combine_plot_fields${block}.x ]] 3507 then 3508 printf "\n\n\n +++ WARNING: no combine_plot_fields found for given block \"$cond1 $cond2\"" 3509 printf "\n 2d- and/or 3d-data may be incomplete!" 3510 printf "\n Run \"mbuild -u -h $localhost\" to generate utilities for this block.\n" 3511 else 3512 printf "\n\n\n *** post-processing: now executing \"combine_plot_fields${block}.x\" ..." 3513 combine_plot_fields${block}.x 3472 3514 fi 3473 3515
Note: See TracChangeset
for help on using the changeset viewer.