From 5cff464f73e373cf86b1e590a2e0d2d77e5060d6 Mon Sep 17 00:00:00 2001 From: Anne Tipka <anne.tipka@ctbto.org> Date: Thu, 20 Oct 2022 20:22:51 +0000 Subject: [PATCH] switched using compilejob.sh and using batch submit to install software --- Source/Python/_config.py | 4 +++- Source/Python/install.py | 16 ++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Source/Python/_config.py b/Source/Python/_config.py index 778955d..4924532 100644 --- a/Source/Python/_config.py +++ b/Source/Python/_config.py @@ -16,6 +16,8 @@ # July 2022 - Anne Tipka (formerly Philipp) # - modified to account for changes on Bologna servers, # e.g. queue names and hostnames +# August 2022 - Anne Tipka (formerly Philipp) +# - changed name of compilejob.ksh to compilejob.sh # # @License: # (C) Copyright 2014-2020. @@ -91,7 +93,7 @@ FORTRAN_EXECUTABLE = 'calc_etadot' TEMPFILE_USER_ENVVARS = 'ECMWF_ENV.template' FILE_USER_ENVVARS = 'ECMWF_ENV' TEMPFILE_INSTALL_COMPILEJOB = 'installscript.template' -FILE_INSTALL_COMPILEJOB = 'compilejob.ksh' +FILE_INSTALL_COMPILEJOB = 'compilejob.sh' TEMPFILE_INSTALL_JOB = 'jobscript.template' TEMPFILE_JOB = 'submitscript.template' FILE_JOB_OD = 'job.ksh' diff --git a/Source/Python/install.py b/Source/Python/install.py index 720f74a..352b0a1 100755 --- a/Source/Python/install.py +++ b/Source/Python/install.py @@ -93,7 +93,8 @@ from Classes.ControlFile import ControlFile from Classes.UioFiles import UioFiles from Mods.tools import (make_dir, put_file_to_ecserver, submit_job_to_ecserver, silent_remove, execute_subprocess, none_or_str, - overwrite_lines_in_file, check_for_string_in_file) + overwrite_lines_in_file, check_for_string_in_file, + submit_sbatch_job) # ------------------------------------------------------------------------------ # FUNCTIONS @@ -113,7 +114,7 @@ def main(): c = ControlFile(args.controlfile) c.assign_args_to_control(args) check_install_conditions(c) - + if c.install_target.lower() not in ['local', 'syslocal']: # ecmwf servers e.g. ecgate (ecs) and hpc install_via_gateway(c) else: # local @@ -205,7 +206,7 @@ def install_via_gateway(c): mk_compilejob(c.makefile, c.ecuid, c.installdir) - mk_job_template(c.ecuid, c.ecgid, c.installdir) + mk_job_template(c.ecuid, c.installdir) mk_env_vars(c.ecuid, c.ecgid, c.gateway, c.destination) @@ -213,9 +214,12 @@ def install_via_gateway(c): put_file_to_ecserver(_config.PATH_FLEXEXTRACT_DIR, tarball_name) - submit_job_to_ecserver(c.install_target, - os.path.join(_config.PATH_REL_JOBSCRIPTS, - _config.FILE_INSTALL_COMPILEJOB)) + submit_sbatch_job(os.path.join(_config.PATH_REL_JOBSCRIPTS, + _config.FILE_INSTALL_COMPILEJOB)) + +# submit_job_to_ecserver(c.install_target, +# os.path.join(_config.PATH_REL_JOBSCRIPTS, +# _config.FILE_INSTALL_COMPILEJOB)) silent_remove(tar_file) -- GitLab