Loading...
Searching...
No Matches
INSTALL GUIDE

Set PATH to gt5frt

If the installation is correctly done as stated above, shell script ((gt5frt)) is made under the directory --prefix=ARG/bin (By default, /usr/local/gtool5/bin/ ).

Please specify PATH to this directory. It is an example as follows when ((gt5frt)) is installed in /usr/local/gtool5/bin/ .

((gt5frt)) is a shell script in order to easily compile and link Fortran programs which utilizes the gtool5 library. Link to the gtool5 library and directory appointment to the modules are done automatically by using gt5frt in place of command of the Fortran compiler.

$ gt5frt test.f90
/usr/bin/gfortran -I/usr/local/gtool5/include -I/usr/include -g -O2 test.f90 \
  -L/usr/local/stow/gtool5/lib -lgtool -L/usr/lib -lnetcdff -lnetcdf

Prerequisite

To use the gtool5 fortran library, the following software is required.

How to install

Extract tar.gz

Make an empty directory, and extract archive. A directory gtool5-version‘’ created at the current working directory.

$ tar xvf gtool5_current.tar.gz

Specify Fortran Compiler

Specify Fortran compiler to environment variable ((* FC *)), e.g.

% FC=gfortran

Specify Fortran compiler options for optimization and debug to environment variable FCFLAGS, e.g.,

% FCFLAGS="-g -O2 -fopenmp"

Move created directroy, and excute ./configure'.

% ./configure

If you want to change directory to which the library and the module, etc. are installed, please set --help option as follow. Available options are showed.

% ./configure --help

Descriptions about principal options are listed below.

  • --with-nf-config=ARG
    • Default: search nf-config from ((:PATH:)).
    • If you want to use another nf-config, set the location of nf-config to ARG explicitly.
  • --with-netcdf=ARG
    • When you can't execute nf-config, set the location of NetCDF C Library to ARG explicitly.
  • --with-netcdff=ARG
    • When you can't execute nf-config, set the location of NetCDF Fortran library to ARG explicitly.
  • --with-netcdff-include=ARG
    • When you can't execute nf-config, set the location of module file netcdf.mod to ARG explicitly.
  • --prefix=ARG
    • Default: /usr/local/gtool5. set prefix to ARG.
  • --host=ARG
    • When cross-compiling, set the type of system on which the package will run to ARG.
  • --enable-mpi
    • Default: enable
    • Enable MPI support. Set MPI Fortran Compiler to ((:FC:)), e.g. mpif90.
  • --with-mpiexec
    • Default: none
    • Set MPI execute program for test.
  • --with-ncdump
    • Default: search ((:ncdump:)) from ((:PATH:)).
    • Set ((:ncdump:)) for test.