This thread is a message from administrator.
Top Page > Browsing
Tips for installation of OpenMX
Date: 2007/09/25 17:12
Name: T.Ozaki

Dear All,

The following is tips for installation of OpenMX.

Most problems in installation of OpenMX come from compilation
of LAPACK and BLAS and its linking. Thus, I shall show tips for
installation of OpenMX on several platforms.


(1) Intel Pentium 4 and Xeon (32 bit)

A simple way is to use highly optimized ATLAS library (libatlas_p4.a)
provided by Dr. Axel Kohlmeyer.
http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/cpmd-linux.html#atlas
Then, you may link these libraries in makefile of OpenMX,

CC = mpicc -O3 -I/usr/local/include
LIB = -L/usr/local/lib -lfftw3 -latlas_p4 -static

Another way is to use CLAPACK http://www.netlib.org/clapack/
The compilation of CLAPACK is made by

1. get clapack.tgz from netlib.org

2. tar zxvf clapack.tgz

3. cd CLAPACK/

4. cp -f INSTALL/make.inc.LINUX ./make.inc
(You can change the compiler and compile options
in the make.inc.)

5. make f2clib

6. make blaslib

7. cd SRC

8. make (lapack_LINUX.a is made)

9. cd ../TESTING/MATGEN/

10. make

11. cd ../../

12. If you are a super user, do
cp lapack_LINUX.a /usr/local/lib/liblapack.a
cp blas_LINUX.a /usr/local/lib/libblas.a
cp F2CLIBS/libF77.a /usr/local/lib/libg2c.a
cp F2CLIBS/libI77.a /usr/local/lib/libI77.a
cp clapack.h /usr/include
cp F2CLIBS/f2c.h /usr/include
/sbin/ldconfig

Then, you may link these libraries in makefile of OpenMX,

CC = mpicc -O3 -I/usr/local/include
LIB = -L/usr/local/lib -lfftw3 -llapack -lblas -lg2c -static

or

CC = mpicc -Dbraswrap -O3 -I/usr/local/include
LIB = -L/usr/local/lib -lfftw3 -llapack -lblas -lg2c -lI77-static

12' if you are not a super user, do
mkdir ~/lib
mkdir ~/include
cp lapack_LINUX.a ~/lib/liblapack.a
cp blas_LINUX.a ~/lib/libblas.a
cp F2CLIBS/libF77.a ~/lib/libg2c.a
cp F2CLIBS/libI77.a ~/lib/libI77.a
cp clapack.h ~/include
cp F2CLIBS/f2c.h ~/include

Then, you may link these libraries in makefile of OpenMX,

CC = mpicc -O3 -I/usr/local/include -I$(HOME)/include
LIB = -L$(HOME)/lib -lfftw3 -llapack -lblas -lg2c -static

or

CC = mpicc -Dbraswrap -O3 -I/usr/local/include -I$(HOME)/include
LIB = -L$(HOME)/lib -lfftw3 -llapack -lblas -lg2c -lI77 -static



(2) Intel Pentium D and Xeon (EM64T)

A simple way is to use highly optimized ATLAS library (libatlas_x86_64.a)
provided by Dr. Axel Kohlmeyer.
http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/cpmd-linux.html#atlas

Then, you may link these libraries in makefile of OpenMX,

CC = mpicc -O3 -I/usr/local/include -I$(HOME)/include
LIB = -L$(HOME)/lib -lfftw3 -latlas_x86_64 -static



(3) AMD Opteron

A simple way is to use ACML library (acml-3-1-0-gnu-64bit.tgz)
provided by AMD. http://developer.amd.com/acml.aspx

Then, you may link these libraries in makefile of OpenMX,

CC = mpicc -fast -I$(HOME)/include
LIB = -L$(HOME)/lib -lfftw3 -lacml -L/opt/gcc33/lib64 -lg2c



(4) Intel Itanium

A simple way is to use MKL library.

Then, you may link these libraries in makefile of OpenMX,

CC = mpicc -O3 -I$(HOME)/include -I/opt/intel/mkl/include -Wl,--allow-multiple-definition
LIB = -L$(HOME)/lib -lfftw3 -L/opt/intel/mkl/lib/64 -lmkl_lapack -lmkl_ip -lguide -L/usr/lib -lpthread -static



------------------------------------------

As for Intel icc compilear Version 9.0

There is a specific problem for the intel icc compiler Version 9.0.
When "-O3" is used for icc Version 9.0 as compile option, the icc
compiler often optimizes a code incorrectly, and as a result the
executable file behaves in a unexpected mannar, although I am not
sure whether this is a bug of Version 9.0 or not.
(Note: I did not see the problem in Versions 7.0 and 8.0)

The solution is to use another option instead of "-O3".
I checked the effect of the compiler option for Version 9.0 and
obtained the following result.

"-O1" works well
"-O2" works well
"-O3" no good for bulk systems
"-Os" works but does not work for some of input files
"-fast" may work (but I am not sure)

A better choice is to use "-O2" for Intel icc Version 9.0.




------------------------------------------

As for Portland PGCC compiler Version 7.0

There is a specific problem for the portland pgcc compiler Version 7.0.
When "-fast" or more is used for icc Version 7.0 as compile option,
the pgcc compiler often optimizes a code incorrectly, and as a result the
executable file behaves in a unexpected mannar, although I am not
sure whether this is a bug of Version 7.0 or not.
(Note: I did not see the problem in Versions 5.1 and 6.1)

The solution is to use another option instead of "-O3".
I checked the effect of the compiler option for Version 9.0 and
obtained the following result.

"-O1" works well
"-O2" works well
"-O3" works well
"-fast" no good
"-fastsse" no good

A better choice is to use "-O3" for Porland pgcc Version 7.0.