Changeset 5606fc9 in flex_extract.git for Source/Python/_config.py


Ignore:
Timestamp:
Jul 27, 2022, 3:15:02 PM (22 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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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