forum@abinit.org
Subject: The ABINIT Users Mailing List ( CLOSED )
List archive
[abinit-forum] Successful compilation of Abinit 5.8.3 with Intel on Dell PowerEdge
Chronological Thread
- From: <vpsokhan@imperial.ac.uk>
- To: forum@abinit.org
- Subject: [abinit-forum] Successful compilation of Abinit 5.8.3 with Intel on Dell PowerEdge
- Date: Fri, 19 Jun 2009 12:20:32 +0200 (CEST)
Dear All Users,
We all have different computer platforms and compilers, often at variance of
what the developers have (or have different preferences in compilation). I am
suggesting to post not only questions when something goes wrong, but also the
success stories, and would like to start from my own story. I apologise to
those who know this better, and hope that it could be useful to others saving
them from hair pulling and excessive coffee drinking. The whole procedure is
not long, in my case it took about an hour of CPU time and two man days. In
your it might be shorter. So,
Installation of Abinit 5.8.3 on Dell PowerEdge multiprocessor, the hard way
=======================================================
Here is a description how I managed to install Abinit 5.8.3 on a Xeon-based
cluster with quad-core E5430 CPU using Intel 11.0 suite (Build 20090318)
including bigdft, wannier, netcdf and etsf plugins.
If you do not need the last two, the procedure is pretty straightforward,
using
the configure script several lines below. The last two plugins caused some
problems and I will try to describe an indecent way around.
All paths, including the path to compiler and the source code are, of course,
specific to my configuration and need to be adjusted accordingly in your case.
The OS is Linux CentOS 5.2 (RedHat clone), which is pretty stable and solid.
The most recent Intel compiler (see their site) suite is assumed to be
installed in /opt/intel
First, the code was unpacked in /home/vps/src/abinit-5.8.3 and a directory for
the private build was created:
cd to $(abinit-5.8.3)
mkdir mybuild
cd mybuild
Before going any further, set the variable AR to xiar, e.g. in sh (or bash)
AR=xiar; export AR
and check it with
echo $AR
I would like to attract attention to 'AR=xiar' declaration, I found it
crucial,
since the build creates many intermediate .ar libraries, which are then
linked
to the final executables. (The GNU 'ar' creates a different structure from the
Intel's 'xiar'.
In fact, all the problems with building successful executables can be traced
to
inability of Makefile to pass 'xiar' to some of the plugin build scripts).
Another comment, do not put anything in CFLAGS, FCFLAGS, and CXXFLAGS unless
you know perfectly well what you are doing. It cost me a day to figure this
out.
Create now a short 'myconfig' file with the following contents:
-- 8< -------------------------------------------- 8< --------
../configure --prefix=/opt/abinit --with-mpi-prefix=/opt/mpich2 \
--with-mpi-fc-ldflags="-L/opt/mpich2/lib" \
CC=icc CPP="icc -E" CXX=icpc FC=ifort AR=xiar \
LDFLAGS="-L/opt/mpich2/lib"
-- 8< -------------------------------------------- 8< --------
and chmod 700 myconfig to make it executable. Execute it:
./myconfig
Carefully inspect the created config.log file. Apart from the warning about
the Intel compiler, framed in the box, there should not be any other
warnings or error messages.
If everything went smoothly, run 'make' (with fingers X-ed). I found that
'make multi-alt' breaks the make process very quickly, so used just 'make',
you may be more lucky.
During the build process two related plugins, netcdf and etsf_io, caused
problem: thus, the script stopped with Error 2, and looking for the
offender I traced it to
-- 8< -------------------------------------------- 8< --------
cd netcdf-3.6.3 && \
CPP="icc -E" \
CPPFLAGS="-DNDEBUG -DpgiFortran" \
CC="/opt/mpich2/bin/mpicc" \
CFLAGS="-fast" \
CXX="icpc" \
CXXFLAGS="-fast" \
F77="/opt/mpich2/bin/mpif90" \
FFLAGS=" -fast -ip -no-prec-div" \
F90="/opt/mpich2/bin/mpif90" \
F90FLAGS=" -fast -ip -no-prec-div" \
FC="/opt/mpich2/bin/mpif90" \
FCFLAGS=" -fast -ip -no-prec-div" \
./configure \
--prefix=/home/vps/src/abinit-5.8.3/mybuild/plugins/netcdf/tmp \
--disable-cxx
-- 8< -------------------------------------------- 8< --------
My guess was that all definitions should go inside 'configure' command, so I
opened another terminal window and cd to plugins/netcdf/netcdf-3.6.3 in it,
then commanded by hand:
./configure --prefix=/home/vps/src/abinit-5.8.3/mybuild/plugins/netcdf/tmp \
--disable-cxx CC=icc CPP="icc -E" FC=ifort AR=xiar \
LDFLAGS="-L/opt/mpich2/lib"
make
This worked and gave me a compiled plugin, 'make install' moved it to the
destination.
(I checked that the compiled lib was ok by issuing 'make check' there as
prompted).
Now for the dirty part. Go up one level (cd ../), 'ls -l' will show you that
there is a
zero-length uncompress-stamp file, which flags the make script that
uncompression
was done. We need to signal the make script that everything is finished here.
For this, abuse this directory with the following commands (my sincere
apologies
to the developers for such a 'solution'):
touch configure-stamp
touch build-stamp
touch install-stamp
touch package-ready
The order of them might be unimportant (I didn't check this) but it worked for
me
in that order. Go back to the window where you issued the make command, and
repeat it.
It will go one step further and stop with Error 2 in etsf_io directory.
(PS: after installing, I deleted the whole installation and repeated it
afresh with acquired knowledge, hmm.. in this build there were no errors in
etsf build, perhaps it was induced by my incorrect attempts at the beginning,
but I left the procedure in case you meet a problem).
So again, looking at the offending bits in the log, I converted them into a
command
-- 8< -------------------------------------------- 8< --------
./configure --prefix=/home/vps/src/abinit-5.8.3/mybuild/plugins/etsf_io/tmp \
--with-moduledir=/home/vps/src/abinit-5.8.3/mybuild/plugins/etsf_io/tmp/include
\
--with-netcdf-module-path="/home/vps/src/abinit-5.8.3/mybuild/plugins/netcdf/tmp/include"
\
--with-netcdf-ldflags="-L/home/vps/src/abinit-5.8.3/mybuild/plugins/netcdf/tmp/lib
-lnetcdf" \
CC=icc CPP="icc -E" CXX=icpc FC=ifort AR=xiar
-- 8< -------------------------------------------- 8< --------
Then, as previously, 'make' and 'make install' will complete the plugin
generation, do not forget to repeat the steps with the stamp-files!
Move the contents of tmp/ hierarchy to the upper level in two plugin folders,
i.e.
cd to etsf_io directory and issue the commands:
mv tmp/*/* ./
cd ../netcdf
mv tmp/*/* ./
(that is where the make script will look for libs and includes).
Go back to the first terminal window and issue the make command for a third
time.
That's it. After completion, check the src/98_main/ directory for the presence
of all executables.
You may run tests now. But before going, you have to adjust the tests_paral
script to point to your version of parallel library, in my case MPI was
installed in /opt/mpich2, so looking at the contents of the
run-parallel-tests.pl script in the $(abinit-5.8.3)/tests/Scripts directory,
about line 440, I found that 'green' is the answer, since this computer is
close to my configuration, so I changed line 438
from
$MPICH_DIR = '/cvos/shared/apps/openmpi/intel/64/current/bin';
to
$MPICH_DIR = '/opt/mpich2/bin';
to reflect my configuration.
With this change I managed to run all the scripts suggested by the make (at
the
end of log) and am pleased to confirm that everything passed or succeded,
apart
from one inoffensive v5/test_Linux/Case_17, where the rel. error was <
0.0040028 (accepted 0.004), which I can accept, and another case in
tutorial/Case_gw1_9, where the abs error was 0.01, while the accepted is
0.002,
and this needs to be investigated further.
Finally, if you have any questions or comments, or need to see the log or
result files, please do not hesitate to ask.
With kind regards,
Vlad Sokhan
- [abinit-forum] Successful compilation of Abinit 5.8.3 with Intel on Dell PowerEdge, vpsokhan, 06/19/2009
Archive powered by MHonArc 2.6.16.