I am trying to compile abinit-7.0.4 on Bluegene/Q system. i use IBM XLC version 12.1 and IBM XLFORTRAN version 14.1. The autoconf options I have is:
./configure
--enable-mpi=yes
--enable-mpi-io=yes
CC=mpixlc
CXX=mpixlcxx
FC=mpixlf90
--with-dft-flavor="none"
--with-trio-flavor="none"
--enable-fc-wrapper=yes
CFLAGS="-O2 -q64 -qspill=5000 -qarch=qp -qtune=qp -qcache=auto -qstrict -qnosave -qlanglvl=stdc99"
FCFLAGS="-qnosave -q64 -qpic=large -qmaxmem=-1 -O2 -qspill=5000 -qarch=auto -qtune=auto -qcache=auto -qstrict -qsuppress=1520-022:1520-031:1500-036 -qzerosize"
CPPFLAGS="-DNDEBUG -D_ALL_SOURCE"
CPP="mpixlc -EC"
--with-linalg-flavor="none"
enable_64bit_flags="yes"
MPI_RUNNER=runjob
--host=powerpc-unknown-linux
In this configuration I will always meet a problem with code m_iso_c_binding.F90. It involves with config.h. Here I have tried several things:
1. If I enable fc-wrapper like above, I will get errors saying "(W) command option t contains an incorrect subargument".
2. If I disable fc-wrapper with --enable-fc-wrapper=no, I will meet with /* comment problem on file m_iso_c_binding.F90. That is, in config.h, all comments with /* COMMENT */ style will cause error. I tried to remove all the comments in config.h manually and that file will compile but there are more files that needs this manual comment removal and I just cannot do that for all headers.
Also I tried to read ibm XLFORTRAN reference manual and I quote the file
Avoiding preprocessing problems
Because Fortran and C differ in their treatment of some sequences of characters, be
careful when using /* or */. These might be interpreted as C comment delimiters,
possibly causing problems even if they occur inside Fortran comments. Also be
careful when using three-character sequences that begin with ?? (which might be
interpreted as C trigraphs).
Please refer to http://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1 for more information. What I just quoted was at the bottom of page 31.
In my opinion the 2nd way---disabling fc-wrapper should be correct and there should be a way to disregard those comments by passing an option to xlf90 compiler but I just don't know how to do that.
Any help is greatly appreciated. Thanks in advance.
Best
Xiangpisai