Ignore:
Timestamp:
Oct 28, 2020, 10:28:24 AM (4 years ago)
Author:
Leopold Haimberger <leopold.haimberger@…>
Branches:
ctbto, dev
Children:
75db9b0
Parents:
697b8d0
Message:

Adaptations to allow for a system installation with separate user and system path. Updated documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • For_developers/Sphinx/Source/Installation/local.rst

    r73308e0 r47be2684  
    266266The Fortran program called ``calc_etadot`` will be compiled during the
    267267installation process. A suitable makefile (``makefile_local_gfortran``) for the compilation is set by default.
    268 This may be overwritten by the ``MAKEFILE`` parameter in ``setup.sh``.
    269 
    270 However, you may have to adapt the makefile for your environment (the current default makefile works on Debian stretch and similar GNU/Linux distributions). If you use a new name for it, you will have to insert it into ``setup.sh``
     268This may be overwritten by the ``MAKEFILE`` parameter in ``setup_local.sh``.
     269
     270However, you may have to adapt the makefile for your environment (the current default makefile works on Debian stretch and similar GNU/Linux distributions). If you use a new name for it, you will have to insert it into ``setup_local.sh``
    271271For details on the makefile and how to adapt them, see :ref:`Fortran Makefile <ref-convert>`.
    272272
    273273 
    274 In the root directory of ``flex_extract``, open the ``setup.sh`` script
     274In the root directory of ``flex_extract``, open the ``setup_local.sh`` script
    275275with an editor and adapt the installation parameters in the section labelled with
    276276"AVAILABLE COMMANDLINE ARGUMENTS TO SET" as shown below:
     
    279279.. code-block:: bash
    280280   :caption: 'Example settings for a local installation.'
    281    :name: setup.sh
     281   :name: setup_local.sh
    282282   
    283283   ...
     
    294294   DESTINATION=None
    295295   INSTALLDIR=None
     296   SYSINSTALLDIR=None
    296297   JOB_TEMPLATE=''
    297298   CONTROLFILE='CONTROL_EA5'
     
    303304.. code-block:: bash
    304305
    305    $ ./setup.sh
     306   $ ./setup_local.sh
    306307   
    307308to start the installation. You should see the following standard output.
     
    310311.. code-block:: bash
    311312
    312     # Output of setup.sh   
     313    # Output of setup_local.sh   
    313314    WARNING: installdir has not been specified
    314315    flex_extract will be installed in here by compiling the Fortran source in <path-to-flex_extract>/flex_extract_v7.1/Source/Fortran
     
    327328    lrwxrwxrwx. 1 <username> tmc 20 Aug 12  10:59 ./calc_etadot -> calc_etadot_fast.out
    328329
     330
     331Local system installation
     332=========================
     333
     334There is also the possibility to seperate the software executables from the user application files. For doing so, the ``TARGET`` parameter can be set to "syslocal" and the additional parameter ``SYSINSTALLDIR`` in the ``setup_local.sh`` has to be specified. This new path will contain the Fortran and Python executables of ``flex_extract``. If you chose to set a system path for this, please start the script as root.
     335The user directory for ``flex_extract``, which basically consists of everything except the ``Source`` directory, will be installed into ``INSTALLDIR``.
     336In this installation mode, an extra (hidden) ``.setup.rc`` file will be generated in the ``Run`` directory. It contains the necessary settings for running the local system mode.
     337
     338Despite the change in the ``TARGET`` parameter, the meaning of ``INSTALLDIR`` and the additional ``SYSINSTALLDIR``, the steps for installation are the same as in the local installation mentioned above. For example, modify the ``setup_local.sh`` file as follows:
     339
     340
     341.. code-block:: bash
     342   :caption: 'Example settings for a local system installation.'
     343   :name: setup_local.sh
     344   
     345   ...
     346   # -----------------------------------------------------------------
     347   # AVAILABLE COMMANDLINE ARGUMENTS TO SET
     348   #
     349   # THE USER HAS TO SPECIFY THESE PARAMETER
     350   #
     351   TARGET='syslocal'
     352   MAKEFILE=<name_of_your_makefile>
     353   ECUID=None
     354   ECGID=None
     355   GATEWAY=None
     356   DESTINATION=None
     357   INSTALLDIR=$HOME
     358   SYSINSTALLDIR=/usr/bin/
     359   JOB_TEMPLATE=''
     360   CONTROLFILE='CONTROL_EA5'
     361   ...
     362
     363
     364Afterwards, type:
     365
     366.. code-block:: bash
     367
     368   $ sudo ./setup_local.sh
     369   
     370to start the installation. You should see the following standard output.
     371
     372.. code-block:: bash
     373
     374        Flex_extract will be installed in <$HOME>
     375        Install flex_extract_v7.1.2 software as syslocal in directory /usr/bin/flex_extract_v7.1.2
     376
     377        Using makefile: makefile_local_gfortran
     378        /usr/local/bin/gfortran   -O3 -march=native -L/usr/local/lib64/ -leccodes_f90 -leccodes -lm -lemosR64 -I. -I/usr/local/include/ -fdefault-real-8 -fopenmp -fconvert=big-endian   -c     ./rwgrib2.f90
     379        /usr/local/bin/gfortran   -O3 -march=native -L/usr/local/lib64/ -leccodes_f90 -leccodes -lm -lemosR64 -I. -I/usr/local/include/ -fdefault-real-8 -fopenmp -fconvert=big-endian   -c     ./phgrreal.f90
     380        /usr/local/bin/gfortran   -O3 -march=native -L/usr/local/lib64/ -leccodes_f90 -leccodes -lm -lemosR64 -I. -I/usr/local/include/ -fdefault-real-8 -fopenmp -fconvert=big-endian   -c     ./grphreal.f90
     381        /usr/local/bin/gfortran   -O3 -march=native -L/usr/local/lib64/ -leccodes_f90 -leccodes -lm -lemosR64 -I. -I/usr/local/include/ -fdefault-real-8 -fopenmp -fconvert=big-endian   -c     ./ftrafo.f90
     382        /usr/local/bin/gfortran   -O3 -march=native -L/usr/local/lib64/ -leccodes_f90 -leccodes -lm -lemosR64 -I. -I/usr/local/include/ -fdefault-real-8 -fopenmp -fconvert=big-endian   -c     ./calc_etadot.f90
     383        /usr/local/bin/gfortran   -O3 -march=native -L/usr/local/lib64/ -leccodes_f90 -leccodes -lm -lemosR64 -I. -I/usr/local/include/ -fdefault-real-8 -fopenmp -fconvert=big-endian   -c     ./posnam.f90
     384        /usr/local/bin/gfortran  rwgrib2.o calc_etadot.o ftrafo.o grphreal.o posnam.o phgrreal.o -o calc_etadot_fast.out  -O3 -march=native -L/usr/local/lib64/ -leccodes_f90 -leccodes -lm -lemosR64 -fopenmp
     385        ln -sf calc_etadot_fast.out calc_etadot
     386
     387        lrwxrwxrwx. 1 <username> tmc 20 27. Okt 23:25 ./calc_etadot -> calc_etadot_fast.out
     388        SUCCESS: INSTALLATION FINISHED!
     389
     390
     391You can now change into the user directory specified in ``INSTALLDIR`` and find a ``flex_extract_vX.X`` directory there.
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG