Changeset f61e1df in flex_extract.git for Source/Python/install.py


Ignore:
Timestamp:
Jul 9, 2020, 8:13:25 AM (4 years ago)
Author:
anphi <anne.philipp@…>
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.
Message:

merge of language editing branch into master

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Source/Python/install.py

    ra916e8f rf61e1df  
    5151
    5252Depending on the selected installation environment (locally or on the
    53 ECMWF server ecgate or cca) the program extracts the commandline
     53ECMWF server ecgate or cca) the program extracts the command line
    5454arguments and the CONTROL file parameter and prepares the corresponding
    5555environment.
    56 The necessary files are collected in a tar-ball and placed
    57 at the target location. There its untared, the environment variables will
    58 be set and the Fortran code will be 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 to the
     56The necessary files are collected in a tar ball and placed
     57at the target location. There, is is untared, the environment variables are
     58set, and the Fortran code is compiled.
     59If the ECMWF environment is selected, a job script is prepared and submitted
     60for the remaining configurations after putting the tar ball on the
    6161target ECMWF server.
    6262
     
    112112def get_install_cmdline_args():
    113113    '''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.
    115115
    116116    Parameters
     
    132132    parser.add_argument("--makefile", dest="makefile",
    133133                        type=none_or_str, default=None,
    134                         help='Name of Makefile to use for compiling the '
     134                        help='Name of makefile for compiling the '
    135135                        'Fortran program')
    136136    parser.add_argument("--ecuid", dest="ecuid",
    137137                        type=none_or_str, default=None,
    138                         help='The user id at ECMWF.')
     138                        help='User id at ECMWF')
    139139    parser.add_argument("--ecgid", dest="ecgid",
    140140                        type=none_or_str, default=None,
    141                         help='The group id at ECMWF.')
     141                        help='Group id at ECMWF')
    142142    parser.add_argument("--gateway", dest="gateway",
    143143                        type=none_or_str, default=None,
    144                         help='The name of the local gateway server.')
     144                        help='Name of the local gateway server')
    145145    parser.add_argument("--destination", dest="destination",
    146146                        type=none_or_str, default=None,
    147                         help='The ecaccess association, e.g. '
     147                        help='ecaccess association, e.g. '
    148148                        'myUser@genericSftp')
    149149
    150150    parser.add_argument("--installdir", dest="installdir",
    151151                        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')
    154154
    155155    # arguments for job submission to ECMWF, only needed by submit.py
    156156    parser.add_argument("--job_template", dest='job_template',
    157157                        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')
    160160
    161161    parser.add_argument("--controlfile", dest="controlfile",
    162162                        type=none_or_str, default='CONTROL_EA5',
    163                         help="The file with all CONTROL parameters.")
     163                        help="A file that contains all CONTROL parameters.")
    164164
    165165    args = parser.parse_args()
     
    169169
    170170def install_via_gateway(c):
    171     '''Prepare data transfer to remote gate and submit a job script which will
    172     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.
    173173
    174174    Parameters
     
    264264
    265265def check_install_conditions(c):
    266     '''Checks a couple of necessary attributes and conditions
    267     for the installation such as if they exist and contain values.
     266    '''Checks necessary attributes and conditions
     267    for the installation, e.g. whether they exist and contain values.
    268268    Otherwise set default values.
    269269
     
    330330    '''Creates a tarball with all necessary files which need to be sent to the
    331331    installation directory.
    332     It does not matter if this 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,
    334334    the ECMWF_ENV file, the CONTROL files as well as the
    335335    template files.
     
    515515    ----------
    516516    makefile : str
     517<<<<<<< HEAD
    517518        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
    518522        program.
    519523
     
    705709            print('Please edit ' + makefile +
    706710                  ' or try another makefile in the src directory.')
     711<<<<<<< HEAD
    707712            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
    708716                  'and EMOSLIB must be adapted.')
    709717            print('Available makefiles:')
     
    711719            sys.exit('Compilation failed!')
    712720    except ValueError as e:
     721<<<<<<< HEAD
    713722        print('ERROR: makefile call failed:')
     723=======
     724        print('ERROR: make of Fortran code failed:')
     725>>>>>>> origin/task/language-editing
    714726        print(e)
    715727    else:
    716         execute_subprocess(['ls', '-l',
     728        execute_subprocess(['ls', '-l', 
    717729                            os.path.join(src_path, _config.FORTRAN_EXECUTABLE)],
    718730                           error_msg='FORTRAN EXECUTABLE COULD NOT BE FOUND!')
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG