Changeset 5606fc9 in flex_extract.git


Ignore:
Timestamp:
Jul 27, 2022, 3:15:02 PM (21 months ago)
Author:
Anne Tipka <anne.tipka@…>
Branches:
dev
Children:
b6ea29e
Parents:
5adaf8a
Message:

included checking for Bologna vs Reading servers and adapted queue and host names

Location:
Source/Python
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Source/Python/Mods/checks.py

    r0a75335 r5606fc9  
    120120
    121121    Checks the format of the four area components wether it is on
    122     the order of 1000 or 1. 
    123     Also checks wether area was already set on command line, 
     122    the order of 1000 or 1.
     123    Also checks wether area was already set on command line,
    124124    then the four components are overwritten.
    125125    Convert to correct format of the order of magnitude "1" and sets the
     
    453453def check_queue(queue, gateway, destination, ecuid, ecgid):
    454454    '''Check if the necessary ECMWF parameters are set if the queue is
    455     one of the QUEUES_LIST (in _config).
     455    one of the QUEUES_LIST_ALL (in _config).
    456456
    457457    Parameters
     
    479479
    480480    '''
    481     if queue in _config.QUEUES_LIST and \
     481    if queue in _config.QUEUES_LIST_ALL and \
    482482            (not ecuid or not ecgid):
    483483        raise ValueError('\nEnvironment variables ECUID '
     
    485485                         'Please check for existence of file "ECMWF_ENV" '
    486486                         'in the run directory!')
    487     elif queue in _config.QUEUES_LIST and \
    488              (not gateway or not destination):
     487    elif queue in _config.QUEUES_LIST_ALL and \
     488            (not gateway or not destination):
    489489        print('WARNING: Parameters GATEWAY and DESTINATION were '
    490490              'not properly set for working on ECMWF server. \n'
  • Source/Python/_config.py

    r75db9b0 r5606fc9  
    1111#      August 2020 - Leopold Haimberger
    1212#         - added another target for installation
    13 #         - added filename which will contain paths for system version     
     13#         - added filename which will contain paths for system version
    1414#         - checks if software runs in normal local mode or system local mode
    15 #           and defines paths to user directory and executable paths   
     15#           and defines paths to user directory and executable paths
    1616#
    1717# @License:
     
    4343# ------------------------------------------------------------------------------
    4444
    45 _VERSION_STR = '7.1.2_ctbto'
     45_VERSION_STR = '7.1.3'
    4646
    47 FLAG_ON_ECMWFSERVER = 'ecgb' in platform.node()
     47HOSTNAMES_BOLOGNA_LIST = ['ecs', 'aa', 'ab', 'ac', 'ad']
     48HOSTNAMES_READING_LIST = ['ecgb', 'cca', 'ccb']
    4849
    49 QUEUES_LIST = ['ecgate', 'cca', 'ccb']
     50# name of environment variable on ECMWF Bologna servers
     51# that indicates which cluster / host we are on
     52HOSTENV_BOLOGNA = 'EC_CLUSTER'
     53# name of environment variable on ECMWF Reading servers
     54# that indicates which cluster / host we are on
     55HOSTENV_READING = 'ECPLATFORM'
     56
     57# test if we are on a Bologna or Reading server
     58
     59# Test and set ECMWF Bologna server values
     60if os.getenv(HOSTENV_BOLOGNA) is not None:
     61    ec_hostname = os.getenv(HOSTENV_BOLOGNA)
     62    FLAG_ON_ECMWFSERVER = ec_hostname in HOSTNAMES_BOLOGNA_LIST
     63    QUEUES_LIST = ['ecs', 'ecs-login', 'hpc', 'hpc-login', 'hpc-2020']
     64# Test and set ECMWF Reading server values
     65elif os.getenv(HOSTENV_READING) is not None:
     66    ec_hostname = os.getenv(HOSTENV_READING)
     67    FLAG_ON_ECMWFSERVER = ec_hostname in HOSTNAMES_READING_LIST
     68    QUEUES_LIST = ['ecgate', 'cca', 'ccb']
     69else:
     70    FLAG_ON_ECMWFSERVER = False
     71
     72QUEUES_LIST_ALL = ['ecs', 'ecs-login', 'hpc', 'hpc-login', 'hpc-2020', 'ecgate', 'cca', 'ccb']
    5073
    5174INSTALL_TARGETS = ['local', 'syslocal', 'ecgate', 'cca', 'ccb']
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG