[Pw_forum] Compiling pwscf using ifc 7.1 on a x64-64 system
Jonathan Breeze
breezejd at lsbu.ac.uk
Thu Feb 26 13:31:24 CET 2004
Dear Pwscf users,
Just thought I would share some of my experiences getting pwscf (version
1.3 and 2.0) to compile using Intel Fortran Compiler (IFC) on a 64-bit
linux system (AMD64 on Suse 9.0 x86_64). I had a few tiny troubles
getting pwscf to compile so here goes.
I use IFC version 7.1 build 20030307Z.
1) Getting IFC to compiler and link 32-bit code and libraries.
ifc needs to be in the execution path, so in a bash shell run :
export PATH=$PATH:/opt/intel/compiler70/ia32/bin
To prevent having to do this every time you open a new terminal, add
this to the .bashrc file.
IFC needs the '-Wl,-melf_i386' option in order to compile and link
32-bit code and libraries. To make life easier and not have to add this
option explicitly everytime IFC is called (i.e. editing makefiles), edit
the file /opt/intel/compiler70/ia32/bin/ifc.cfg and add '-Wl,-melf_i386'
at the end of the first line.
ifc.cfg should now look like;
-Xlinker -rpath -Xlinker /opt/intel/compiler70/ia32/lib
-I/opt/intel/compiler70/ia32/include -Wl,-melf_i386
Test that ifc work properly my running it from the command-line. You
should see something like;
/usr/lib/crt1.o(.text+0x18): In function `_start':
../sysdeps/i386/elf/start.S:98: undefined reference to `main'
So far so good.
2) evironment variables for configure script.
Make IFC the default Fortran compiler by executing
export F90=ifc
export F77=ifc
and make gnu C compiler generate 32-bit code by executing
export CC="gcc -m32"
3) Optimisations (I found that the -axW or -xW option wouldn't compile,
but it may for your configuration).
export FFLAGS="-Vaxlib -O3 -tpp7"
4) Configure
The x86_64-unkown-linux-gnu architecture is presently not recognised by
the configure script.
So, instead of ./configure type
./configure --build=i686-pc-linux-gnu
for pw.1.3.0 ./configure should be replaced by ./configure.new
3) Make everything as usual
make all; make links
----------------------
This should work hopfeully, as it did for me using Suse 9.0, but it
might not for other x86_64 distributions. Please let me know if
otherwise or if I have made some grevious mistakes in the above. Thanks.
Kind regards to all Pwscf users,
Jnathan Breeze
More information about the users
mailing list