Changeset b6ea29e in flex_extract.git


Ignore:
Timestamp:
Jul 28, 2022, 10:34:17 AM (21 months ago)
Author:
Anne Tipka <anne.tipka@…>
Branches:
dev
Children:
373b74e
Parents:
5606fc9
Message:

Adaptations for Bologna servers in Python part

Location:
Source/Python
Files:
3 edited

Legend:

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

    r75db9b0 rb6ea29e  
    651651    return
    652652
    653 def put_file_to_ecserver(ecd, filename, target, ecuid, ecgid):
     653def put_file_to_ecserver(ecd, filename):
    654654    '''Uses the ecaccess-file-put command to send a file to the ECMWF servers.
    655655
     
    668668        The name of the file to send to the ECMWF server.
    669669
    670     target : str
    671         The target queue where the file should be sent to.
    672 
    673     ecuid : str
    674         The user id on ECMWF server.
    675 
    676     ecgid : str
    677         The group id on ECMWF server.
    678 
    679670    Return
    680671    ------
     
    684675    try:
    685676        subprocess.check_output(['ecaccess-file-put',
    686                                  ecd + '/' + filename,
    687                                  target + ':/home/ms/' +
    688                                  ecgid + '/' + ecuid +
    689                                  '/' + filename],
     677                                 ecd + '/' + filename],
    690678                                stderr=subprocess.STDOUT)
    691679    except subprocess.CalledProcessError as e:
  • Source/Python/_config.py

    r5606fc9 rb6ea29e  
    6161    ec_hostname = os.getenv(HOSTENV_BOLOGNA)
    6262    FLAG_ON_ECMWFSERVER = ec_hostname in HOSTNAMES_BOLOGNA_LIST
    63     QUEUES_LIST = ['ecs', 'ecs-login', 'hpc', 'hpc-login', 'hpc-2020']
     63    QUEUES_LIST = ['ecs', 'hpc']
    6464# Test and set ECMWF Reading server values
    6565elif os.getenv(HOSTENV_READING) is not None:
     
    7070    FLAG_ON_ECMWFSERVER = False
    7171
    72 QUEUES_LIST_ALL = ['ecs', 'ecs-login', 'hpc', 'hpc-login', 'hpc-2020', 'ecgate', 'cca', 'ccb']
     72QUEUES_LIST_ALL = ['ecs', 'hpc', 'ecgate', 'cca', 'ccb']
    7373
    74 INSTALL_TARGETS = ['local', 'syslocal', 'ecgate', 'cca', 'ccb']
     74INSTALL_TARGETS = ['local', 'syslocal', 'ecgate', 'cca', 'ccb', 'ecs', 'hpc']
    7575
    7676CDS_DATASET_ML = 'reanalysis-era5-complete'
     
    8888TEMPFILE_USER_ENVVARS = 'ECMWF_ENV.template'
    8989FILE_USER_ENVVARS = 'ECMWF_ENV'
    90 TEMPFILE_INSTALL_COMPILEJOB = 'installscript.template'
     90TEMPFILE_INSTALL_COMPILEJOB = 'installscript.template.bologna'
    9191FILE_INSTALL_COMPILEJOB = 'compilejob.ksh'
    92 TEMPFILE_INSTALL_JOB = 'jobscript.template'
     92TEMPFILE_INSTALL_JOB = 'jobscript.template.bologna'
    9393TEMPFILE_JOB = 'submitscript.template'
    9494FILE_JOB_OD = 'job.ksh'
  • Source/Python/install.py

    r5adaf8a rb6ea29e  
    110110    check_install_conditions(c)
    111111
    112     if c.install_target.lower() not in ['local', 'syslocal']: # ecgate or cca
     112    if c.install_target.lower() not in ['local', 'syslocal']:  # ecmwf servers e.g. ecgate (ecs) and hpc
    113113        install_via_gateway(c)
    114114    else: # local
     
    137137    parser.add_argument('--target', dest='install_target',
    138138                        type=none_or_str, default=None,
    139                         help="Valid targets: syslocal | local | ecgate | cca , \
    140                         the latter two are at ECMWF")
     139                        help="Valid targets: syslocal | local | ecgate | cca | \
     140                        ccb | ecs | hpc , the latter 5 are at ECMWF servers")
    141141    parser.add_argument("--makefile", dest="makefile",
    142142                        type=none_or_str, default=None,
     
    199199    tar_file = os.path.join(_config.PATH_FLEXEXTRACT_DIR, tarball_name)
    200200
    201     mk_compilejob(c.makefile, c.ecuid, c.ecgid, c.installdir)
     201    mk_compilejob(c.makefile, c.ecuid, c.installdir)
    202202
    203203    mk_job_template(c.ecuid, c.ecgid, c.installdir)
     
    207207    mk_tarball(tar_file, c.install_target)
    208208
    209     put_file_to_ecserver(_config.PATH_FLEXEXTRACT_DIR, tarball_name,
    210                          c.install_target, c.ecuid, c.ecgid)
     209    put_file_to_ecserver(_config.PATH_FLEXEXTRACT_DIR, tarball_name)
    211210
    212211    submit_job_to_ecserver(c.install_target,
     
    614613    return
    615614
    616 def mk_compilejob(makefile, ecuid, ecgid, fp_root):
     615def mk_compilejob(makefile, ecuid, fp_root):
    617616    '''Modifies the original job template file so that it is specified
    618617    for the user and the environment were it will be applied. Result
    619     is stored in a new file "job.temp" in the python directory.
     618    is stored in a new file "compilejob.ksh" in the Jobscript directory.
    620619
    621620    Parameters
     
    627626    ecuid : str
    628627        The user id on ECMWF server.
    629 
    630     ecgid : str
    631         The group id on ECMWF server.
    632628
    633629    fp_root : str
     
    652648
    653649        stream = compile_template.generate(
    654             usergroup=ecgid,
    655650            username=ecuid,
    656651            version_number=_config._VERSION_STR,
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG