Changeset 2295 for palm/trunk/SCRIPTS


Ignore:
Timestamp:
Jun 27, 2017 2:25:52 PM (7 years ago)
Author:
raasch
Message:

script adjustments for using lcgeohu, cpp_opts removed

Location:
palm/trunk/SCRIPTS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/mrun

    r2290 r2295  
    2727# -----------------
    2828# $Id$
     29# adjustments for using lcgeohu (cirrus @ HUB)
     30# cpp_opts removed
     31#
     32# 2290 2017-06-19 11:03:06Z raasch
    2933# further test output removed
    3034#
     
    278282 coupled_dist=""
    279283 coupled_mode="mpi1"
    280  cpp_opts=""
    281284 cpp_options=""
    282285 cpumax=0
     
    465468    # READ SHELLSCRIPT-OPTIONS AND REBUILD THE MRUN-COMMAND STRING (MC),
    466469    # WHICH WILL BE USED TO START RESTART-JOBS
    467  while  getopts  :a:bBc:Cd:D:Fg:G:h:H:i:kK:m:M:n:o:O:p:P:q:r:R:s:St:T:u:U:vw:xX:yY:zZ option
     470 while  getopts  :a:bBc:Cd:Fg:G:h:H:i:kK:m:M:n:o:O:p:P:q:r:R:s:St:T:u:U:vw:xX:yY:zZ option
    468471 do
    469472   case  $option  in
     
    522525 then
    523526   (printf "\n  *** mrun can be called as follows:\n"
    524     printf "\n      $mrun_script_name  -b -c.. -d.. -D.. -f.. -F -h.. -i.. -I -K.. -m.. -o.. -p.. -r.. -R -s.. -t.. -T.. -v -x -X.. -y -Y.. -Z <modus> \n"
     527    printf "\n      $mrun_script_name  -b -c.. -d.. -f.. -F -h.. -i.. -I -K.. -m.. -o.. -p.. -r.. -R -s.. -t.. -T.. -v -x -X.. -y -Y.. -Z <modus> \n"
    525528    printf "\n      Description of available options:\n"
    526529    printf "\n      Option  Description                              Default-Value"
     
    530533    printf "\n        -c    configuration file                       .mrun.config"
    531534    printf "\n        -d    base name of files attached to program   test"
    532     printf "\n        -D    preprocessor(cpp)-directives             \"\" "
    533535    printf "\n        -F    create remote job file only              ---"
    534536    printf "\n        -h    execution host                           $localhost_realname"
     
    657659    do_remote=true
    658660    case  $host  in
    659         (ibm|ibmh|ibmkisti|ibmku|ibms|lcbullhh|lccrayb|lccrayh|lccrayf|lceddy|lckyoto|lcocean|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb)  true;;
     661        (ibm|ibmh|ibmkisti|ibmku|ibms|lcbullhh|lccrayb|lccrayh|lccrayf|lceddy|lckyoto|lcocean|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb|lcgeohu)  true;;
    660662        (*)  printf "\n"
    661663             printf "\n  +++ sorry: execution of batch jobs on remote host \"$host\""
     
    800802                   do_remote=true
    801803                   case  $host  in
    802                        (ibm|ibmh|ibmkisti|ibmku|ibms|lcbullhh|lccrayb|lccrayh|lccrayf|lceddy|lckyoto|lcocean|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb)  true;;
     804                       (ibm|ibmh|ibmkisti|ibmku|ibms|lcbullhh|lccrayb|lccrayh|lccrayf|lceddy|lckyoto|lcocean|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb|lcgeohu)  true;;
    803805                       (*)  printf "\n  +++ sorry: execution of batch jobs on remote host \"$host\""
    804806                            printf "\n      is not available"
     
    10641066    do_remote=true
    10651067    case  $host  in
    1066         (ibm|ibmh|ibmkisti|ibmku|ibms|lcbullhh|lccrayb|lccrayh|lccrayf|lceddy|lckyoto|lcocean|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb)  true;;
     1068        (ibm|ibmh|ibmkisti|ibmku|ibms|lcbullhh|lccrayb|lccrayh|lccrayf|lceddy|lckyoto|lcocean|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb|lcgeohu)  true;;
    10671069        (*)  printf "\n"
    10681070             printf "\n  +++ sorry: execution of batch jobs on remote host \"$host\""
     
    12021204        (lccrayb)    queue=mpp1q;;
    12031205        (lccrayh)    queue=mpp1q;;
     1206        (lcgeohu)    queue=short;;
    12041207        (lckiaps)    queue=normal;;
    12051208        (lckyoto)    queue=ph;;
     
    18161819    fi
    18171820
    1818        # SET DIRECTIVES GIVEN BY OPTION -D
    1819     if [[ -n $cpp_opts ]]
    1820     then
    1821        for  popts  in  $cpp_opts
    1822        do
    1823           if [[ $(echo $localhost | cut -c1-3) = ibm ]]
    1824           then
    1825              cpp_options="${cpp_options},-D__$popts=__$popts"
    1826           else
    1827              cpp_options="$cpp_options -D__$popts"
    1828           fi
    1829        done
    1830     fi
    1831 
    18321821 else
    18331822
     
    23902379          then
    23912380             make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$fopts"  LDFLAGS="$lopts"
    2392           elif [[ $localhost = lceddy ]]
    2393           then
    2394              which mpifc
     2381          elif [[ $localhost = lceddy ]]
     2382          then
     2383             which mpifc
    23952384             make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$fopts"  LDFLAGS="$lopts"
     2385          elif [[ $localhost = lcgeohu ]]
     2386          then
     2387             printf "      compiler is called via ssh on \"cirrus\" \n"
     2388             ssh  $SSH_PORTOPT  cirrus.geo.hu-berlin.de -l $usern "$init_cmds $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" "
     2389#             this check did not work. Although a.out exists, it sets compile_error to true!
     2390#             [[ ! -f a.out ]]  &&  compile_error=true
     2391             continue   # STATUS=1, IF a.out EXISTS
    23962392          else
    23972393             [[ "$init_cmds" != "" ]]  &&  eval $init_cmds
     
    29482944                   then
    29492945                      echo $ii
    2950                       echo $tasks_per_node
    2951                       echo $nodes
     2946                      echo $tasks_per_node
     2947                      echo $nodes
    29522948                      mpirun -n $ii a.out  <  runfile_atmos
     2949                   elif [[ $host = lcgeohu ]]
     2950                   then
     2951                       srun -n $ii a.out  <  runfile_atmos
    29532952                   elif [[ $host = lcocean ]]
    29542953                   then
     
    35333532       then
    35343533
    3535           if [[ $localhost = lcbullhh  ||  $localhost = lccrayb  ||  $localhost = lccrayh  ||  $localhost = ibmh  ||  $localhost = ibmkisti  ||  $localhost = ibmku  ||  $localhost = ibms  ||  $localhost = lceddy  ||  $localhost = lckyu*  ||  $localhost = lcxe6 ]]
     3534          if [[ $localhost = lcbullhh  ||  $localhost = lccrayb  ||  $localhost = lccrayh  ||  $localhost = ibmh  ||  $localhost = ibmkisti  ||  $localhost = ibmku  ||  $localhost = ibms  ||  $localhost = lceddy  ||  $localhost = lckyu*  ||  $localhost = lcxe6  ||  $localhost = lcgeohu ]]
    35363535          then
    35373536             echo "*** ssh will be used to initiate restart-runs!"
     
    35743573                then
    35753574                   ssh $usern@hlogin1 "ssh $SSH_PORTOPT $return_address -l $return_username \"PATH=\\\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
     3575                elif [[ $localhost = lccgeohu ]]
     3576                then
     3577                   ssh $usern@cirrus.geo.hu-berlin.de "ssh $SSH_PORTOPT $return_address -l $return_username \"PATH=\\\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
    35763578                else
    35773579                   ssh $SSH_PORTOPT $return_address -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc "
     
    36663668       # BUILD THE MRUN-COMMAND TO BE CALLED IN THE BATCH-JOB ON THE REMOTE-MACHINE
    36673669    mrun_com="$mrun_script_name -a $afname -c $config_file -d $fname -h $host -H $fromhost -m $memory -t $cpumax -q $queue -R $return_address -U $return_username -u $remote_username"
    3668     [[ "$cpp_opts" != "" ]]       &&  mrun_com=${mrun_com}" -D \"$cpp_opts\""
    36693670    [[ "$global_revision" != "" ]]  &&  mrun_com=${mrun_com}" -G \"$global_revision\""
    36703671    [[ $group_number != none ]]   &&  mrun_com=${mrun_com}" -g $group_number"
     
    37723773       #              THIS MAY CREATE A QUITE LARGE JOB-FILE, WHICH CAN CAUSE PROBLEMS WITH SOME
    37733774       #              QUEUEING-SYSTEMS
    3774     if [[ $host = ibmkisti  ||  $host = lcbullhh  ||  $host = lccrayb  ||  $host = lccrayf  ||  $host = lccrayh  ||  $host = lcocean ]]
     3775    if [[ $host = ibmkisti  ||  $host = lcbullhh  ||  $host = lccrayb  ||  $host = lccrayf  ||  $host = lccrayh  ||  $host = lcocean  ||  $host = lcgeohu ]]
    37753776    then
    37763777
  • palm/trunk/SCRIPTS/subjob

    r2266 r2295  
    2828# -----------------
    2929# $Id$
     30# adjustments for using lcgeohu (cirrus @ HUB)
     31#
     32# 2266 2017-06-09 09:27:21Z raasch
    3033# nech related parts removed
    3134#
     
    279282     (vorias)                local_address=172.20.25.43;   local_host=lcmuk;;
    280283     (*.cc.kyushu-u.ac.jp)   local_address=133.5.4.129;    local_host=ibmku;;
     284     (*.cluster)             local_address=192.168.1.254;  local_host=lcgeohu;;
    281285     (*)                     printf "\n  +++ \"$local_host\" unknown";
    282286                             printf "\n      please contact the PALM group at IMUK";
     
    410414        (lccrayf) queue=small; remote_address=86.50.166.21; submcom=/opt/slurm/default/bin/sbatch;;
    411415        (lceddy)  remote_address=eddy.hpc.uni-oldenburg.de; submcom=sbatch;;
     416        (lcgeohu) remote_address=cirrus.geo.hu-berlin.de; submcom=sbatch;;
    412417        (lckyoto) remote_address=133.3.51.11; submcom=/thin/local/bin/qsub;;
    413418        (lck)     remote_address=165.132.26.61; submcom=/usr/torque/bin/qsub;;
     
    964969    fi
    965970
     971 elif [[ $remote_host = lcgeohu ]]
     972 then
     973
     974    if [[ $email_notification = none ]]
     975    then
     976       notify_user=""
     977    else
     978       notify_user="#SBATCH --mail-type=ALL"
     979    fi
     980
     981    if [[ $numprocs != 0 ]]
     982    then
     983       cat > $job_to_send << %%END%%
     984#!/bin/bash
     985#SBATCH --job-name=$job_name
     986#SBATCH --ntasks=$processes_per_node
     987#SBATCH --time=$timestring
     988#SBATCH --output=$remote_dayfile
     989#SBATCH --error=$remote_dayfile
     990#SBATCH --qos=short
     991$notify_user
     992
     993$init_cmds
     994$module_calls
     995
     996%%END%%
     997
     998    else
     999       cat > $job_to_send << %%END%%
     1000#!/bin/bash
     1001#SBATCH --job-name=$job_name
     1002#SBATCH --ntasks=$processes_per_node
     1003#SBATCH --output=$remote_dayfile
     1004#SBATCH --error=$remote_dayfile
     1005#SBATCH -l ncpus=1
     1006
     1007$init_cmds
     1008$module_calls
     1009
     1010%%END%%
     1011
     1012    fi
     1013
    9661014 elif [[ $remote_host = lckiaps ]]
    9671015 then
     
    12231271    echo "trap '"                               >>  $job_to_send
    12241272    echo "set +vx"                              >>  $job_to_send
    1225     if [[ $(echo $remote_host | cut -c1-3) = ibm  ||  $remote_host = lcbullhh  ||  $remote_host = lccrayb  ||  $remote_host = lccrayh  ||  $(echo $remote_host | cut -c1-3) = nec  ||  $remote_host = lckiaps  ||  $remote_host = lckyu* || $remote_host = lcxe6  ||  $remote_host = lcocean ]]
     1273    if [[ $(echo $remote_host | cut -c1-3) = ibm  ||  $remote_host = lcbullhh  ||  $remote_host = lccrayb  ||  $remote_host = lccrayh  ||  $(echo $remote_host | cut -c1-3) = nec  ||  $remote_host = lckiaps  ||  $remote_host = lckyu* || $remote_host = lcxe6  ||  $remote_host = lcocean  || $remote_host = lcgeohu ]]
    12261274    then
    12271275       if [[ $remote_host = ibmh ]]
     
    13981446          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
    13991447          echo "%%END%%"                                 >>  $job_to_send
     1448
     1449       elif [[ $remote_host = lcgeohu ]]
     1450       then
     1451          echo "cat > scpjob.$identifier << %%END%%"        >>  $job_to_send
     1452          echo "#!/bin/bash"                             >>  $job_to_send
     1453          echo "#SBATCH --job-name=job_protocol_transfer" >>  $job_to_send
     1454          echo "#SBATCH -t 00:20:00"                     >>  $job_to_send
     1455          echo "#SBATCH -N 1"                            >>  $job_to_send
     1456          echo "#SBATCH -n 1"                            >>  $job_to_send
     1457          echo "#SBATCH -o \$HOME/job_queue/last_job_transfer_protocol"      >>  $job_to_send
     1458          echo "#SBATCH -o $remote_dayfile"              >>  $job_to_send
     1459          echo "#SBATCH -e $remote_dayfile"              >>  $job_to_send
     1460          echo " "                                       >>  $job_to_send
     1461          echo "set -x"                                  >>  $job_to_send
     1462          echo "sbatch  scpjob.$identifier"              >>  $job_to_send
     1463          echo "%%END%%"                                 >>  $job_to_send
     1464
    14001465       else
    14011466
     
    14971562          job_catalog_save=$job_catalog
    14981563          job_catalog=job_queue
     1564       elif [[ $remote_host = lcgeohu ]]
     1565       then
     1566          job_catalog_save=$job_catalog
     1567          job_catalog=/home/${remote_user}/job_queue
    14991568       fi
    15001569       scp  $ssh_key  $PORTOPT  $job_to_send  ${remote_user}@${remote_address}:${job_catalog}/$job_on_remhost
     
    15031572          locat=scp; exit
    15041573       fi
    1505        if [[ $remote_host = ibms ]]
     1574       if [[ $remote_host = ibms  ||  $remote_host = lcgeohu ]]
    15061575       then
    15071576          job_catalog=$job_catalog_save
     
    15231592       then
    15241593          ssh  $SSH_PORTOPT $remote_address  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost"
     1594       elif [[ $remote_host = lcgeohu ]]
     1595       then
     1596          ssh  $ssh_key  $SSH_PORTOPT $remote_address  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost"
    15251597       else
    15261598          ssh  $ssh_key  $SSH_PORTOPT $remote_address  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost"
     
    15301602    else
    15311603       cd  $job_catalog
    1532        if [[ $(echo $local_host | cut -c1-3) = ibm  ||  $(echo $local_host | cut -c1-6) = lccray || $local_host = lceddy ]]
     1604       if [[ $(echo $local_host | cut -c1-3) = ibm  ||  $(echo $local_host | cut -c1-6) = lccray || $local_host = lceddy || $local_host = lcgeohu ]]
    15331605       then
    15341606          eval  $submcom  $job_on_remhost
     
    15491621          # JOBFILE MUST NOT BE DELETED ON lctit/ibmku. THIS WILL BE DONE
    15501622          # AT THE END OF THE JOB
    1551        if [[ $local_host != lctit  &&  $local_host != ibmku ]]
     1623       if [[ $local_host != lctit  &&  $local_host != ibmku  &&  $local_host != lcgeohu ]]
    15521624       then
    15531625          rm  $job_on_remhost
Note: See TracChangeset for help on using the changeset viewer.