Ignore:
Timestamp:
May 2, 2012 1:51:44 PM (12 years ago)
Author:
maronga
Message:

bugfixes in parameter file check, adapted for lcxe6 (was lcxt4), new mrun.config parameter %login_init_cmd introduced

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/mbuild

    r818 r892  
    130130     # 08/03/12 - BjornM- bugfix: cpp directive for namelist check program
    131131     #                    corrected
    132 
     132     # 02/05/12 - Bjoern  - lcxt4 is now lcxe6, adjustments for lcxe6,
     133     #                      bugfixes for the parameter file check, initial
     134     #                      commands on ssh calls sourced out to .mrun.config
    133135
    134136
     
    511513        (lck)            remote_addres=165.132.26.61;;
    512514        (lctit)          remote_addres=10.1.6.170;;
    513         (lcxt4)          remote_addres=129.177.20.113;;
     515        (lcxe6)          remote_addres=129.177.20.113;;
    514516        (lcxt5m)         remote_addres=193.166.211.144;;
    515517        (decalpha)       remote_addres=165.132.26.56;;
     
    842844
    843845
     846       # get login init commands, "::" is replacing a space
     847    line=""
     848    grep  "$remote_host_string" $config_file | grep "%login_init_cmd"  >  $tmp_mbuild
     849    while read line1
     850    do
     851
     852       if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
     853       then
     854          line="$line1"
     855       fi
     856
     857       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
     858       then
     859             # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN
     860          init_cmds=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
     861       fi
     862       init_cmds="${init_cmds};"
     863    done < $tmp_mbuild
     864
    844865
    845866       # get modules to be loaded
     
    861882
    862883    done < $tmp_mbuild
    863 
    864 
    865884
    866885
     
    10111030    if [[ $remote_host != $local_host ]]
    10121031    then
    1013 
    10141032       if [[ $compile_utility_programs = false ]]
    10151033       then
     
    11031121          then
    11041122
    1105              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
     1123             ssh  ${remote_username}@${remote_addres}  "$init_cmds $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
    11061124
    11071125          elif [[ $remote_host = ibmh ]]
    11081126          then
    11091127
    1110              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
     1128             print "$init_cmds $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
    11111129
    11121130          elif [[ $remote_host = lcsgib  ||  $remote_host = lcsgih ]]
    11131131          then
    1114 
    11151132#             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
    1116              print "eval \`/sw/swdist/bin/modulesinit\`; $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
     1133             print "$init_cmds $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
    11171134
    11181135          elif [[ $remote_host = lctit ]]
     
    11251142             done
    11261143
    1127           elif [[ $remote_host = lcxt4 ]]
    1128           then
    1129 
    1130              ssh  ${remote_username}@${remote_addres} ". /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" 2>&1 | tee ${remote_host}_last_make_protokoll
    1131 
    1132           else
    1133 
    1134              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
     1144          elif [[ $remote_host = lcxe6 ]]
     1145          then
     1146
     1147             ssh  ${remote_username}@${remote_addres} "$init_cmds $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
     1148
     1149          else
     1150
     1151             print "$init_cmds $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
    11351152
    11361153          fi
     
    12651282          fi
    12661283
     1284
    12671285          if [[ $remote_host = ibms  ||  $remote_host = ibmy ]]
    12681286          then
    12691287
    1270              ssh  ${remote_username}@${remote_addres}  "$module_calls cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR"
     1288             ssh  ${remote_username}@${remote_addres}  "$init_cmds $module_calls cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR"
    12711289
    12721290          elif [[ $remote_host = ibmh ]]
    12731291          then
    12741292
    1275              print "$module_calls export OBJECT_MODE=64; cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres}
     1293             print "$init_cmds $module_calls export OBJECT_MODE=64; cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres}
    12761294
    12771295          elif [[ $remote_host = lctit ]]
     
    12811299             while [[ $(cat ${remote_host}_last_make_protokoll | grep -c "Forwarding to N1GE") = 0 ]]
    12821300             do
    1283                 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
     1301                print "$init_cmds $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
    12841302             done
    12851303
    1286           elif [[ $remote_host = lcxt4 ]]
    1287           then
    1288 
    1289              ssh  ${remote_username}@${remote_addres} ". /opt/modules/default/init/ksh; $module_calls cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" 2>&1 | tee ${remote_host}_last_make_protokoll
    1290 
    1291           else
    1292 
    1293              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
     1304          elif [[ $remote_host = lcxe6 ]]
     1305          then
     1306
     1307             ssh  ${remote_username}@${remote_addres} "$init_cmds $module_calls cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" 2>&1 | tee ${remote_host}_last_make_protokoll
     1308
     1309          else
     1310
     1311             print "$init_cmds $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
    12941312
    12951313          fi
     
    13021320    else
    13031321
    1304           # workaround for lcxt4
    1305        if [[ $remote_host = lcxt4 ]]
    1306        then
    1307           . /opt/modules/default/init/ksh
     1322          # workaround for lcxe6
     1323       if [[ $remote_host = lcxe6 ]]
     1324       then
     1325          $init_cmds
    13081326       fi
    13091327
     
    14151433             echo "  *** compiling check_namelist_files ..."
    14161434
     1435             # GET CHECK OPTIONS
     1436             line=""
     1437             found=false
     1438             grep  "$remote_host_string" $config_file | grep "%cpp_options"  >  $tmp_mbuild
     1439             while read line1
     1440             do
     1441
     1442                if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]]
     1443                then
     1444                   line="$line1"
     1445                fi
     1446
     1447                if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
     1448                then
     1449                   # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING UND ALLE -D ENTFERNEN
     1450                   line="$line "
     1451                   copts_check=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g' | sed 's/-D[^ ]* //g' | sed 's/ -D.*//g'`
     1452                   found=true
     1453                fi
     1454
     1455             done < $tmp_mbuild
     1456             copts_check="$copts_check -D__check -D__parallel"
     1457
    14171458             check_depository_path=${local_source_path}/../UTIL
    14181459             cd $check_depository_path
     
    14231464             rm -rf ${mainprog}_sources_check.tar
    14241465
    1425              copts_check="-cpp -D__parallel -D__check"
    1426              make  -f Makefile_check $make_options F90=$compiler_name_ser  COPT="$copts_check"
    1427 
     1466             make  -f Makefile_check $make_options  F90=$compiler_name_ser  COPT="$copts_check"
    14281467             tar -cf  check_namelist_files.tar Makefile_check check_namelist_files.x *.f90 *.o *.mod
    14291468             mv check_namelist_files.tar $check_depository_path
Note: See TracChangeset for help on using the changeset viewer.