Changeset 1103


Ignore:
Timestamp:
Feb 20, 2013 2:15:53 AM (11 years ago)
Author:
raasch
Message:

small bugfixes; mrun and subjob scripts are made bash compatible; further adjustments for lckyuh

Location:
palm/trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/mrun

    r1102 r1103  
    1 #!/bin/bash
     1#!/bin/ksh
    22
    33# mrun - script for running PALM jobs
     
    2222# Current revisions:
    2323# ------------------
    24 #
     24# default script runs again under ksh, because of unsolved problems with read
     25# from stdin: when bash script is called from a ksh, message "read error: 0:
     26# Resource temporarily unavailable" appears and script does not stop,
     27# further bash compatibility adjustments,
     28# shebang line replaced by /bin/bash when running jobs on lckyuh; no restarts
     29# on lckyuh, but mrun does not terminate and issues a warning instead
    2530#
    2631# Former revisions:
     
    151156 if [[ `hostname` = rte10 ]]
    152157 then
    153    return_addres=133.5.185.60
    154    echo "+++ WARNING: fixed return_addres = $return_addres is used !!!!!"
     158    return_addres=133.5.185.60
     159    echo "+++ WARNING: fixed return_addres = $return_addres is used !!!!!"
    155160 elif [[ `hostname` = climate0 ]]
    156161 then
    157    return_addres=165.132.26.68
    158    echo "+++ WARNING: fixed return_addres = $return_addres is used !!!!!"
     162    return_addres=165.132.26.68
     163    echo "+++ WARNING: fixed return_addres = $return_addres is used !!!!!"
    159164 elif [[ `hostname` = urban00 ]]
    160165 then
    161    return_addres=147.46.30.151
    162    echo "+++ WARNING: fixed return_addres = $return_addres is used !!!!!"
     166    return_addres=147.46.30.151
     167    echo "+++ WARNING: fixed return_addres = $return_addres is used !!!!!"
    163168 else
    164169    return_addres=$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}')
     
    14941499
    14951500             # QUELLTEXT-DATEI DARF KEINE PFADE BEINHALTEN
    1496           if [[ $(print $filename | grep -c "/") != 0 ]]
     1501          if [[ $(echo $filename | grep -c "/") != 0 ]]
    14971502          then
    14981503             printf "\n  +++ source code file:  $filename"
     
    25992604    fi
    26002605 else
    2601     printf "\n\n  +++ skipping parameter file check due to following reason: $reason"
     2606    printf "\n\n  +++ skipping parameter file check due to following reason: $reason \n"
    26022607 fi
    26032608
     
    45774582             then
    45784583                ssh $SSH_PORTOPT $return_addres -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc "
     4584             elif [[ $localhost = lckyuh ]]
     4585             then
     4586                printf "\n  +++ WARNING: no restart mechanism available for host \"$localhost\" "
     4587                printf "\n               please restart job manually using command:\n"
     4588                printf "\n               \"$mc\" "
    45794589             else
    45804590                eval  $mc                # ' MUESSEN AUSGEWERTET WERDEN
     
    45824592             cd -  > /dev/null
    45834593          fi
    4584           printf "\n$striche\n  *** restart-run initiated \n"
     4594          if [[ $localhost = lckyuh ]]
     4595          then
     4596             printf "\n$striche\n  *** restart-run to be initiated manually\n"
     4597          else
     4598             printf "\n$striche\n  *** restart-run initiated \n"
     4599          fi
    45854600
    45864601
     
    48014816          # ABDECKZEICHEN VERHINDERN, DASS ERSETZUNGEN ERFOLGEN
    48024817       echo  "cat > $mrun_script_name <<\"%END%\""  >>  $jobfile
    4803        cat   ${PALM_BIN}/$mrun_script_name          >>  $jobfile
     4818       if [[ $host = lckyuh ]]
     4819       then
     4820          sed 's/\/bin\/ksh/\/bin\/bash/g' ${PALM_BIN}/$mrun_script_name  >>  $jobfile
     4821       else
     4822          cat  ${PALM_BIN}/$mrun_script_name        >>  $jobfile
     4823       fi
    48044824       echo  "%END%"                                >>  $jobfile
    48054825       echo  "chmod u+x $mrun_script_name"          >>  $jobfile
  • palm/trunk/SCRIPTS/subjob

    r1100 r1103  
    2323# Current revisions:
    2424# ------------------
    25 #
     25# bash compatibility adjustments (usage of OPTIND, output formatting with printf
     26# instead typeset -L/R),
     27# further adjustments for lckyuh
    2628#
    2729# Former revisions:
     
    7375 typeset  -i   cputime=0  memory=0  Memory=0  minuten  resttime  sekunden  stunden
    7476 typeset  -i   inumprocs  mpi_tasks=0  nodes=0  processes_per_node=0 tasks_per_node=0  threads_per_task=1
    75  typeset  -L20 spalte1
    76  typeset  -R40 spalte2
    77  typeset  -L60 spalte3
    7877
    7978
     
    123122     (bd4)                   local_addres=130.73.232.67;  local_host=lcsgib;;
    124123     (b01*|bicegate1)        local_addres=130.73.232.102; local_host=lcsgib;;
     124     (b04*)                  local_addres=133.5.4.33;     local_host=lckyuh;;
    125125     (bicegate2)             local_addres=130.73.232.103; local_host=lcsgib;;
    126126     (blizzard1)             local_addres=136.172.40.15;  local_host=ibmh;;
     
    220220
    221221    # JOBDATEINAMEN ALS NAECHSTES ARGUMENT HOLEN
    222  shift OPTIND-1; file_to_send=$1
     222 (( to_shift = $OPTIND - 1 ))
     223 shift $to_shift; file_to_send=$1
    223224
    224225
     
    525526    printf "#--------------------------------------------------------------# \n"
    526527    spalte1=SUBJOB;spalte2=$(date)
    527     printf "| $spalte1$spalte2 | \n"
     528    printf "| %-20s%40s | \n" "$spalte1" "$spalte2"
    528529    printf "|                                                              | \n"
    529530    printf "| values of parameters/options:                                | \n"
    530     spalte1=local_host$punkte; spalte2=$punkte$local_host
    531     printf "| $spalte1$spalte2 | \n"
    532     spalte1=remote_host$punkte; spalte2=$punkte$remote_host
    533     printf "| $spalte1$spalte2 | \n"
    534     spalte1=queue$punkte; spalte2=$punkte$queue
    535     printf "| $spalte1$spalte2 | \n"
    536     spalte1=memory$punkte; spalte2="$punkte$memory mb"
    537     printf "| $spalte1$spalte2 | \n"
    538     spalte1=cputime$punkte; spalte2="$punkte$cputime sec"
    539     printf "| $spalte1$spalte2 | \n"
    540     spalte1=job_name$punkte; spalte2="$punkte$job_name"
    541     printf "| $spalte1$spalte2 | \n"
     531    spalte1=$(echo local_host$punkte | cut -c-20)
     532    spalte2=$punkte$local_host
     533    printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}"
     534    spalte1=$(echo remote_host$punkte | cut -c-20)
     535    spalte2=$punkte$remote_host
     536    printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}"
     537    spalte1=$(echo queue$punkte | cut -c-20)
     538    spalte2=$punkte$queue
     539    printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}"
     540    spalte1=$(echo memory$punkte | cut -c-20)
     541    spalte2="$punkte$memory mb"
     542    printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}"
     543    spalte1=$(echo cputime$punkte | cut -c-20)
     544    spalte2="$punkte$cputime sec"
     545    printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}"
     546    spalte1=$(echo job_name$punkte | cut -c-20)
     547    spalte2="$punkte$job_name"
     548    printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}"
    542549    printf "#--------------------------------------------------------------# \n\n"
    543550
     
    15771584       then
    15781585          chmod  u+x  $job_on_remhost
    1579           echo "$submcom  $job_on_remhost"
    15801586          eval  $submcom  $job_on_remhost
    15811587       elif [[ $local_host = nech ]]
  • palm/trunk/SOURCE/check_parameters.f90

    r1093 r1103  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Bugfix: turbulent inflow must not require cyclic fill in restart runs
    2323!
    2424! Former revisions:
     
    34363436!
    34373437!-- Turbulent inflow requires that 3d arrays have been cyclically filled with
    3438 !-- data from prerun
    3439     IF ( turbulent_inflow  .AND.  initializing_actions /= 'cyclic_fill' )  THEN
     3438!-- data from prerun in the first main run
     3439    IF ( turbulent_inflow  .AND.  initializing_actions /= 'cyclic_fill'  .AND. &
     3440         initializing_actions /= 'read_restart_data' )  THEN
    34403441       message_string = 'turbulent_inflow = .T. requires ' // &
    34413442                        'initializing_actions = ''cyclic_fill'' '
  • palm/trunk/SOURCE/poisfft.f90

    r1093 r1103  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! tri, ar, and ar1 arguments in tridia-routines (2d) are removed because they
     23! sometimes cause segmentation faults with intel 12.1 compiler
    2324!
    2425! Former revisions:
     
    370371       DO  j = nys_z, nyn_z
    371372          IF ( j <= nnyh )  THEN
    372              CALL maketri( tri, j )
     373             CALL maketri( j )
    373374          ELSE
    374              CALL maketri( tri, ny+1-j )
     375             CALL maketri( ny+1-j )
    375376          ENDIF
    376           CALL split( tri )
    377           CALL substi( ar, ar1, tri, j )
     377          CALL split
     378          CALL substi( j )
    378379       ENDDO
    379380!$OMP  END PARALLEL
     
    381382!
    382383!--    First y-level.
    383        CALL maketri( tri, nys_z )
    384        CALL split( tri )
    385        CALL substi( ar, ar1, tri, 0 )
     384       CALL maketri( nys_z )
     385       CALL split
     386       CALL substi( 0 )
    386387
    387388!
    388389!--    Further y-levels.
    389390       DO  j = 1, nnyh - 1
    390           CALL maketri( tri, j )
    391           CALL split( tri )
    392           CALL substi( ar, ar1, tri, j )
    393           CALL substi( ar, ar1, tri, ny+1-j )
     391          CALL maketri( j )
     392          CALL split
     393          CALL substi( j )
     394          CALL substi( ny+1-j )
    394395       ENDDO
    395        CALL maketri( tri, nnyh )
    396        CALL split( tri )
    397        CALL substi( ar, ar1, tri, nnyh+nys )
     396       CALL maketri( nnyh )
     397       CALL split
     398       CALL substi( nnyh+nys )
    398399#endif
    399400
    400401    CONTAINS
    401402
    402        SUBROUTINE maketri( tri, j )
     403       SUBROUTINE maketri( j )
    403404
    404405!------------------------------------------------------------------------------!
     
    416417          REAL    ::  a, c
    417418          REAL    ::  ll(nxl_z:nxr_z)
    418           REAL    ::  tri(5,nxl_z:nxr_z,0:nz-1)
    419419
    420420
     
    476476
    477477
    478        SUBROUTINE substi( ar, ar1, tri, j )
     478       SUBROUTINE substi( j )
    479479
    480480!------------------------------------------------------------------------------!
     
    487487
    488488          INTEGER ::  i, j, k
    489           REAL    ::  ar1(nxl_z:nxr_z,0:nz-1)
    490           REAL    ::  tri(5,nxl_z:nxr_z,0:nz-1)
    491 #if defined( __parallel )
    492           REAL    ::  ar(nxl_z:nxr_z,nys_z:nyn_z,1:nz)
    493 #else
    494           REAL    ::  ar(1:nz,nys_z:nyn_z,nxl_z:nxr_z)
    495 #endif
    496489
    497490!
     
    559552
    560553
    561        SUBROUTINE split( tri )
     554       SUBROUTINE split
    562555
    563556!------------------------------------------------------------------------------!
     
    568561
    569562          INTEGER ::  i, k
    570           REAL    ::  tri(5,nxl_z:nxr_z,0:nz-1)
    571563
    572564!
Note: See TracChangeset for help on using the changeset viewer.