[English | Japanese] [GFD Dennou Club | Gtool4 Project] [Gt4f90io Reference Manual]

Gt4f90io Installation Guide



Operation Environment

This program is operated by following environments.

Input Output Data Format

gt4f90io support following data format.

Libraries needed for compile

To use gt4f90io, following softwares should be installed.

If you use above Debian package to install netCDF, you need "netcdfg-dev" package too. (Parhaps you can get by "apt-get").

Following softwares should be installed for generating documentations. But, if you get from gt4f90io TGZ package, documentations are already generated.

Compile source code

Extract TGZ Package

Make an empty directory, and extract archive. A directory `gt4f90io-version' created at the current working directory.

$ tar xvzf gt4f90io-current.tgz

Specify Fortran Compiler

Specify Fortran compiler to environmental variable FC . For example, if you use "frt",

Specify Fortran compiler options for optimization and debug to environmental variable FFLAGS . For example, if you set options for automatic optimization and automatic parallelization to "frt",

Create `Config.mk'

Move created directroy, and excute ` ./configure '.

If your path of netCDF library is `/usr/local/netcdf/lib/libnetcdf.a', you should set options as follow.

A configure file `Config.mk' created at the current working directory.

$ ./configure --with-netcdf=/usr/local/netcdf/lib/libnetcdf.a

config.cache is also created with Config.mk . This file stores arguments of options. When you execute ./configure again, config.cache is loaded automatically. If you nullify previous settings, do following command.

$ make distclean

If you use Fujitsu Fortran compiler in Debian GNU/Linux, copy "Config.cache.debian-ffc*" to config.cache and execute ./configure . So, locations of libraries are specified automatically.

$ cp Config.cache.debian-ffc5 config.cache
$ ./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-netcdf=ARG
Specify netCDF library in Libraries needed for compile to ARG. You must specify explicitly.
--prefix=ARG
Specify prefix to ARG. Default value is /usr/local/gt4f90io .
--libdir=ARG
Specify directory to which the library is installed to ARG. Default value is /usr/local/gt4f90io/lib .
--includedir=ARG
Specify directory to which the module is installed to ARG. Default value is /usr/local/gt4f90io/include .
--bindir=ARG
Specify directory to which the executable file is installed to ARG. Default value is /usr/local/gt4f90io/bin .
--with-docdir=ARG
Specify directory to which the documentation file is installed to ARG. Default value is /usr/local/gt4f90io/doc .
--with-fc=ARG
Specify Fortran compiler. This option have priority over shell variable "$FC". Use when you want to override config.cache. (Once config.cache is created, shell variable "$FC" is ignored).
--with-fflags=ARG
Specify options for debug and optimization. Shell variables "$FFLAGC" and "$FCFLAGS" are used too when compiled and linked.
--with-gt4libname=ARG
Specify gt4f90io library name to ARG. Library name becomes lib<ARG>.a . Default value is gt4f90io , so library name becomes libgt4f90io.a .
--with-gt4suffix=ARG
Specify suffix of installdir, library name, executable files toARG. For example, you specify ffc5 when others are default, prefix of installdir becomes /usr/local/gt4f90io-ffc5 , library name becomes libgt4f90io-ffc5.a , executable files become gt4frt.ffc5 , gt4config.ffc5 .
--with-lang_conform_check=ARG
Specify language standard to ARG. And when you compile source code, check the language standard conformance. Now, "95" is valid. The compiler that can be used is limited.
--enable-debug
When you compile source code and execute binary file, output debug messages. The compiler that can be used is limited.
--with-abort=ARG
Specify one of abort, errtra-setrcd, exit, setrcd, stop to ARG. Default value is abort .
abort
Stop by intrinsic subroutine "abort".
errtra-setrcd
Stop by Fujitsu Fortran service subroutine "ERRTRA". And outputs error trace back map.
exit
Stop by intrinsic subroutine "exit".
setrcd
Stop by Fujitsu Fortran service subroutine "SETRCD". And outputs error trace back map.
stop
Stop by intrinsic subroutine "stop".

Edit `Config.mk'

Edit `Config.mk' manually, if you want to change.

FC          : Fortran Compiler

SYSFFLAGS   : Flags needed when compiled and linked

SYSLDFLAGS  : Flags needed when linked

SYSLDLIBS   : Libraries needed when linked

F90MODTYPE  : Information of Modules
              (std.mod, HP.mod, fqs.mod, intel.d, hitachi.f90)

DEST_LIB    : Directory to which the library file is installed

DEST_INC    : directory to which the module files are installed

DEST_BIN    : directory to which the executable files are installed

DEST_DOC    : directory to which the documantation files are installed


MODS        : Extensions of Module Files used when "make clean"

AR          : Archive command

Compile source code

In current directory, execute following command.

$ make

Generate documentations

To generate documentations, execute following command in current directory. If you get from gt4f90io TGZ package, documentations are already generated.

$ make doc

Install Procedure

In current directory, execute following command. If you install to system, you need to be administrator. (By default, you install to system).

# make install

If you want to install documentation files, execute following command.

# make install-doc

Execute test programs

In current directry, execute following command. If message " *** Compilation and installation are succeeded !! *** " are showed without error, installation is completed.

$ make test-installed

Path to gt4frt

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

Please specify PATH to this directory. It is an example as follows when gt4frt is installed in /usr/local/gt4f90io/bin/ .

gt4frt is a command like the rapper of the Fortran compiler. This command compiles Fortran files automatically linking with the gt4f90io library.

$ gt4frt test.f90

/usr/bin/frt -I/usr/lib/gtool4-ffc4/include -w -Am test.f90 \
    -L/usr/lib/gtool4-ffc4/lib -lgtool4 -L/usr/lib -lnetcdf-ffc4

$Id: INSTALL,v 1.8 2006/01/17 11:21:57 morikawa Exp $
Gtool4 Development Group / GFD Dennou Staff dcstaff@gfd-dennou.org