Page 1 of 1

Error on "make", involving FREEIF in defs.h

Posted: Tue Apr 08, 2014 10:14 pm
by FranklinDFT
Hello,

We are attempting to install ABINIT v7.6 in a non-parallel implementation. The configure step was successful, but when we attempt to "make", there is an error compiling the file "src/62_ctqmc/m_ListCdagC.F90" with gfortran-4.3. The Error message is as follows:

gfortran-4.3 -DHAVE_CONFIG_H -I. -I../../../src/62_ctqmc -I../.. -I../../src/incs -I../../../src/incs -I/users2/mikclark/abinit-7.6.2/build/fallbacks/exports/include -ffree-form -J/users2/mikclark/abinit-7.6.2/build/src/mods -O2 -c -o m_ListCdagC.o ../../../src/62_ctqmc/m_ListCdagC.F90
../../../src/62_ctqmc/m_ListCdagC.F90:129.31:

IF(ALLOCATED( list_1%list )) THEN \newline deallocate( list_1%list , stat=ABI
1
Error: Cannot assign to a named constant at (1)
../../../src/62_ctqmc/m_ListCdagC.F90:242.29:

IF(ALLOCATED(list_temp)) THEN \newline deallocate(list_temp, stat=ABI_ALLOC
1
Error: Cannot assign to a named constant at (1)
../../../src/62_ctqmc/m_ListCdagC.F90:954.29:

IF(ALLOCATED(list_1%list)) THEN \newline deallocate(list_1%list, stat=ABI_ALL
1
Error: Cannot assign to a named constant at (1)
make[3]: *** [m_ListCdagC.o] Error 1
make[3]: Leaving directory `/users2/mikclark/abinit-7.6.2/build/src/62_ctqmc'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/users2/mikclark/abinit-7.6.2/build/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/users2/mikclark/abinit-7.6.2/build'
make: *** [all] Error 2


By looking in the F90 file, it seems that something is going wrong with FREEIF(list_1%list). The FREEIF function is defined in the "defs.h" header file and list_1 is a user-defined data type called ListCdagC. However, this error DOES NOT OCCUR when other F90 files are compiled, even if they also use FREEIF with a user-defined data-type. It seems there is a problem with the file m_ListCdagC.F90, but I cannot trace where it could be, particularly since the error above is not descriptive. Can anyone assist us or provide any advice?

Thanks in advance.

Re: Error on "make", involving FREEIF in defs.h

Posted: Tue Apr 08, 2014 11:47 pm
by Jordan
Hi,

A quick and efficient fix is to configure abinit with

Code: Select all

FCFLAGS_EXTRA="-ffree-line-lenght-none -DHAVE_HAVE_FC_LONG_LINES"

that you can add in your *.ac file or directly on the command line

Code: Select all

./configure FCFLAGS_EXTRA="-ffree-line-lenght-none -DHAVE_HAVE_FC_LONG_LINES"


The build should success.

If that does not work, please let me know.

Jordan

Re: Error on "make", involving FREEIF in defs.h

Posted: Sun Jun 15, 2014 1:10 pm
by eimamagi
Hello,

I am getting the same error with the version 7.6.4 and mvapich2 1.8-1 (gcc-gfortran-4.4.7-4.el6.x86_64 on RHEL 6). I tried setting the FCFLAGS_EXTRA in configure step but the error is still there. Is there anything else that could be done to solve this issue?

Thanks in advance
emir

Re: Error on "make", involving FREEIF in defs.h

Posted: Mon Jun 16, 2014 12:19 pm
by pouillon
Please note that GCC 4.3 is not supported anymore by Abinit and that GCC 4.4 is quite outdated. They both have bugs which are triggered by Abinit, which means that, even if your build succeeds, you may encounter strange issues at run-time. Using a more recent version of GCC and/or waiting for the upcoming 7.8.1 version of Abinit (beginning of July) would already improve the situation significantly.

In the meantime, you may try the "--enable-fc-wrapper" option of configure, which may partly solve your problem.

Re: Error on "make", involving FREEIF in defs.h

Posted: Mon Jun 16, 2014 3:13 pm
by eimamagi
Hello,

thanks for a quick response. I modified the --configure with the option you suggested, but now it is failing with:

Code: Select all

/usr/lib64/mvapich2/bin/mpif90 -m64 read_upf_pwscf_cpp.f90  -DHAVE_CONFIG_H -P -ffree-form -J/root/rpmbuild/BUILD/abinit-7.6.4/src/mods -O2 -DLINUX -D_FILE_OFFSET_BITS=
64 -D_LARGEFILE64_SOURCE -c -o read_upf_pwscf.o  -I. -I../.. -I../../src/incs -I../../src/incs -I/root/rpmbuild/BUILD/abinit-7.6.4/fallbacks/exports/include
read_upf_pwscf_cpp.f90:67.24:

     if (matches ("<PP_"
                        1
Error: Syntax error in argument list at (1)
read_upf_pwscf_cpp.f90:69.36:

300 call errore ('scan_begin', 'No '
                                    1
Error: Syntax error in argument list at (1)
read_upf_pwscf_cpp.f90:66.44:

     read (iunps, *, iostat = ios, err = 300) rstring
                                            1
Error: ERR tag label 300 at (1) not defined
read_upf_pwscf_cpp.f90:87.22:

  if (matches ("</PP_"
                      1
Error: Syntax error in argument list at (1)
read_upf_pwscf_cpp.f90:89.12:

       'No '
            1
Error: Syntax error in argument list at (1)
read_upf_pwscf_cpp.f90:86.45:

  read (iunps, '(a)', iostat = ios, err = 300) rstring
                                             1
Error: ERR tag label 300 at (1) not defined
ABINIT WRAPPER END (exit code 1)


Since we're using RHEL6 it is not trivial to replace default gcc and rebuild mvapich2. Do you think GCC 4.4 will be fully supported in Abinit 7.8.1 or should we start working on newer versions of gcc?

Thanks in advance
emir

Re: Error on "make", involving FREEIF in defs.h

Posted: Mon Jun 16, 2014 8:03 pm
by pouillon
Should still work, and we'll do our best to help you with it, since it's a highly-bugfixed release. But future versions of Abinit will likely require GCC >= 4.6. If you do a manual upgrade, think of GCC 4.9. Our tests give very good results with it.