Ignore:
Timestamp:
Sep 26, 2017 11:41:55 AM (6 years ago)
Author:
raasch
Message:

default value for number of cores (option -X) set to 1, bugfix for mechanism which overwrites configuration file settings with values provided by palmrun options

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/palmrun

    r2499 r2501  
    2727# -----------------
    2828# $Id$
     29# default value for number of cores (option -X) set to 1
     30# bugfix for mechanism which overwrites configuration file settings with values
     31# provided by palmrun options
     32#
     33# 2499 2017-09-22 16:47:58Z kanani
    2934# option -h named configuration identifier
    3035#
     
    6570 compiler_name_ser=""
    6671 compiler_options=""
    67  cores=""
     72 cores=1
    6873 cores_atmos=0
    6974 cores_ocean=0
     
    116121 source_list=""
    117122 source_path=""
    118  tasks_per_node=""
     123 tasks_per_node=0
    119124 threads_per_task=1
    120125 tmpcreate=false
     
    179184       (j)   running_in_batch_mode=true;;
    180185       (k)   keep_data_from_previous_run=true; prc="$prc -k";;
    181        (m)   memory=$OPTARG; prc="$prc -m$OPTARG";;
     186       (m)   palmrun_memory=$OPTARG; prc="$prc -m$OPTARG";;
    182187       (M)   makefile=$OPTARG; prc="$prc -M$OPTARG";;
    183188       (O)   use_openmp=true; threads_per_task=$OPTARG; prc="$prc -O$OPTARG";;
     
    186191       (R)   return_address=$OPTARG;;
    187192       (s)   source_list=$OPTARG;;
    188        (t)   cpumax=$OPTARG; prc="$prc -t$OPTARG";;
     193       (t)   palmrun_cpumax=$OPTARG; prc="$prc -t$OPTARG";;
    189194       (T)   palmrun_tasks_per_node=$OPTARG; prc="$prc -T$OPTARG";;
    190195       (u)   remote_username=$OPTARG; prc="$prc -u$OPTARG";;
     
    193198       (w)   max_par_io_str=$OPTARG; prc="$prc -w$OPTARG";;
    194199       (x)   do_trace=true;set -x; prc="$prc -x";;
    195        (X)   cores=$OPTARG; prc="$prc -X$OPTARG";;
     200       (X)   palmrun_cores=$OPTARG; prc="$prc -X$OPTARG";;
    196201       (y)   ocean_file_appendix=true; prc="$prc -y";;
    197202       (Y)   run_coupled_model=true; coupled_dist=$OPTARG; prc="$prc -Y'$OPTARG'";;
     
    568573
    569574
     575    # VALUES OF PALMRUN-OPTIONS OVERWRITE THOSE FROM THE CONFIGURATION-FILE
     576 [[ $palmrun_memory     != 0   ]]  &&  memory=$palmrun_memory
     577 [[ $palmrun_cpumax     != ""   ]]  &&  cpumax=$palmrun_cpumax
     578 [[ "$palmrun_cores" != ""  ]]  &&  cores=$palmrun_cores
     579 [[ "$max_par_io_str" != "" ]]  &&  maximum_parallel_io_streams=$max_par_io_str
     580 [[ "$palmrun_tasks_per_node" != "" ]]  &&  tasks_per_node=$palmrun_tasks_per_node
     581
     582
     583
    570584      # EVALUATE MODEL COUPLING FEATURES (OPTION -Y)
    571585 if [[ $run_coupled_model = true ]]
     
    587601
    588602 fi
    589 
    590 
    591     # SAVE VALUES OF PALMRUN-OPTIONS IN ORDER TO OVERWRITE
    592     # THOSE VALUES GIVEN IN THE CONFIGURATION-FILE
    593  palmrun_memory=$memory
    594  palmrun_cpumax=$cpumax
    595  palmrun_cores=$cores
    596 
    597 
    598     # VALUES OF PALMRUN-OPTIONS OVERWRITE THOSE FROM THE CONFIGURATION-FILE
    599  [[ $palmrun_memory     != 0   ]]  &&  memory=$palmrun_memory
    600  [[ $palmrun_cpumax     != 0   ]]  &&  cpumax=$palmrun_cpumax
    601  [[ "$palmrun_cores" != ""  ]]  &&  cores=$palmrun_cores
    602  [[ "$max_par_io_str" != "" ]]  &&  maximum_parallel_io_streams=$max_par_io_str
    603  [[ "$palmrun_tasks_per_node" != "" ]]  &&  tasks_per_node=$palmrun_tasks_per_node
    604 
    605603
    606604
     
    846844       # CHECK, IF THE NUMBER OF CORES PER NODE HAS BEEN GIVEN UND IF IT IS AN
    847845       # INTEGRAL DIVISOR OF THE TOTAL NUMBER OF CORES GIVEN BY OPTION -X
    848     if [[ "$tasks_per_node" = "" ]]
     846    if [[ $tasks_per_node = 0 ]]
    849847    then
    850848       printf "\n"
     
    23482346    [[ "$cores" != "" ]]       &&  palmrun_com=${palmrun_com}" -X $cores"
    23492347    [[ $use_openmp = true ]]  &&  palmrun_com=${palmrun_com}" -O $threads_per_task"
    2350     [[ "$tasks_per_node" != "" ]]  &&  palmrun_com=${palmrun_com}" -T $tasks_per_node"
     2348    [[ $tasks_per_node != 0 ]]  &&  palmrun_com=${palmrun_com}" -T $tasks_per_node"
    23512349    [[ $delete_temporary_catalog = false ]]  &&  palmrun_com=${palmrun_com}" -B"
    23522350    [[ "$ocean_file_appendix" = true ]]  &&  palmrun_com=${palmrun_com}" -y"
Note: See TracChangeset for help on using the changeset viewer.