Next: Installation of Nero2d, Previous: Installation on GNU/Linux, Up: Installation on GNU/Linux
Nero2d is designed to be a performant simulator tool. Internally, it depends on a few high-performance libraries which are widely available. As most hardware vendors have their own optimized implementations of these libraries, we strongly recommend using them. It is up to you to find suitable versions which provide you with the maximum performance for your system. The required performance libraries are FFTW
, BLAS
and LAPACK
. In the next sections, these are discussed in detail.
FFTW
Nero2d requires the FFTW
library, or the Fastest Fourier Transform of the West, version 3.0 or higher. The library is likely to be present on your system already, if not, it can be installed using your package manager. If you use yum
to install software (Fedora, Redhat, etc.), you will need to install the fftw
, fftw-devel
and optionally the fftw-static
packages. If you use aptitude
to install software (Debian, Ubuntu, etc.), you will need the fftw3
and fftw3-dev
packages.
You can also opt to compile FFTW
from source: it can be freely downloaded at www.fftw.org. Nero2d requires the installation of the double precision, non-threaded version of FFTW
(the default installation). It is recommended to do a global install of FFTW
i.e. install FFTW
in the standard location (usually /usr/local
) so that it is accessible to all users. This will however, require root access to your system. If you do a local installation (somewhere in your home directory) of the FFTW
library, Nero2d provides a configuration flag to locate it (see Configure options for Nero2d). For a detailed refernce on the FFTW
library, please consult its manual.
BLAS
and LAPACK
Nero2d also requires the BLAS
library, or the Basic Linear Algebra Subprograms, and the LAPACK
, or the Linear Algebra PACKage. Most vendors provide optimized libraries for free and you should try to use these in the first place. The configure script can detect a great number of BLAS
and LAPACK
implementations. If everything fails however, and no BLAS
or LAPACK
are found on your system, Nero2d can compile the libraries ifself. This can (and most likely will) result in a poor performance.
Some packages install BLAS
and/or LAPACK
libraries in a non-standard location: Nero2d provides configuration flags to locate them (see Configure options for Nero2d). We specifically support two vendor specific implementations: the ACML
from AMD and the MKL
from Intel.
ACML
For people with AMD based systems, the ACML
or AMD Core Math Library includes both the BLAS
and the LAPACK
routines. It can be freely downloaded (after registration) at http://developer.amd.com. Nero2d's configure script has built-in support for the ACML
and will detect them if they are installed. As a default, ACML
is installed in the /opt/acmlX.X.X/
directory and the libraries are inside /opt/acmlX.X.X/F77/lib
(where F77 is the fortran compiler used to generate the ACML
). This is a non-default path for libraries and you will need to point out this location to the configure script:
./configure --with-blas-dir=/opt/acmlX.X.X/F77/lib
Note that if you want to link against dynamic libraries (.so
), you will first need to set the the LD_LIBRARY_PATH
environment variable before running the configure script and before invoking the nero2d binary.
export LD_LIBRARY_PATH=/opt/acmlX.X.X/F77/lib:$LD_LIBRARY_PATH
or
setenv LD_LIBRARY_PATH "/opt/acmlX.X.X/F77/lib:$LD_LIBRARY_PATH"
You might want to automate this process by adding this line to the .profile
file.
Optionally, you can copy the content from /opt/acmlX.X.X/F77/lib
to /usr/lib
or /usr/local/lib
. In this case, there is no need to rename the libraries to libblas
and/or liblapack
and there is no need to set any environment variables.
Note that ACML
fully supports the --enable-blasfunc
if you use the same Fortran compiler to build Nero2d as was used to build ACML
(see Configure options for Nero2d).
Please refer to the ACML
manual for (/opt/acmlX.X.X/Doc/acml.pdf
) for a full reference.
MKL
For people with Intel based systems, the MKL
or Math Kernel Library includes both the BLAS
and the LAPACK
routines. It can be downloaded (free trial download) at http://www.intel.com. Nero2d's configure script has built-in support for the MKL
and will detect them if they are installed. As a default, MKL
is installed in the /opt/intel/mkl/X.X.X
directory and the libraries are inside /opt/intel/mkl/X.X.X/lib/ARCH
(where ARCH
is 32
, 64
or em64t
depending on the processor your are using). This is a non-default path for libraries and you will need to point out this location to the configure script:
./configure --with-blas-dir=/opt/intel/mkl/X.X.X/lib/ARCH
Note that if you want to link against dynamic libraries (.so
), you will first need to set the the LD_LIBRARY_PATH
environment variable before running the configure script and before invoking the nero2d binary.
export LD_LIBRARY_PATH=/opt/intel/mkl/.../ARCH:$LD_LIBRARY_PATH
or
setenv LD_LIBRARY_PATH "/opt/intel/mkl/.../ARCH:$LD_LIBRARY_PATH"
Note that the shell scripts in /opt/intel/mkl/VERSION/tools/environment
can take care of this for you. You might want to automate this process by adding this line to the .profile
file.
Optionally, you can copy the content from /opt/intel/mkl/VERSION/lib/ARCH
to /usr/lib
or /usr/local/lib
. In this case, there is no need to rename the libraries to libblas
and/or liblapack
and there is no need to set any environment variables.
Note that MKL
fully supports the --enable-blasfunc
if you use the same Fortran compiler to build Nero2d as was used to build MKL
. In practice, we have noted (in version 10.0.1) that MKL
supports the g77
Fortran calling conventions and not those of gfortran
. You are advised to compile Nero2d using the g77
compiler if you can. However, it appears that the --enable-blasfunc
is fully compatible with the combination of gfortran
and MKL
. The configure script will issue a warning, but on our test system, everything went smooth. Be carefull however that this might just be luck.
BLAS
/LAPACK
(not recommended)
If no BLAS
and/or LAPACK
are found on your system, Nero2d will compile these libraries from source. This can however, result in a poor performance. Please note that the source files inside the directory src/zofpack/machcons
need to be compiled without any sort of optimization. This is forced by overriding the $FFLAGS
variable and setting them to empty for that directory. If you should have a Fortran compiler with default optimization turned on, you will need to edit src/zofpack/machcons/Makefile.am
manually and set the $FFLAGS
to disable this optimization. You will need to rerun automake
first to regenerate the Makefiles.