Spml Installation Guide Operation Environment Spml library is operated by following environments. * OS + Debian GNU/Linux >= ver. 6, + Red Hat Enterprise Linux >= ver.6 * Fortran Compiler + GFortran >= ver. 4.7 o with OpenMPI 1.4.5, 1.6.5 o with MPICH2 1.0.7 + Intel ® Compilers + The Portland Group Spml library was operated by following environments in the past. Latest version may be operated (unconfirmed). * NEC SX-6 + FORTRAN90/SX * NEC SX-8 + FORTRAN90/SX * NEC SX-8R + FORTRAN90/SX * NEC SX-9 + FORTRAN90/SX General outline Install spml as follows. Refer each items for details. 1. Satisfy Software Requirements. 2. Build the library following How to build. 3. Install the library following How to install. 4. Check whether the installed library functions normally following Execute test programs. 5. Set PATH. Software Requirements The following software needs to use spml * netCDF, >= ver. 3.6 * gtool5 * ispack How to build Extract TGZ Package 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 Specify Fortran compiler to environment variable FC . For example, if you use "gfortran", * sh, bash $ FC=gfortran ; export FC * csh, tcsh $ setenv FC gfortran Specify Fortran compiler options for optimization and debug to environment variable FCFLAGS . For example, if you set options for automatic optimization and automatic parallelization to Fujitsu Fortran, * sh, bash $ FCFLAGS="-O3 -fopenmp" ; export FCFLAGS * csh, tcsh $ setenv FCFLAGS "-O3 -fopenmp" Execute `configure' 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 `Makefile' 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. 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 needed for build to ARG. You must specify explicitly. --with-netcdff=ARG If the netCDF library is a shared library, the library may be divided C library from Fortran library. In the case, specify the C library to above option, and specify the Fortran library to ARG in this option. --with-netcdf-include=ARG Set location of netCDF header file for fortran(netcdf.inc), if you need. --with-gtool5=ARG Specify gtool5 library needed for build to ARG. You must specify explicitly. --with-ispack=ARG Specify ispack library needed for build to ARG. You must specify explicitly. --with-ssl2=ARG --with-ssl2tp=ARG --with-lapack=ARG Specify library using solve eigenvalue problem to ARG, if you need. --with-lumatrix=ARG Specify library using solve liner equations to ARG. Default value is OMP. OMP Using spml soubroutine for Scalar processor. VEC Using spml soubroutine for Vector processor. SSL2 Using DALU, DLUX in Fujitsu SSL2 library. SSL2TP Using DM_VALU, DM_VLUX in Fujitsu SSL2 Thread parallelization library. LAPACK Using DGETRF, DGETRS in LAPACK library. --with-fftw=ARG --with-rfftw=ARG Specify library using FFTW ver.2. You must specify explicitly if you build ispack library with -FFTW2 option. --with-mpifc=ARG Specify MPI Fortran Compiler to ARG if you want to build MPI support. --with-mpiexec=ARG Specify MPI execute program to ARG if you want to execute MPI test. --prefix=ARG Specify prefix to ARG. Default value is /usr/local/spml . --host=ARG When cross-compiling, specify the type of system on which the package will run to ARG. --libdir=ARG Specify directory to which the library is installed to ARG. Default value is /usr/local/spml/lib . --includedir=ARG Specify directory to which the module is installed to ARG. Default value is /usr/local/spml/include . --bindir=ARG Specify directory to which the executable file is installed to ARG. Default value is /usr/local/spml/bin . --with-docdir=ARG Specify directory to which the documentation file is installed to ARG. Default value is /usr/local/spml/doc . --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". How to build for MPI If spml is built for MPI, install MPI library to a system, and build gtool5 library with MPI support, see Gtool5 Installation Guide. When execute "configure", specify a compile commend like as "mpif90" to environment variable FC . And specify "--with-mpifc" and "--with-mpiexec" option of "configure". $ ./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 \ --with-mpiexec=/usr/local/mpich/mpiexec \ See Execute `configure' about other options. Compile source code When ./configure is executed, Makefile is updated displayed as follows. Execute `make' as follows: $ make How to 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 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 Set PATH 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/gfortran -I/usr/local/spml/include \ -I/usr/local/gtool5/include \ -I/usr/local/netcdf/include \ -O2 -fopenmp test.f90 \ -L/usr/local/spml/lib \ -lspml \ -L/usr/lib/gtool5/lib \ -L/usr/local/netcdf/lib \ -L/usr/local/ispack/lib \ -lgtool5 -lnetcdf -lispack