Changeset 493 for palm/trunk/SCRIPTS
- Timestamp:
- Mar 1, 2010 8:30:24 AM (15 years ago)
- Location:
- palm/trunk/SCRIPTS
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/mbuild
r492 r493 113 113 # removed, t3e related parts removed 114 114 # 26/02/10 - BjornM- re-adjustments for lcxt4 (new modules) 115 # 01/03/10 - Siggi - mpilib replaced by modules: explicit module settings 116 # removed; modules should now be given in the 117 # configuration file 115 118 116 119 … … 124 127 locat=normal 125 128 makefile="" 129 module_calls="" 126 130 scirocco=false 127 131 silent=false … … 460 464 fi 461 465 466 modules="" 462 467 netcdf_inc="" 463 468 netcdf_lib="" … … 798 803 799 804 800 # MPI LIBRARY ERMITTELN805 # get modules to be load 801 806 line="" 802 found=false 803 grep "$remote_host_string" $config_file | grep "%mpilib" > $tmp_mbuild 807 grep "$remote_host_string" $config_file | grep "%modules" > $tmp_mbuild 804 808 while read line1 805 809 do … … 813 817 then 814 818 # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN 815 mpilib=`echo $line | cut -d" " -s -f2` 816 found=true 819 modules=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'` 817 820 fi 818 821 819 822 done < $tmp_mbuild 820 821 [[ $found = false ]] && mpilib=mpt822 823 823 824 … … 918 919 line=$(echo "$line" | cut -c51-) 919 920 done 920 if [[ $( echo $remote_host | cut -c1-5 ) = lcsgi ]]921 then922 column1="mpi library:"; column2=$mpilib923 printf "| $column1$column2 | \n"924 fi925 921 column1="loader options:"; column2=$loader_options 926 922 printf "| $column1$column2 | \n" … … 933 929 line=$(echo "$line" | cut -c51-) 934 930 done 931 if [[ $modules != "" ]] 932 then 933 column1="modules to be load:"; column2=$modules 934 printf "| $column1$column2 | \n" 935 line=$(echo "$modules" | cut -c51-) 936 while [[ "$line" != "" ]] 937 do 938 column1="" 939 column2=$line 940 printf "| $column1$column2 | \n" 941 line=$(echo "$line" | cut -c51-) 942 done 943 fi 935 944 printf "#------------------------------------------------------------------------# \n" 936 945 … … 1020 1029 echo " *** execute \"make\" on remote host" 1021 1030 1031 1032 # generate make call with make options 1022 1033 if [[ $remote_host = nech ]] 1023 1034 then … … 1027 1038 fi 1028 1039 1040 # generate command to load modules, if modules are given 1041 if [[ "$modules" != "" ]] 1042 then 1043 module_calls="module load ${modules};" 1044 fi 1045 1029 1046 if [[ $remote_host = ibms || $remote_host = ibmy ]] 1030 1047 then 1031 1048 1032 ssh ${remote_username}@${remote_addres} " cd ${remote_md}; echo '$make_call_string' > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" 2>&1 | tee ${remote_host}_last_make_protokoll1049 ssh ${remote_username}@${remote_addres} "$module_calls cd ${remote_md}; echo '$make_call_string' > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" 2>&1 | tee ${remote_host}_last_make_protokoll 1033 1050 1034 1051 elif [[ $remote_host = ibmh ]] 1035 1052 then 1036 1053 1037 print " export OBJECT_MODE=64; cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll1054 print "$module_calls export OBJECT_MODE=64; cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll 1038 1055 1039 1056 elif [[ $remote_host = lcsgib || $remote_host = lcsgih ]] 1040 1057 then 1041 1058 1042 print ". /usr/share/modules/init/bash; module load ifort/11.0.069; module load $mpilib; cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll 1043 # print ". /usr/share/modules/init/bash; module load mvapich2/1.2rc1-intel; cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll 1044 # print ". /usr/share/modules/init/bash; module load mvapich2; cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll 1059 print ". /usr/share/modules/init/bash; $module_calls cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll 1045 1060 1046 1061 elif [[ $remote_host = lctit ]] … … 1056 1071 then 1057 1072 1058 print ". /opt/modules/default/init/ksh; module load Base-opts; module load modules; module load pmi; module load pgi; module load PrgEnv-pgi;cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll1073 print ". /opt/modules/default/init/ksh; $module_calls cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll 1059 1074 1060 1075 else 1061 1076 1062 print "cd $ {remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll1077 print "cd $module_calls ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll 1063 1078 1064 1079 fi … … 1171 1186 fi 1172 1187 1188 # generate command to load modules, if modules are given 1189 if [[ "$modules" != "" ]] 1190 then 1191 module_calls="module load ${modules};" 1192 fi 1193 1173 1194 if [[ $remote_host = ibms || $remote_host = ibmy ]] 1174 1195 then 1175 1196 1176 ssh ${remote_username}@${remote_addres} " cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR"1197 ssh ${remote_username}@${remote_addres} "$module_calls cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" 1177 1198 1178 1199 elif [[ $remote_host = ibmh ]] 1179 1200 then 1180 1201 1181 print " export OBJECT_MODE=64; cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres}1202 print "$module_calls export OBJECT_MODE=64; cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres} 1182 1203 1183 1204 elif [[ $remote_host = lctit ]] … … 1187 1208 while [[ $(cat ${remote_host}_last_make_protokoll | grep -c "Forwarding to N1GE") = 0 ]] 1188 1209 do 1189 print " cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll1210 print "$module_calls cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll 1190 1211 done 1191 1212 … … 1193 1214 then 1194 1215 1195 print ". /opt/modules/default/init/ksh; module load Base-opts; module load modules; module load pmi; module load pgi; module load PrgEnv-pgi;cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll1216 print ". /opt/modules/default/init/ksh; $module_calls cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll 1196 1217 1197 1218 else 1198 1219 1199 print " cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll1220 print "$module_calls cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll 1200 1221 1201 1222 fi … … 1238 1259 echo " " 1239 1260 echo " *** execute \"make\" on local host" 1261 1262 # first load modules, if given 1263 if [[ "$modules" != "" ]] 1264 then 1265 module load ${modules} 1266 fi 1240 1267 1241 1268 make $make_options PROG=$mainprog F90=$compiler_name COPT="$cpp_options" F90FLAGS="$compiler_options" LDFLAGS="$loader_options" 2>&1 | tee ${remote_host}_last_make_protokoll -
palm/trunk/SCRIPTS/mrun
r475 r493 198 198 # 03/02/10 - Siggi - make options (mopts) to be set by configuration file 199 199 # implemented 200 # 08/02/10 - Siggi - loading of modules now controlled via configuration 201 # file (modules) 200 202 201 203 … … 261 263 mc=`echo $mc | cut -f2- -d"/"` 262 264 done 263 module_ files=""265 module_calls="" 264 266 mrun_script_name=$mc 265 267 netcdf_inc="" … … 2072 2074 2073 2075 2076 # set module load command and export for subjob 2077 if [[ "$modules" != "" ]] 2078 then 2079 export module_calls="module load ${modules};" 2080 fi 2081 2082 2074 2083 # SET DEFAULT VALUE FOR MPI MODULE TO BE USED ON SGI-ALTIX 2075 2084 if [[ $host = lcsgib || $host = lcsgih ]] 2076 2085 then 2077 [[ "$mpilib" = "" ]] && export mpilib=mpt 2086 if [[ $(echo $modules | grep -c mpt ) != 0 ]] 2087 then 2088 mpilib=mpt 2089 elif [[ $(echo $modules | grep -c mvapich ) != 0 ]] 2090 then 2091 mpilib=mvapich 2092 fi 2078 2093 fi 2079 2094 … … 2125 2140 if [[ "$mopts" != "" ]] 2126 2141 then 2127 spalte1= make-options:; spalte2=$mopts2142 spalte1="make options:"; spalte2=$mopts 2128 2143 printf "| $spalte1$spalte2 | \n" 2129 2144 zeile=$(echo "$mopts" | cut -c41-) … … 2137 2152 fi 2138 2153 2139 spalte1= cpp-directives:; spalte2=$cpp_options2154 spalte1="cpp directives:"; spalte2=$cpp_options 2140 2155 printf "| $spalte1$spalte2 | \n" 2141 2156 zeile=$(echo "$cpp_options" | cut -c41-) … … 2148 2163 done 2149 2164 2150 spalte1= compiler-options:; spalte2="$fopts"2165 spalte1="compiler options:"; spalte2="$fopts" 2151 2166 printf "| $spalte1$spalte2 | \n" 2152 2167 zeile=$(echo "$fopts" | cut -c41-) … … 2159 2174 done 2160 2175 2161 spalte1= linker-options:; spalte2=$lopts2176 spalte1="linker options:"; spalte2=$lopts 2162 2177 printf "| $spalte1$spalte2 | \n" 2163 2178 zeile=$(echo "$lopts" | cut -c41-) 2179 while [[ "$zeile" != "" ]] 2180 do 2181 spalte1="" 2182 spalte2=$zeile 2183 printf "| $spalte1$spalte2 | \n" 2184 zeile=$(echo "$zeile" | cut -c41-) 2185 done 2186 2187 spalte1="modules to be load:"; spalte2=$modules 2188 printf "| $spalte1$spalte2 | \n" 2189 zeile=$(echo "$modules" | cut -c41-) 2164 2190 while [[ "$zeile" != "" ]] 2165 2191 do … … 2300 2326 tmpcreate=true 2301 2327 2328 # set striping on lustre file system 2329 # if [[ $localhost = lcsgih ]] 2330 # then 2331 # lfs setstripe -s 8192k -c 16 $TEMPDIR 2332 # lfs getstripe $TEMPDIR 2333 # fi 2334 2302 2335 2303 2336 # SAEMTLICHE QUELLTEXT-DATEIEN BZW. AUSFUEHRBARES PROGRAMM IN … … 2430 2463 printf " compilername: $compiler_name\n" 2431 2464 printf " compiler options: $fopts\n" 2432 printf " preprocessor-directives: $cpp_options \n" 2433 printf " linker-options: $lopts \n" 2465 printf " preprocessor directives: $cpp_options \n" 2466 printf " linker options: $lopts \n" 2467 if [[ "$modules" != "" ]] 2468 then 2469 printf " modules to be load: $modules \n" 2470 fi 2434 2471 printf " source code files: $source_list \n" 2435 2472 2436 2473 if [[ $localhost = nech ]] 2437 2474 then 2438 ssh 136.172.44.192 -l $usern ". /SX/opt/etc/initsx.sh; cd \$HOME/work/${usern}.$kennung; sxmake $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" "2475 ssh 136.172.44.192 -l $usern ". /SX/opt/etc/initsx.sh; $module_calls cd \$HOME/work/${usern}.$kennung; sxmake $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" " 2439 2476 cp $TEMPDIR_COMPILE/a.out . 2440 2477 [[ $? != 0 ]] && compile_error=true … … 2443 2480 then 2444 2481 printf " compiler is called via ssh on \"plogin1\" \n" 2445 ssh plogin1 -l $usern "export PATH=/sw/ibm/xlf/12.1.0.3/usr/bin:$PATH; cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" "2482 ssh plogin1 -l $usern "export PATH=/sw/ibm/xlf/12.1.0.3/usr/bin:$PATH; $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" " 2446 2483 [[ ! -f a.out ]] && compile_error=true 2447 2484 continue # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN 2448 2485 elif [[ $localhost = lcsgib ]] 2449 2486 then 2450 printf " compiler is called via ssh on \"bicegate\" using module \"$mpilib\"\n"2451 ssh 130.73.232.103 -l $usern ". /usr/share/modules/init/bash; module load ifort/11.0.069; module load $mpilib;cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" "2487 printf " compiler is called via ssh on \"bicegate\" \n" 2488 ssh 130.73.232.103 -l $usern ". /usr/share/modules/init/bash; $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" " 2452 2489 [[ ! -f a.out ]] && compile_error=true 2453 2490 continue # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN 2454 2491 elif [[ $localhost = lcsgih ]] 2455 2492 then 2456 printf " compiler is called via ssh on \"hicegate2\" using module \"$mpilib\"\n"2457 ssh 130.75.4.103 -l $usern ". /usr/share/modules/init/bash; module load ifort/11.0.069; module load $mpilib;cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" 2>&1 "2493 printf " compiler is called via ssh on \"hicegate2\" \n" 2494 ssh 130.75.4.103 -l $usern ". /usr/share/modules/init/bash; $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" 2>&1 " 2458 2495 [[ ! -f a.out ]] && compile_error=true 2459 2496 continue # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN 2460 2497 else 2461 2498 [[ $localhost = lctit ]] && export LM_LICENSE_FILE=27050@tggls 2499 [[ "$module_calls" != "" ]] && eval $module_calls 2462 2500 make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT="$cpp_options" F90FLAGS="$fopts" LDFLAGS="$lopts" 2463 2501 fi -
palm/trunk/SCRIPTS/subjob
r492 r493 115 115 # 26/02/10 - BjornM- re-adjustments for lcxt4 (new modules, email 116 116 # notification) 117 # 01/03/10 - Siggi - loading of modules controlled by environment variable 118 # module_calls 119 117 120 118 121 … … 815 818 816 819 . /usr/share/modules/init/bash 817 module load ifort/11.0.069 818 module load $mpilib 819 module load netcdf 820 $module_calls 820 821 821 822 echo ld_library_path=\$LD_LIBRARY_PATH … … 835 836 836 837 . /usr/share/modules/init/bash 837 module load ifort/11.0.069 838 module load netcdf 838 $module_calls 839 839 840 840 %%END%% … … 861 861 862 862 . /opt/modules/default/init/ksh 863 module load modules 864 module load PrgEnv-pgi 865 module load Base-opts 866 module load moab 867 module load torque 868 module load pmi 863 $module_calls 869 864 870 865 %%END%% … … 885 880 886 881 . /opt/modules/default/init/ksh 887 module load modules 888 module load PrgEnv-pgi 889 module load Base-opts 890 module load moab 891 module load torque 892 module load pmi 882 $module_calls 893 883 894 884 %%END%% … … 938 928 939 929 . /opt/modules/default/init/ksh 940 module load modules/3.1.6 941 module load netcdf/3.6.2 942 module load PrgEnv-pgi/2.2.41 943 module load Base-opts/2.2.41 930 $module_calls 944 931 945 932 %%END%% … … 958 945 959 946 . /opt/modules/default/init/ksh 960 module load modules/3.1.6 961 module load netcdf/3.6.2 962 module load PrgEnv-pgi/2.2.41 963 module load Base-opts/2.2.41 947 $module_calls 964 948 965 949 %%END%%
Note: See TracChangeset
for help on using the changeset viewer.