Next: Parallel Nero2d, Previous: Pre-requisitions for Nero2d (GNU/Linux), Up: Installation on GNU/Linux
Nero2d comes with a configure
script in the GNU style. Installation can be as simple as:
./configure make make install
This will build the non-MPI flavor of Nero2d and will install it in the standard place. This typically requires root privileges. To specify a different install directory use the --prefix
flag to configure
.
./configure --prefix=yourinstalldirectory
If you have problems during configuration or compilation, you may want to run make clean
before trying again; this ensures that you don't have any files left over from previous compilation attempts.
Nero2d is written in C++ but internally compiles two or more Fortran-77 libraries: AMOS
, PIM
and optionally BLAS
and LAPACK
). If you link against pre-build (optimized) BLAS
and LAPACK
libaries, you must use a compatible Fortran compiler (including compiler options) with our software as were used to compile BLAS
/LAPACK
. To specify a specific Fortran compiler use e.g. for the g77
compiler
./configure F77=g77
or
./configure F77=gfortran
for the gfortran
compiler.
The configure script will not attempt to set any compiler flags for the Fortran or C++ compiler as this is a bad practice. Instead, you should do it yourself.
./configure CXXFLAGS="-O3" FFLAGS="-O3"
will set the optimization to level 3 for both the C++ compiler and the Fortran compiler. In general, it is likely that you do not want to use the default values. In most cases, you will want to set the installation prefix and both optimization flags as a minimum.
If configure has completed succesfully, it returns a short overview of the settings. It can for instance look like this (AMD system with gfortran
compiler using gcc version 4.1.2):
*************************************************************** nero2d is now configured for Source directory: . Installation prefix: /home/jfostier/nero2d C++ compiler: g++ -O3 Fortran compiler: gfortran -O3 Fortran libraries: -L/usr/lib/gcc/x86_64-linux-gnu/4.1.2 -L/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -lgfortranbegin -lgfortran -lm BLAS libraries: -lacml LAPACK libraries: FFTW libraries: -lfftw3 LIBS: LDFLAGS: Type "make" to build the program. ***************************************************************
At this point, the configure script will also issue a warning if no BLAS
and/or LAPACK
library is found, or if a non-compatible Fortran compiler is used. Please run ./configure --help
for more details about options and refer to section Configure options for Nero2d for a detailed description.