Page 1 of 1

Compiling error in 6.12.1 about "illegal data type length.."

Posted: Sat Feb 04, 2012 4:49 pm
by vistawanted
I tried to compile Abinit 6.12.1 in OpenSUSE 12.1 x86_64 system on intel i5-750.
The gcc (with g++ and gfortran) version is:

Code: Select all

gcc (SUSE Linux) 4.6.2
Copyright (C) 2011 Free Software Foundation, Inc.

MPICH2 v1.4 was compiled by pgf90 (PGI workstation x86_64 v9.0, trial version).
I began configure by the command: ./configure --prefix=${HOME}/Abinit --enable-mpi=yes --enable-64bit-flags=yes FC=mpif90
After the success of configure, I began compiling by: make mj4
Then I found the compilation skip BLAS-LAPACK process and met an error, checking fortran compiler works...no, when etsf-io was configuring.
Finally I found the problem was in fallbacks/exports, the folder "lib64" was built instead of "lib". Therefore I made "ln -s ./lib64 ./lib" and copied libblas.a and liblapack.a from PWscf to fallbacks/exports/lib64. Then, all of plugin-software was compiled well.
But, when it ran to src/12_hide_mpi, a serious problem occurred:
mpif90 -DHAVE_CONFIG_H -I. -I../.. -I../../src/incs -I../../src/incs -I/home/user/abinit-6.12.1/fallbacks/exports/include -g -c -o m_xmpi.o m_xmpi.F90
mpif90 -DHAVE_CONFIG_H -I. -I../.. -I../../src/incs -I../../src/incs -I/home/user/abinit-6.12.1/fallbacks/exports/include -g -c -o interfaces_12_hide_mpi.o interfaces_12_hide_mpi.F90
PGF90-W-0031-Illegal data type length specifier for integer (m_xmpi.F90: 1917)
PGF90-W-0031-Illegal data type length specifier for delim_record16 (m_xmpi.F90: 1917)
PGF90-W-0031-Illegal data type length specifier for integer (m_xmpi.F90: 2058)
PGF90-W-0031-Illegal data type length specifier for delim_record16 (m_xmpi.F90: 2058)
PGF90-W-0031-Illegal data type length specifier for integer (m_xmpi.F90: 2456)
PGF90-W-0031-Illegal data type length specifier for bufdelim16 (m_xmpi.F90: 2456)
PGF90-W-0031-Illegal data type length specifier for integer (m_xmpi.F90: 2693)
PGF90-W-0031-Illegal data type length specifier for bufdelim16 (m_xmpi.F90: 2693)
PGF90-S-0450-Argument number 3 to mpi_type_hvector: kind mismatch (m_xmpi.F90: 2214)
0 inform, 0 warnings, 1 severes, 0 fatal for xmpio_create_fsubarray_2d
PGF90-S-0450-Argument number 3 to mpi_type_hvector: kind mismatch (m_xmpi.F90: 2297)
PGF90-S-0450-Argument number 3 to mpi_type_hvector: kind mismatch (m_xmpi.F90: 2299)
0 inform, 0 warnings, 2 severes, 0 fatal for xmpio_create_fsubarray_3d
PGF90-S-0450-Argument number 3 to mpi_type_hvector: kind mismatch (m_xmpi.F90: 2383)
PGF90-S-0450-Argument number 3 to mpi_type_hvector: kind mismatch (m_xmpi.F90: 2385)
PGF90-S-0450-Argument number 3 to mpi_type_hvector: kind mismatch (m_xmpi.F90: 2387)
0 inform, 0 warnings, 3 severes, 0 fatal for xmpio_create_fsubarray_4d

This problem was caused by the source code in m_xmpi.F90:

Code: Select all

!Local variables-------------------------------
!scalars
 integer :: bsize_frm,mpi_type_frm
 integer*2  :: delim_record2
 integer*4  :: delim_record4
 integer*8  :: delim_record8
#if defined HAVE_FC_INT_QUAD
 integer*16 :: delim_record16       ! <---------------- problem is here
#endif
 character(len=500) :: msg
