Changeset b6ea29e in flex_extract.git
- Timestamp:
- Jul 28, 2022, 10:34:17 AM (21 months ago)
- Branches:
- dev
- Children:
- 373b74e
- Parents:
- 5606fc9
- Location:
- Source/Python
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Source/Python/Mods/tools.py
r75db9b0 rb6ea29e 651 651 return 652 652 653 def put_file_to_ecserver(ecd, filename , target, ecuid, ecgid):653 def put_file_to_ecserver(ecd, filename): 654 654 '''Uses the ecaccess-file-put command to send a file to the ECMWF servers. 655 655 … … 668 668 The name of the file to send to the ECMWF server. 669 669 670 target : str671 The target queue where the file should be sent to.672 673 ecuid : str674 The user id on ECMWF server.675 676 ecgid : str677 The group id on ECMWF server.678 679 670 Return 680 671 ------ … … 684 675 try: 685 676 subprocess.check_output(['ecaccess-file-put', 686 ecd + '/' + filename, 687 target + ':/home/ms/' + 688 ecgid + '/' + ecuid + 689 '/' + filename], 677 ecd + '/' + filename], 690 678 stderr=subprocess.STDOUT) 691 679 except subprocess.CalledProcessError as e: -
Source/Python/_config.py
r5606fc9 rb6ea29e 61 61 ec_hostname = os.getenv(HOSTENV_BOLOGNA) 62 62 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'] 64 64 # Test and set ECMWF Reading server values 65 65 elif os.getenv(HOSTENV_READING) is not None: … … 70 70 FLAG_ON_ECMWFSERVER = False 71 71 72 QUEUES_LIST_ALL = ['ecs', ' ecs-login', 'hpc', 'hpc-login', 'hpc-2020', 'ecgate', 'cca', 'ccb']72 QUEUES_LIST_ALL = ['ecs', 'hpc', 'ecgate', 'cca', 'ccb'] 73 73 74 INSTALL_TARGETS = ['local', 'syslocal', 'ecgate', 'cca', 'ccb' ]74 INSTALL_TARGETS = ['local', 'syslocal', 'ecgate', 'cca', 'ccb', 'ecs', 'hpc'] 75 75 76 76 CDS_DATASET_ML = 'reanalysis-era5-complete' … … 88 88 TEMPFILE_USER_ENVVARS = 'ECMWF_ENV.template' 89 89 FILE_USER_ENVVARS = 'ECMWF_ENV' 90 TEMPFILE_INSTALL_COMPILEJOB = 'installscript.template '90 TEMPFILE_INSTALL_COMPILEJOB = 'installscript.template.bologna' 91 91 FILE_INSTALL_COMPILEJOB = 'compilejob.ksh' 92 TEMPFILE_INSTALL_JOB = 'jobscript.template '92 TEMPFILE_INSTALL_JOB = 'jobscript.template.bologna' 93 93 TEMPFILE_JOB = 'submitscript.template' 94 94 FILE_JOB_OD = 'job.ksh' -
Source/Python/install.py
r5adaf8a rb6ea29e 110 110 check_install_conditions(c) 111 111 112 if c.install_target.lower() not in ['local', 'syslocal']: # ecgate or cca112 if c.install_target.lower() not in ['local', 'syslocal']: # ecmwf servers e.g. ecgate (ecs) and hpc 113 113 install_via_gateway(c) 114 114 else: # local … … 137 137 parser.add_argument('--target', dest='install_target', 138 138 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") 141 141 parser.add_argument("--makefile", dest="makefile", 142 142 type=none_or_str, default=None, … … 199 199 tar_file = os.path.join(_config.PATH_FLEXEXTRACT_DIR, tarball_name) 200 200 201 mk_compilejob(c.makefile, c.ecuid, c. ecgid, c.installdir)201 mk_compilejob(c.makefile, c.ecuid, c.installdir) 202 202 203 203 mk_job_template(c.ecuid, c.ecgid, c.installdir) … … 207 207 mk_tarball(tar_file, c.install_target) 208 208 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) 211 210 212 211 submit_job_to_ecserver(c.install_target, … … 614 613 return 615 614 616 def mk_compilejob(makefile, ecuid, ecgid,fp_root):615 def mk_compilejob(makefile, ecuid, fp_root): 617 616 '''Modifies the original job template file so that it is specified 618 617 for the user and the environment were it will be applied. Result 619 is stored in a new file " job.temp" in the pythondirectory.618 is stored in a new file "compilejob.ksh" in the Jobscript directory. 620 619 621 620 Parameters … … 627 626 ecuid : str 628 627 The user id on ECMWF server. 629 630 ecgid : str631 The group id on ECMWF server.632 628 633 629 fp_root : str … … 652 648 653 649 stream = compile_template.generate( 654 usergroup=ecgid,655 650 username=ecuid, 656 651 version_number=_config._VERSION_STR,
Note: See TracChangeset
for help on using the changeset viewer.