Gt4f90io library is operated by following environments.
Gt4f90io library was operated by following environments in the past. Latest version may be operated (unconfirmed).
gt4f90io support following data format.
Install gt4f90io as follows. Refer each items for details.
There are examples of installation in "Tutorial" on gtool4 Project. Refer them if the installation is not successful.
When you are using Debian GNU/Linux, binary packages distributed with <URL:http://www.gfd-dennou.org/library/gtool4/debian.htm.en> can be used.
Naohito OTOBE (in JAPANESE) creates Windows binaries for Compaq Visual Fortran6.6. See Gt4f90io Windows binaries (in JAPANESE).
The following software needs to use gt4f90io.
Debian GNU/Linux (use binary packages)
debian packages [Fujitsu ver5 | Intel ver8.1 | g95]
If you use above Debian package to install netCDF, you need "netcdf-bin" package too. (Parhaps you can get by "apt-get").
Build from source codes
Following softwares should be installed for generating documentations. But, if you get from gt4f90io TGZ package, documentations are already generated.
Make an empty directory, and extract archive. A directory `gt4f90io-version' created at the current working directory.
$ tar xvzf gt4f90io-current.tgz
or
$ zcat gt4f90io-current.tar.gz | tar -xvf -
Specify Fortran compiler to environment variable FC . For example, if you use "frt",
sh, bash
$ FC=frt ; export FC
csh, tcsh
$ setenv FC frt
Specify Fortran compiler options for optimization and debug to environment variable FFLAGS . For example, if you set options for automatic optimization and automatic parallelization to "frt",
sh, bash
$ FFLAGS="-Kfast,parallel" ; export FFLAGS
csh, tcsh
$ setenv FFLAGS "-Kfast,parallel"
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
GNU make is needed to build, so configure automatically inquires
into GNU make in PATH. However, it returns error when GNU make is
not found. In that case, please set the GNU make command for
environment variable MAKE . And rerun execute ` ./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--prefix=
ARG /usr/local/gt4f90io
.
--host=
ARG--libdir=
ARG /usr/local/gt4f90io/lib
.
--includedir=
ARG /usr/local/gt4f90io/include
.
--bindir=
ARG /usr/local/gt4f90io/bin
.
--with-docdir=
ARG /usr/local/gt4f90io/doc
.
--with-gt4libname=
ARGlib
<ARG>.a
.
Default value is gt4f90io
, so library name becomes
libgt4f90io.a
.
--with-gt4suffix=
ARG 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=
ARG95
" is valid.
The compiler that can be used is limited.
--enable-debug
--with-abort=
ARGabort, errtra-setrcd, exit, setrcd, stop
to
ARG.
Default value is abort
.
--config-cache or -C
config.cache
is created at the same time as Config.mk
's
being generated.
config.cache
stores information investigated with
./configure
.
If you set this option, when you execute ./configure
again,
config.cache
is loaded.
If you want to ignore config.cache
, don't set this option
For example, execute ./configure
as follows.
$ ./configure -C --with-netcdf=/usr/local/netcdf/lib/libnetcdf.a --enable-debug
Then, information such as the locations of the netCDF library is
succeeded by executing ./configure
as follows after next time.
$ ./configure -C
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
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" MAKE : GNU make command AR : Archive command ARFLAGS : Flags of AR RANLIB : Generate index to archive
You must use GNU make to build. No other "make" program is acceptable. "make" tentatively means GNU make at the following. Replace them with GNU make of your system.
When ./configure is executed, the command name of GNU make is displayed as follows. Execute GNU make according to this message.
Execute GNU make in the current directory, as follows. /usr/bin/make
To generate documentations, execute the following command in current directory. If you get from gt4f90io TGZ package, documentations are already generated.
$ make doc
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
In current directry, execute following command.
If message " *** Compilation and installation are succeeded !! ***
"
are showed without error, installation is completed.
$ make test-installed
If you are cross-compiling, following messages will be displayed.
Cross compile mode will be used. First, change directory to ./test . Secondly, submit ... dc_string_test ... histtest ..., Thirdly, change directory to ./ . Last "make test-installed-c"
According to above message, test as follows.
If message " *** Compilation and installation are succeeded !! ***
"
are showed without error, installation is completed.
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/
.
sh, bash
$ PATH=$PATH:/usr/local/gt4f90io/bin ; export PATH
csh, tcsh
$ setenv PATH $PATH:/usr/local/gt4f90io/bin
gt4frt is a shell script in order to easily compile and link Fortran programs which utilizes the gt4f90io library. Link to the gt4f90io library and directory appointment to the modules are done automatically by using gt4frt in place of command of the Fortran compiler.
$ gt4frt test.f90 /usr/bin/g95 -I/usr/local/gt4f90io/include -O test.f90 \ -L/usr/local/gt4f90io/lib -lgt4f90io -L/usr/local/lib -lnetcdf