Compiling abinit 6.0.x on Mac OS X 10.6.4 using ifort 11.1
Posted: Wed Jun 30, 2010 9:04 pm
I am having issues compiling any of the abinit 6.0.x packages using ifort 11.1.088 on Mac OS X 10.6.4. The problem is that I receive undefined symbol errors while linking abinit, but the symbols appear to exist in the linking command. Here is an overview of what I found:
(1) I created a very minimal configuration using the following command
$ ../configure FC=ifort CC=icc CXX=icpc --disable-all-plugins --with-linalg-libs="-llapack -lblas"
Output attached as configure.log
(2) Run make
$ make
Output here: http://ms.physics.ucdavis.edu/~ldamewood/make.log
(3) One of the undefined symbols from the make log is "_pseudo_pwscf_mp_ecutrho_" from lib45_psp_parser.a. I checked to see if this symbol exists anywhere and it appears to exist in lib45_psp_parser.a itself.
$ nm -A src/45_psp_parser/lib45_psp_parser.a | grep _pseudo_pwscf_mp_ecutrho_
src/45_psp_parser/lib45_psp_parser.a:m_pseudo_pwscf.o: 0000000000000010 C _pseudo_pwscf_mp_ecutrho_
src/45_psp_parser/lib45_psp_parser.a:read_upf_pwscf.o: U _pseudo_pwscf_mp_ecutrho_
(4) This problem does not exist when using gfortran where the symbol type is different.
$ nm -A src/45_psp_parser/lib45_psp_parser.a | grep ecutrho
src/45_psp_parser/lib45_psp_parser.a:m_pseudo_pwscf.o: 0000000000149940 D ___pseudo_pwscf_MOD_ecutrho
src/45_psp_parser/lib45_psp_parser.a:read_upf_pwscf.o: U ___pseudo_pwscf_MOD_ecutrho
I'm not exactly sure what the difference between a common symbol (C) and a data section symbol (D) is, or if that really matters. This issue seems to be a bug in the mac version of ifort or how abinit handles the pwscf module; I'm also using an older version of ifort in RHL and everything appears to work there. I don't currently have access to that machine so I can't upload any logs from it. I hope this information provides some clue on how to avoid or fix this bug.
(1) I created a very minimal configuration using the following command
$ ../configure FC=ifort CC=icc CXX=icpc --disable-all-plugins --with-linalg-libs="-llapack -lblas"
Output attached as configure.log
(2) Run make
$ make
Output here: http://ms.physics.ucdavis.edu/~ldamewood/make.log
(3) One of the undefined symbols from the make log is "_pseudo_pwscf_mp_ecutrho_" from lib45_psp_parser.a. I checked to see if this symbol exists anywhere and it appears to exist in lib45_psp_parser.a itself.
$ nm -A src/45_psp_parser/lib45_psp_parser.a | grep _pseudo_pwscf_mp_ecutrho_
src/45_psp_parser/lib45_psp_parser.a:m_pseudo_pwscf.o: 0000000000000010 C _pseudo_pwscf_mp_ecutrho_
src/45_psp_parser/lib45_psp_parser.a:read_upf_pwscf.o: U _pseudo_pwscf_mp_ecutrho_
(4) This problem does not exist when using gfortran where the symbol type is different.
$ nm -A src/45_psp_parser/lib45_psp_parser.a | grep ecutrho
src/45_psp_parser/lib45_psp_parser.a:m_pseudo_pwscf.o: 0000000000149940 D ___pseudo_pwscf_MOD_ecutrho
src/45_psp_parser/lib45_psp_parser.a:read_upf_pwscf.o: U ___pseudo_pwscf_MOD_ecutrho
I'm not exactly sure what the difference between a common symbol (C) and a data section symbol (D) is, or if that really matters. This issue seems to be a bug in the mac version of ifort or how abinit handles the pwscf module; I'm also using an older version of ifort in RHL and everything appears to work there. I don't currently have access to that machine so I can't upload any logs from it. I hope this information provides some clue on how to avoid or fix this bug.