Changeset f61e1df in flex_extract.git for Source/Python/install.py
- Timestamp:
- Jul 9, 2020, 8:13:25 AM (4 years ago)
- Branches:
- master, ctbto, dev
- Children:
- 82564d8
- Parents:
- 3e13e02 (diff), 6931f61 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Source/Python/install.py
ra916e8f rf61e1df 51 51 52 52 Depending on the selected installation environment (locally or on the 53 ECMWF server ecgate or cca) the program extracts the command line53 ECMWF server ecgate or cca) the program extracts the command line 54 54 arguments and the CONTROL file parameter and prepares the corresponding 55 55 environment. 56 The necessary files are collected in a tar -ball and placed57 at the target location. There its untared, the environment variables will58 be set and the Fortran code will becompiled.59 If the ECMWF environment is selected a job script is prepared and submitted60 for the remaining configurations after putting the tar -ball tothe56 The necessary files are collected in a tar ball and placed 57 at the target location. There, is is untared, the environment variables are 58 set, and the Fortran code is compiled. 59 If the ECMWF environment is selected, a job script is prepared and submitted 60 for the remaining configurations after putting the tar ball on the 61 61 target ECMWF server. 62 62 … … 112 112 def get_install_cmdline_args(): 113 113 '''Decomposes the command line arguments and assigns them to variables. 114 Apply default values for non mentioned arguments.114 Apply default values for arguments not present. 115 115 116 116 Parameters … … 132 132 parser.add_argument("--makefile", dest="makefile", 133 133 type=none_or_str, default=None, 134 help='Name of Makefile to use for compiling the '134 help='Name of makefile for compiling the ' 135 135 'Fortran program') 136 136 parser.add_argument("--ecuid", dest="ecuid", 137 137 type=none_or_str, default=None, 138 help=' The user id at ECMWF.')138 help='User id at ECMWF') 139 139 parser.add_argument("--ecgid", dest="ecgid", 140 140 type=none_or_str, default=None, 141 help=' The group id at ECMWF.')141 help='Group id at ECMWF') 142 142 parser.add_argument("--gateway", dest="gateway", 143 143 type=none_or_str, default=None, 144 help=' The name of the local gateway server.')144 help='Name of the local gateway server') 145 145 parser.add_argument("--destination", dest="destination", 146 146 type=none_or_str, default=None, 147 help=' Theecaccess association, e.g. '147 help='ecaccess association, e.g. ' 148 148 'myUser@genericSftp') 149 149 150 150 parser.add_argument("--installdir", dest="installdir", 151 151 type=none_or_str, default=None, 152 help='Root directory where '153 'flex_extract will be installed to.')152 help='Root directory of the ' 153 'flex_extract installation') 154 154 155 155 # arguments for job submission to ECMWF, only needed by submit.py 156 156 parser.add_argument("--job_template", dest='job_template', 157 157 type=none_or_str, default="job.template", 158 help=' The rudimentary template file to create a batch '159 'job template for submission to ECMWF servers .')158 help='Rudimentary template file to create a batch ' 159 'job template for submission to ECMWF servers') 160 160 161 161 parser.add_argument("--controlfile", dest="controlfile", 162 162 type=none_or_str, default='CONTROL_EA5', 163 help=" The file withall CONTROL parameters.")163 help="A file that contains all CONTROL parameters.") 164 164 165 165 args = parser.parse_args() … … 169 169 170 170 def install_via_gateway(c): 171 '''Prepare data transfer to remote gate and submit a job script which will172 install everything on the remote gate .171 '''Prepare data transfer to remote gateway and submit a job script which will 172 install everything on the remote gateway. 173 173 174 174 Parameters … … 264 264 265 265 def check_install_conditions(c): 266 '''Checks a couple ofnecessary attributes and conditions267 for the installation such as ifthey exist and contain values.266 '''Checks necessary attributes and conditions 267 for the installation, e.g. whether they exist and contain values. 268 268 Otherwise set default values. 269 269 … … 330 330 '''Creates a tarball with all necessary files which need to be sent to the 331 331 installation directory. 332 It does not matter ifthis is local or remote.333 Collects all python files, the Fortran source and makefiles,332 It does not matter whether this is local or remote. 333 Collects all Python files, the Fortran source and makefiles, 334 334 the ECMWF_ENV file, the CONTROL files as well as the 335 335 template files. … … 515 515 ---------- 516 516 makefile : str 517 <<<<<<< HEAD 517 518 Name of the makefile which should be used to compile FORTRAN 519 ======= 520 Name of the makefile which should be used to compile the Fortran 521 >>>>>>> origin/task/language-editing 518 522 program. 519 523 … … 705 709 print('Please edit ' + makefile + 706 710 ' or try another makefile in the src directory.') 711 <<<<<<< HEAD 707 712 print('Most likely ECCODES_INCLUDE_DIR, ECCODES_LIB ' 713 ======= 714 print('Most likely GRIB_API_INCLUDE_DIR, GRIB_API_LIB ' 715 >>>>>>> origin/task/language-editing 708 716 'and EMOSLIB must be adapted.') 709 717 print('Available makefiles:') … … 711 719 sys.exit('Compilation failed!') 712 720 except ValueError as e: 721 <<<<<<< HEAD 713 722 print('ERROR: makefile call failed:') 723 ======= 724 print('ERROR: make of Fortran code failed:') 725 >>>>>>> origin/task/language-editing 714 726 print(e) 715 727 else: 716 execute_subprocess(['ls', '-l', 728 execute_subprocess(['ls', '-l', 717 729 os.path.join(src_path, _config.FORTRAN_EXECUTABLE)], 718 730 error_msg='FORTRAN EXECUTABLE COULD NOT BE FOUND!')
Note: See TracChangeset
for help on using the changeset viewer.