Spml library is operated by following environments.
Spml library was operated by following environments in the past. Latest version may be operated (unconfirmed).
Install spml as follows. Refer each items for details.
The following software needs to use spml
Make an empty directory, and extract archive. A directory `spml-version' created at the current working directory.
$ tar xvzf spml_current.tgz
or
$ zcat spml_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 SYSFFLAGS . For example, if you set options for automatic optimization and automatic parallelization to Fujitsu Fortran,
sh, bash
$ SYSFFLAGS="-Kfast,parallel" ; export FFLAGS
csh, tcsh
$ setenv SYSFFLAGS "-Kfast,parallel"
Move created directroy, and excute ` ./configure
'.
You should set necessary library location, netCDF, gtool5, ispack.
If your path of netCDF library is `/usr/local/netcdf/lib/libnetcdf.a',
gtool5 library is `/usr/local/gtool5/lib/libgtool5.a',
ISPACK library is `/usr/local/ispack/lib/libisp.a',
you should set options as follow.
Then a configure file `Config.mk' will be created at
the current working directory.
If the netCDF library is a shared library, --with-netcdff=
option may be needed.
See details of options as follows.
$ ./configure --with-netcdf=/usr/local/netcdf/lib/libnetcdf.a \ --with-gtool5=/usr/local/gtool5/lib/libgtool5.a \ --with-ispack=/usr/local/ispack/lib/libisp.a
If spml is built for MPI, see How to build for MPI.
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--with-netcdff=
ARG--with-netcdf-include=
ARG--with-gtool5=
ARG--with-ispack=
ARG--with-ssl2=
ARG--with-ssl2tp=
ARG--with-lapack=
ARG--with-lumatrix=
ARGVEC
.
--with-fftw=
ARG--with-rfftw=
ARG--with-mpifc=
ARG--prefix=
ARG /usr/local/spml
.
--host=
ARG--libdir=
ARG /usr/local/spml/lib
.
--includedir=
ARG /usr/local/spml/include
.
--bindir=
ARG /usr/local/spml/bin
.
--with-docdir=
ARG /usr/local/spml/doc
.
--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 \ --with-gtool5=/usr/local/gtool5/lib/libgtool5.a \ --with-ispack=/usr/local/ispack/lib/libisp.a
Then, information such as the locations of libraries is
succeeded by executing ./configure
as follows after next time.
$ ./configure -C
If spml is built for MPI, install MPI library to a system, and build gtool5 library with MPI support, see Gtool5 Installation Guide.
When "Config.mk" is edited, specify a compile commend like as "mpif90" to environment variable FC . And specify "--with-mpiexec" option of "configure".
$ ./configure -C --with-netcdf=/usr/local/netcdf/lib/libnetcdf.a \ --with-gtool5=/usr/local/gtool5/lib/libgtool5.a \ --with-ispack=/usr/local/ispack/lib/libisp.a \ --with-mpifc=/usr/local/mpich/mpif90
See Create `Config.mk' about other options.
Edit `Config.mk
' manually, if you want to change.
If you do not understand following settings,
go forward to Compile source code tentatively.
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 Spml TGZ package, documentations are already generated.
$ make doc $ make install
In current directory, execute following command. If you install to system, you need to be administrator. (By default, you install to system).
# make install
In current directry, execute following command.
If message " *** Compilation and installation are succeeded !! ***
"
are showed without error, installation is completed.
$ make test
If the installation is correctly done as stated above,
shell script spmfrt is made under the directory
--prefix=
ARG/bin
(By default, /usr/local/spml/bin/
).
Please specify PATH to this directory.
It is an example as follows when spmfrt is installed in
/usr/local/spml/bin/
.
sh, bash
$ PATH=$PATH:/usr/local/spml/bin ; export PATH
csh, tcsh
$ setenv PATH $PATH:/usr/local/spml/bin
spmfrt is a shell script in order to easily compile and link Fortran programs which utilizes the spml library. Link to the gtool5 library and directory appointment to the modules are done automatically by using spmfrt in place of command of the Fortran compiler.
$ spmfrt test.f90 /usr/bin/g95 -I/usr/local/spml/include \ -I/usr/local/gtool5/include -O test.f90 \ -L/usr/local/gtool5/lib \ -L/usr/local/netcdf/lib \ -L/usr/local/ispack/lib \ -L/usr/local/spml/lib \ -lgtool5 -lnetcdf -lisp -lspml