Changeset 493 for palm/trunk/SCRIPTS/mbuild
- Timestamp:
- Mar 1, 2010 8:30:24 AM (15 years ago)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.