!arrays
 integer :: statux(MPI_STATUS_SIZE)

By the way, before this problem, the /src/11_qespresso_ext/read_upf_pwscf.F90 and /src/12_hide_mpi/m_xmpi.F90 need defs_basis.mod for compiling:

Code: Select all

use defs_basis

I had to copy the file defs_basis.mod manually.....

All of above problems does not happen in the CentOS v6.2 x86_64 with MPICH2-v1.4 compiled by ifort 12.

Re: Compiling error in 6.12.1 about "illegal data type lengt

Posted: Sat Feb 04, 2012 9:12 pm
by jbeuken
HI,

I don't known if your issue is related to the mpich2 version, but I encountered this kind of problem with mpich2 1.4.x

see for example, viewtopic.php?f=3&t=1459&p=4537&hilit=mpich2#p4538

it works with the mpich2 1.5.a2

regards

jmb

Re: Compiling error in 6.12.1 about "illegal data type lengt

Posted: Sun Feb 05, 2012 7:33 am
by vistawanted
jbeuken wrote:HI,

I don't known if your issue is related to the mpich2 version, but I encountered this kind of problem with mpich2 1.4.x

see for example, viewtopic.php?f=3&t=1459&p=4537&hilit=mpich2#p4538

it works with the mpich2 1.5.a2

regards

jmb

Thank you for your reply.
Even though I am not sure whether it is related to MPICH2 version or PGI compiler problem, since in the CentOS system, such a software configuration was success:
mpif90 -v
mpif90 for MPICH2 version 1.4.1p1
ifort version 12.1.2

I will try MPICH2 1.5.a2, and report the result, again.

Re: Compiling error in 6.12.1 about "illegal data type lengt

Posted: Sun Feb 05, 2012 8:45 am
by vistawanted
I have tried compiling mpich2 1.5.a2 by pgf95, again. And previous problem was solved.
But the problem, during copiling in src, that the next folder cannot recognize the mod file from previous folders, is still remain, and BLAS and LAPACK have to been compiled manually.
The compiling have not finished yet, due to the *mod files problem... :?

Re: Compiling error in 6.12.1 about "illegal data type lengt

Posted: Mon Feb 06, 2012 6:14 pm
by pouillon
The build system of Abinit has no support for PGI, because their Fortran compiler has too many bugs. Hence, if you want to be able to build Abinit with pgf95, you'll have to tell the compiler to store .mod files in the src/mods/ folder. You can achieve this by setting FCFLAGS on the command-line of configure. If I remember correctly, it should be something like '-M $(abinit_moddir)'. You should check the documentation of pgf95 for the proper flag.

Please note as well that the build will only use the default optimizations of the compiler. You might thus want to add more compiler in the FCFLAGS variable, e.g.:

Code: Select all

../configure FCFLAGS='-O3 -M $(abinit_moddir)'
Notice the use of single quotes here.

Re: Compiling error in 6.12.1 about "illegal data type lengt

Posted: Wed Feb 29, 2012 11:40 pm
by abidave
pouillon wrote:The build system of Abinit has no support for PGI, because their Fortran compiler has too many bugs.


If you run into a bug with a PGI compiler, you can send it to trs@pgroup.com or post at http://www.pgroup.com/userforum/viewforum.php?f=4 They are pretty good at fixing issues reported from users. PGI is working currently working on supporting Abinit and correcting a few issues. If you come across issues, now is a great time to report them to the user forum.


pouillon wrote:Hence, if you want to be able to build Abinit with pgf95, you'll have to tell the compiler to store .mod files in the src/mods/ folder. You can achieve this by setting FCFLAGS on the command-line of configure. If I remember correctly, it should be something like '-M $(abinit_moddir)'. You should check the documentation of pgf95 for the proper flag.


The right flag is -module

If you edit "configure" and set the value of abinit_moddir, this will be passed through, or you can just set -module ${PWD}/src/mods

In either case, there is an install in the "fallbacks" directory structure which is not set up to look in either -module or abinit_moddir, so the build will stop there.

pouillon wrote:Please note as well that the build will only use the default optimizations of the compiler. You might thus want to add more compiler in the FCFLAGS variable, e.g.:

