source: flex_extract.git/Documentation/html/_sources/Documentation/Input/setup.rst.txt @ 5bee29a

ctbtodev
Last change on this file since 5bee29a was 5bee29a, checked in by anphi <anne.philipp@…>, 4 years ago

new compilation of Sphinx

  • Property mode set to 100644
File size: 6.8 KB
Line 
1**************************************
2The installation script - ``setup.sh``
3**************************************
4
5The installation of ``flex_extract`` is done by the shell script ``setup.sh`` located in the root directory of ``flex_extract``.
6It calls the top-level Python script ``install.py`` which does all the necessary operations to prepare the  application environment selected. This includes:
7
8- preparing the file ``ECMWF_ENV`` with the user credentials for member-state access to ECMWF servers (in **remote** and **gateway** mode)
9- preparation of a compilation Korn-shell script (in **remote** and **gateway** mode)
10- preparation of a job template with user credentials (in **remote** and **gateway** mode)
11- create a tarball of all necessary files
12- copying the tarball to the target location (depending on application mode and installation path)
13- submit the compilation script to the batch queue at ECMWF servers (in **remote** and **gateway** mode) or just untar the tarball at target location (**local mode**)
14- compilation of the Fortran program ``calc_etadot``
15
16
17The Python installation script ``install.py`` has several command line arguments defined in ``setup.sh``, in the section labelled "*AVAILABLE COMMANDLINE ARGUMENTS TO SET*". The user has to adapt these parameters according to his/her personal needs. The parameters are listed and described in :ref:`ref-instparams`. The script also does some checks to guarantee that the necessary parameters were set.
18   
19After the installation process, some tests can be conducted. They are described in section :ref:`ref-testinstallfe`.
20
21The following diagram sketches the files and scripts involved in the installation process:
22
23.. _ref-install-blockdiag:
24
25.. blockdiag::
26
27   blockdiag {
28   
29     default_fontsize = 24;
30     
31     // Set node metrix
32     node_width = 300; // default is 128
33   
34     // Set span metrix
35     span_width = 80;  // default value is 64
36     
37     ECMWF_ENV.template [shape = flowchart.input];
38     compilejob.template [shape = flowchart.input];
39     job.template [shape = flowchart.input];
40     
41     compilejob.ksh [shape = roundedbox];
42    // tarball
43    // ECMWF_ENV
44    // job.temp
45     
46     "CONTROL file" [shape = flowchart.input];
47     
48     setup.sh [shape = roundedbox];
49     install.py [shape = roundedbox];
50     
51     "ECMWF server"  [shape = flowchart.terminator];
52     
53     //beginpoint [shape = beginpoint];
54     
55     orientation = landscape;
56     
57     //beginpoint -> setup.sh;
58     setup.sh -> install.py;
59     
60     install.py <- "CONTROL file";
61                 
62     install.py -> ECMWF_ENV, job.temp, compilejob.ksh, tarball;   
63
64     ECMWF_ENV.template, job.template, compilejob.template  -> install.py;
65     
66     tarball, compilejob.ksh -> "ECMWF server";
67     
68         
69     group exec {
70       // set backgound color
71       color = "#FF6633";
72       
73       orientation = portrait;
74       setup.sh;
75       install.py;
76     }
77     
78     group out {
79       color = "#FFFFFF";
80       group output {
81         color = "#99FF99";
82         ECMWF_ENV;
83         job.temp;
84         compilejob.ksh;
85       }
86       
87       group ECMWF {
88         color = "#006600";
89         tarball;
90         
91       }
92     }
93 
94     group input {
95       
96       color = "#FFFFFF";
97       
98       group temps {
99         color = "#66CCFF";
100                 
101         ECMWF_ENV.template;
102         job.template;
103         compilejob.template;
104       }
105       
106       group in {
107         color = "#3366FF";
108         "CONTROL file";
109       }
110     }
111     
112   }
113
114
115.. blockdiag::
116   :caption: Diagram of data flow during the installation process. Trapezoids are input files with the light blue area being the template files. Round-edge orange boxes are executable files which start the installation process and read the input files. Rectangular green boxes are  output files. Light green files are  needed only in the remota and gateway mode.
117
118   blockdiag {
119   
120     group{
121       orientation = portrait;
122       label = "Legend";
123       fontsize = 28;
124       color = "#FFFFFF";
125       'executable scripts' [shape = roundedbox];
126       'input files' [shape = flowchart.input];
127       'output files';
128        server [shape = flowchart.terminator];
129     }
130   }
131
132.. _ref-instparams:
133
134Installation parameters
135-----------------------
136   
137.. exceltable:: Parameter for Installation
138    :file:  ../../_files/InstallationParameter.xls
139    :header: 1 
140   
141
142
143Content of ``setup.sh``
144-----------------------
145 
146.. literalinclude:: ../../../../../setup.sh
147   :language: bash
148   :caption: setup.sh
149       
150       
151.. _ref-install-script:
152       
153Usage of ``install.py`` (optional)
154----------------------------------
155
156It is also possible to start the installation process of ``flex_extract`` directly from the command line by using the ``install.py`` script instead of the wrapper shell script ``setup.sh``.  This top-level script is located in
157``flex_extract_vX.X/Source/Python`` and is executable. With the ``--help`` parameter,
158we see again all possible command line parameters.
159
160.. code-block:: bash
161 
162    install.py --help
163   
164    usage: install.py [-h] [--target INSTALL_TARGET] [--makefile MAKEFILE]
165                  [--ecuid ECUID] [--ecgid ECGID] [--gateway GATEWAY]
166                  [--destination DESTINATION] [--installdir INSTALLDIR]
167                  [--job_template JOB_TEMPLATE] [--controlfile CONTROLFILE]
168
169    Install flex_extract software locally or on ECMWF machines
170
171    optional arguments:
172      -h, --help            show this help message and exit
173      --target INSTALL_TARGET
174                            Valid targets: local | ecgate | cca , the latter two
175                            are at ECMWF (default: None)
176      --makefile MAKEFILE   Name of makefile to compile the Fortran
177                            code. (default depends on `target`: local - makefile_local_gfortran,
178                            ecgate - makefile_ecgate, cca - makefile_cray)
179      --ecuid ECUID         The user id at ECMWF. (default: None)
180      --ecgid ECGID         The group id at ECMWF. (default: None)
181      --gateway GATEWAY     The IP name (or IP address) of the local gateway server. (default: None)
182      --destination DESTINATION
183                            The ecaccess association, e.g. myUser@genericSftp
184                            (default: None)
185      --installdir INSTALLDIR
186                            Root directory where flex_extract will be installed
187                            to. (default: None)
188      --job_template JOB_TEMPLATE
189                            The rudimentary template file to create a batch job
190                            template for submission to ECMWF servers. (default:
191                            job.template)
192      --controlfile CONTROLFILE
193                            The file with all CONTROL parameters. (default:
194                            CONTROL_EA5)
195
196
197
198
199
200.. toctree::
201    :hidden:
202    :maxdepth: 2
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG