Changeset 1279 for palm/trunk


Ignore:
Timestamp:
Jan 28, 2014 12:10:14 PM (11 years ago)
Author:
raasch
Message:

tasks_per_node must not be an integral divisor of numprocs any more

Location:
palm/trunk/SCRIPTS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/mrun

    r1275 r1279  
    2222# Current revisions:
    2323# ------------------
    24 #
     24# tasks_per_node must not be an integral divisor of numprocs any more. This was done
     25# in order to remove annoying restrictions concerning the number of processors which
     26# appear on machines with larger nodes (e.g. containing 24 cores). Without this
     27# restriction, one of the nodes will not be completely filled with tasks. A respective
     28# warning is given.
    2529#
    2630# Former revisions:
     
    260264                           # effect may cause data loss when getopts is reading the
    261265                           # script-option arguments
    262  typeset -i  cputime i ii iia iii iio icycle inode ival jobges jobsek last_char_int maxcycle minuten nodes pes sekunden tp1
     266 typeset -i  cputime i ii iia iii iio icycle inode ival jobges jobsek last_char_int maxcycle minuten nodes pes remaining_pes sekunden tp1
    263267
    264268
     
    10751079       locat=tasks_per_node; (( iec = 0 )); exit
    10761080    fi
     1081
     1082    if (( numprocs < tasks_per_node ))
     1083    then
     1084       printf "\n"
     1085       printf "\n  +++ tasks per node (-T) cannot exceed total number of processors (-X)"
     1086       printf "\n      given values: -T $tasks_per_node  -X $numprocs"
     1087       locat=tasks_per_node; (( iec = 0 )); exit
     1088    fi
     1089
    10771090    if [[ $host != lcflow  &&  $host != lcxt5m ]]
    10781091    then
     1092       (( nodes = numprocs / ( tasks_per_node * threads_per_task ) ))
    10791093       (( ival = $tasks_per_node ))
    10801094       (( pes = numprocs ))
    1081 #          if [[ $(echo $package_list | grep -c dvrp_graphics+1PE) = 1 ]]
    1082 #          then
    1083 #             (( pes = pes - 1 ))
    1084 #          fi
    10851095       (( ii = pes / ival ))
    1086        if (( pes - ii * ival > 0 ))
     1096       (( remaining_pes =  pes - ii * ival ))
     1097       if (( remaining_pes > 0 ))
    10871098       then
    10881099          printf "\n"
    1089           printf "\n  +++ tasks per node (option \"-T\") must be an integral"
     1100          printf "\n  +++ WARNING: tasks per node (option \"-T\") is not an integral"
    10901101          printf "\n      divisor of the total number of processors (option \"-X\")"
    10911102          printf "\n      values of this mrun-call: \"-T $tasks_per_node\" \"-X $numprocs\""
    1092           locat=tasks_per_node; (( iec = 0 )); exit
     1103          printf "\n      One of the nodes is filled with $remaining_pes instead of $tasks_per_node tasks"
     1104          (( nodes = nodes + 1 ))
    10931105       fi
    10941106    fi
     
    11161128    then
    11171129       TOPT="-T $tasks_per_node"
    1118        (( nodes = numprocs / ( tasks_per_node * threads_per_task ) ))
    11191130    fi
    11201131
     
    21032114    spalte1="tasks per node:"; spalte2="$tasks_per_node (number of nodes: $nodes)"
    21042115    printf "| %-25s%-45s | \n" "$spalte1" "$spalte2"
     2116    if (( remaining_pes > 0 ))
     2117    then
     2118       spalte1=" "; spalte2="one of the nodes only filled with $remaining_pes tasks"
     2119       printf "| %-25s%-45s | \n" "$spalte1" "$spalte2"
     2120    fi
    21052121 fi
    21062122 if [[ $maximum_parallel_io_streams != $numprocs ]]
  • palm/trunk/SCRIPTS/subjob

    r1275 r1279  
    2323# Current revisions:
    2424# ------------------
    25 #
     25# node calculation modified due to changes in mrun (tasks_per_node must not be
     26# an integral divisor of numprocs any more)
    2627#
    2728# Former revisions:
     
    558559 if (( tasks_per_node != 0 ))
    559560 then
    560     (( nodes = numprocs / ( tasks_per_node * threads_per_task ) ))
     561    (( nodes = ( numprocs - 1 ) / ( tasks_per_node * threads_per_task ) + 1 ))
    561562 fi
    562563
Note: See TracChangeset for help on using the changeset viewer.