Code: Select all

../configure FCFLAGS='-O3 -M $(abinit_moddir)'
Notice the use of single quotes here.


With PGI you want to try the base optimization flag of -fast rather then -O3. -fast turns on the vectorizer and other higher level optimizations.

Re: Compiling error in 6.12.1 about "illegal data type lengt

Posted: Tue Mar 06, 2012 9:45 pm
by jbeuken
Hi abidave,

abidave wrote:
pouillon wrote:The build system of Abinit has no support for PGI, because their Fortran compiler has too many bugs.

If you run into a bug with a PGI compiler, you can send it to trs@pgroup.com or post at http://www.pgroup.com/userforum/viewforum.php?f=4 They are pretty good at fixing issues reported from users. PGI is working currently working on supporting Abinit and correcting a few issues. If you come across issues, now is a great time to report them to the user forum.


the main problem is related with "optional argument" in subroutine
and it's very difficult to report the problem to PGI because a very simple test with optional parameter works... :?

for example, the rhohxc() in src/56_xc/rhohxc.F90 has a optional argument :

subroutine rhohxc(dtset,enxc,gsqcut,izero,kxc,mpi_enreg,nfft,ngfft,&
& nhat,nhatdim,nhatgr,nhatgrdim,nkxc,nk3xc,nspden,n3xccc,option,rhog,rhor,rprimd, &
& strsxc,usexcnhat,vhartr,vxc,vxcavg,xccc3d,&
& k3xc,electronpositron,taug,taur,vxctau) ! optional argument


and, for example, the compilation crashes in "67_common/energy.F90" with a very strange message ( seems unrelated... ) :

[67_common]# make
/usr/local/openmpi_pgi/bin/mpif90 -DHAVE_CONFIG_H -I. -I../.. -I../../src/incs -I../../src/incs -I/root/WorkSpace/6.12.1-public/fallbacks/exports/include -Mfree -module /root/WorkSpace/6.12.1-public/src/mods -g -Mextend -c -o energy.o energy.F90
ILM file: can't find intrinsic ..sqrt
PGF90-F-0000-Internal compiler error. Errors in ILM file 1 (energy.F90)
make: *** [energy.o] Error 2


but if I comment out all call of rhohxc() in energy.F90 , the compilation works...

it's the same with some other subroutines with optional argument...

only for memory :

- support of pgi by the build system , add the file "config/hints/fc_pgi_default-hints.conf"

Code: Select all

[DEFAULT]
#big_endian = -convert big_endian
fixed = -Mfixed
free = -Mfree
moddir = -module $(abinit_moddir)
pic = -fPIC
comp = -Mextend
link =

# Remove -vec-report0 on ia64
[any-ia64]
comp = -Mextend


- my .ac file for configure for my tests is :

Code: Select all

enable_mpi="yes"
enable_mpi_io="yes"
with_mpi_prefix="/usr/local/openmpi_pgi"
with_trio_flavor="none"
with_linalg_flavor="none"
with_dft_flavor="none"
enable_clib="yes"
enable_gw_dpc="yes"
enable_maintainer_checks="no"
enable_test_timeout="yes"
enable_gui_build="no"
with_linalg_flavor="netlib"
with_linalg_libs="-L$HOME/lib64 -llapack -lblas"


the pgi version is :

pgf90 12.1-0 64-bit target on x86-64 Linux -tp nehalem


regards

jmb

Re: Compiling error in 6.12.1 about "illegal data type lengt

Posted: Tue Mar 06, 2012 10:04 pm
by abidave
Hi JMB -

The particular issue that you are seeing - it's been sent to PGI and they have identified what is causing the problem. I hope to see a fix for that in the next couple of weeks.

I'll be sure to post when that issue is fixed and I get a chance to run some of the tests.

Re: Compiling error in 6.12.1 about "illegal data type lengt

Posted: Tue Mar 06, 2012 10:15 pm
by jbeuken
Thanks !

no trace of a fix in the new version 12.2 in http://www.pgroup.com/support/release_tprs_2012.htm

jmb