source: flex_extract.git/Documentation/html/_sources/Installation/gateway.rst.txt @ 30f7911

ctbtodev
Last change on this file since 30f7911 was 30f7911, checked in by Anne Philipp <anne.philipp@…>, 5 years ago

reviewed installation section of online documentation; minor corrections

  • Property mode set to 100644
File size: 7.6 KB
Line 
1*************************
2Gateway mode installation
3*************************
4
5.. role:: underline
6    :class: underline
7   
8.. toctree::
9    :hidden:
10    :maxdepth: 3
11   
12.. _Python 3: https://docs.python.org/3/
13.. _Python3: https://www.python.org/downloads/
14.. _Anaconda Python3: https://www.anaconda.com/distribution/#download-section
15
16.. _numpy: http://www.numpy.org/
17.. _ecmwf-api-client: https://confluence.ecmwf.int/display/WEBAPI/ECMWF+Web+API+Home
18.. _cdsapi: https://cds.climate.copernicus.eu/api-how-to
19.. _genshi: https://genshi.edgewall.org/
20.. _eccodes for python: https://packages.debian.org/sid/python3-eccodes
21.. _eccodes for conda: https://anaconda.org/conda-forge/eccodes
22.. _gfortran: https://gcc.gnu.org/wiki/GFortran
23.. _fftw3: http://www.fftw.org
24.. _eccodes: https://software.ecmwf.int/wiki/display/ECC
25.. _emoslib: https://software.ecmwf.int/wiki/display/EMOS/Emoslib
26.. _member state: https://www.ecmwf.int/en/about/who-we-are/member-states
27.. _registration form: https://apps.ecmwf.int/registration/
28.. _CDS API registration: https://cds.climate.copernicus.eu/user/register
29.. _ECMWF ectrans site: https://confluence.ecmwf.int/display/ECAC/Unattended+file+transfer+-+ectrans
30.. _ECaccess Presentation: https://confluence.ecmwf.int/download/attachments/45759146/ECaccess.pdf
31.. _ECMWF's instructions on gateway server: https://confluence.ecmwf.int/display/ECAC/ECaccess+Home
32.. _Computing Representative: https://www.ecmwf.int/en/about/contact-us/computing-representatives
33.. _MARS access: https://confluence.ecmwf.int//display/WEBAPI/Access+MARS
34
35.. _download section: https://www.flexpart.eu/downloads
36
37
38
39.. _ref-gateway-mode:
40
41
42
43.. _ref-req-gateway:
44 
45Gateway environment requirements
46================================
47
48The environment on your local system has to provide these software packages
49and libraries, since ``flex_extract`` does only prepare the job script and send
50it to the ECMWF servers:
51   
52* `Python3`_ or `Anaconda Python3`_
53* `numpy`_
54* `genshi`_
55 
56
57.. _ref-prep-gateway:
58
59Prepare gateway environment
60===========================
61
62The easiest way to install all required packages is to use the package management system of your Linux distribution. To do so, it is necessary to use a user with admin rights.
63The installation was tested on a *GNU/Linux Debian buster* and an *Ubuntu 18.04 Bionic Beaver* system.
64
65.. code-block:: sh
66
67   # On a Linux Debian or Ubuntu system do
68   # (if not already available):
69   apt-get install python3
70   apt-get install pip
71   apt-get install genshi
72   apt-get install numpy
73
74
75.. _ref-test-gateway:
76
77Test gateway environment
78========================
79 
80Check the availability of the python packages by typing ``python3`` in
81a terminal window and run the ``import`` commands in the python shell.
82If there are no error messages, you succeeded in setting up the environment.
83
84.. code-block:: python
85   
86   # check in python3 console
87   import genshi
88   import numpy
89 
90
91
92.. _ref-install-gateway:
93
94Gateway installation
95====================
96
97In this mode, access to the ECMWF computing and archiving facilities is enabled through an ECaccess gateway server on a local member state server. The ECaccess framework is necessary to interactively submit jobs to the ECMWF batch system and to transfer files between ECMWF and local gateway server.
98
99Please see `ECMWF's instructions on gateway server`_ to establish the gateway server if not already in place.
100Additionally, to be able to use the Ecaccess file transfer service **ectrans** please also create an association.
101The easiest way is to visit the ECaccess Member State Gateway website (e.g. msgatway.ecmwf.int) and follow the instructions in the short `ECaccess Presentation`_ (page 17 ff.). Additional documentation can be found on the `ECMWF ectrans site`_.
102
103After everything is set up you have to create an *ecaccess certificate* to be able to send and receive files from and to the ECMWF server. You can do this by using the ``ecaccess-certificate-create`` command on the gateway server. You will be prompted for your ECMWF member state user name and a password (which will be usually generated by a Token). This certificate has to be re-newed periodically (every 7 days).
104
105.. code-block:: bash
106   
107   $ ecaccess-certificate-create
108   Please enter your user-id: example_username
109   Your passcode: ***
110   
111``Flex_extract`` will be run on an ECMWF server which makes the setup the same as for the **remote mode**. In the ``setup.sh`` script `[ref] <Documentation/Input/setup.html>`_, select the ``Makefile.gfortran`` for the ``CONVERT2`` Fortran program and the ECMWF server (*target*) you would like to use.
112The job script, send to the job queue via the ECaccess software, selects again automatically the correct libraries from the module system. For enableing the file transfer you have to set the *ECUID*, *ECGID*, *GATEWAY* and *DESTINATION* parameter values.
113 
114
115.. code-block:: bash
116    :caption: 'Example settings for a gateway installation.'
117    :name: setup.sh
118   
119    # -----------------------------------------------------------------
120    # AVAILABLE COMMANDLINE ARGUMENTS TO SET
121    #
122    # THE USER HAS TO SPECIFY THESE PARAMETER
123    #
124    TARGET='ecgate'
125    MAKEFILE='Makefile.gfortran'
126    ECUID='uid'
127    ECGID='gid'
128    GATEWAY='server.example.edu'
129    DESTINATION='example@genericSftp'
130    INSTALLDIR=None
131    JOB_TEMPLATE='job.template'
132    CONTROLFILE='CONTROL_EA5'
133
134
135Afterwards, type:
136
137.. code-block:: bash
138
139   $ ./setup.sh
140   
141to start the installation. You should see the following output at the command line.
142   
143   
144.. code-block:: bash
145
146   # Output of setup.sh
147   Create tarball ...
148   Job compilation script has been submitted to ecgate for installation in ${HOME}/flex_extract_vX.X
149   You should get an email with subject "flexcompile" within the next few minutes!
150
151   
152The email content should look like this with a "SUCCESS" statement in the last line:
153
154.. code-block:: bash
155
156    gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -g -O3 -fopenmp phgrreal.f
157    gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -g -O3 -fopenmp grphreal.f
158    gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -g -O3 -fopenmp ftrafo.f
159    gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -O3 -I. -I/usr/local/apps/eccodes/2.12.0/GNU/6.3.0/include -g rwGRIB2.f90
160    gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -O3 -I. -I/usr/local/apps/eccodes/2.12.0/GNU/6.3.0/include -g posnam.f
161    gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -c -O3 -I. -I/usr/local/apps/eccodes/2.12.0/GNU/6.3.0/include -g preconvert.f90
162    gfortran   -m64 -fdefault-real-8 -fcray-pointer -fno-second-underscore  -ffixed-line-length-132 -fopenmp  -fconvert=big-endian  -g -O3 -o ./CONVERT2 ftrafo.o phgrreal.o grphreal.o rwGRIB2.o posnam.o preconvert.o -L/usr/local/apps/eccodes/2.12.0/GNU/6.3.0/lib -Wl,-rpath,/usr/local/apps/eccodes/2.12.0/GNU/6.3.0/lib -leccodes_f90 -leccodes -ljasper -lpthread -L/usr/local/apps/jasper/1.900.1/LP64/lib -ljasper -lm -L/usr/local/apps/libemos/000455/GNU/6.3.0/lib  -Wl,-rpath,/usr/local/apps/libemos/000455/GNU/6.3.0/lib  -lemos.R64.D64.I32 -L/usr/local/apps/fftw/3.3.4/GNU/6.3.0/lib -Wl,-rpath,/usr/local/apps/fftw/3.3.4/GNU/6.3.0/lib -lfftw3   
163    -rwxr-x---. 1 USER at 353134 May 23 12:27 CONVERT2
164    SUCCESS!   
165   
166   
167   
168   
169
170   
171   
172         
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG