Syntax error at or near / (../../config.h: 1)

Hi,

I am having difficulty compiling Abinip the parallel version of the open source Abinit. Any help would be really appreciated!!

Here is 1) the error message, followed by the 2) the config.h file and the 3) the code that won’t compile:

1)----------------------------------------------------------------------------------------------
/opt/openmpi.pgi/bin/mpif90 -DHAVE_CONFIG_H -I. -I…/… -I…/…/src/defs -I…/…/src/defs -I…/…/src/00basis -I…/…/src/00basis -I…/…/src/lib01hidempi -I…/…/src/lib01hidempi -Df2cFortran -O2 -g -module /homes/cor/bin/src/abinit-5.7.4_mithras/tmp-modules -I/homes/cor/bin/src/abinit-5.7.4_mithras/tmp-modules -Mextend -c -o initmpi_grid.o initmpi_grid.F90
PGF90-S-0034-Syntax error at or near / (…/…/config.h: 1)
PGF90-S-0034-Syntax error at or near / (…/…/config.h: 2)
PGF90-S-0034-Syntax error at or near / (…/…/config.h: 4)
PGF90-S-0034-Syntax error at or near * (…/…/config.h: 5)
PGF90-S-0034-Syntax error at or near * (…/…/config.h: 6)
PGF90-S-0034-Syntax error at or near * (…/…/config.h: 7)
PGF90-S-0034-Syntax error at or near * (…/…/config.h: 8)
PGF90-S-0034-Syntax error at or near * (…/…/config.h: 9)
PGF90-S-0034-Syntax error at or near * (…/…/config.h: 10)
PGF90-S-0034-Syntax error at or near * (…/…/config.h: 11)
PGF90-S-0034-Syntax error at or near * (…/…/config.h: 12)
PGF90-S-0021-Label field of continuation line is not blank (…/…/config.h: 16)
PGF90-S-0021-Label field of continuation line is not blank (…/…/config.h: 17)
PGF90-S-0021-Label field of continuation line is not blank (…/…/config.h: 19)
PGF90-S-0021-Label field of continuation line is not blank (…/…/config.h: 20)
PGF90-S-0021-Label field of continuation line is not blank (…/…/config.h: 21)
PGF90-S-0034-Syntax error at or near / (…/…/config.h: 14)
PGF90-S-0021-Label field of continuation line is not blank (…/…/config.h: 26)
PGF90-S-0034-Syntax error at or near / (…/…/config.h: 25)
PGF90-S-0021-Label field of continuation line is not blank (…/…/config.h: 29)
PGF90-S-0034-Syntax error at or near / (…/…/config.h: 28)
PGF90-S-0021-Label field of continuation line is not blank (…/…/config.h: 32)
PGF90-S-0034-Syntax error at or near / (…/…/config.h: 31)
PGF90-S-0021-Label field of continuation line is not blank (…/…/config.h: 35)
PGF90-S-0034-Syntax error at or near / (…/…/config.h: 34)




2)---------------------------------------------------------------------------------------------


/* config.h. Generated from config.h.in by configure. /
/
config.h.in. Generated from configure.ac by autoheader. */

/*

  • Copyright (C) 2005-2009 ABINIT Group (Yann Pouillon)
  • All rights reserved.
  • This file is part of the ABINIT software package. For license information,
  • please see the COPYING file in the top-level directory of the ABINIT source
  • distribution.

*/

/* ABINIT configuration */

#ifndef _ABINIT_CONFIG_H
#define _ABINIT_CONFIG_H

#ifdef __INTEL_COMPILER
#define FC_INTEL 1
#endif



/* ABINIT target description */
#define ABINIT_TARGET “x86_64_linux_pgi6.2”

/* ABINIT whole version number */
#define ABINIT_VERSION “5.7.4”

/* ABINIT base version number */
#define ABINIT_VERSION_BASE “5.7”

/* ABINIT build date */
#define ABINIT_VERSION_BUILD “20090703”

/* ABINIT major version number */
#define ABINIT_VERSION_MAJOR “5”

/* ABINIT micro version number (patch level) */
#define ABINIT_VERSION_MICRO “4”

/* ABINIT minor version number */
#define ABINIT_VERSION_MINOR “7”

/* Define to 1 if you are using the COMPAQ C compiler /
/
#undef COMPAQ_CC */

/* Define to 1 if you are using the COMPAQ C++ compiler /
/
#undef COMPAQ_CXX */

/* Define to 1 to turn on debug mode /
/
#undef DEBUG_MODE */

/* Define to 1 if you are using the ABSOFT Fortran compiler /
/
#undef FC_ABSOFT */

/* Define to 1 if you are using the COMPAQ Fortran compiler /
/
#undef FC_COMPAQ */

/* Define to dummy `main’ function (if any) required to link to the Fortran
libraries. /
/
#undef FC_DUMMY_MAIN */

/* Define if F77 and FC dummy `main’ functions are identical. /
/
#undef FC_DUMMY_MAIN_EQ_F77 */

/* Define to 1 if you are using the Fujitsu Fortran compiler /
/
#undef FC_FUJITSU */

/* Define to a macro mangling the given C identifier (in lower and upper
case), which must not contain underscores, for linking with Fortran. /
/
#undef FC_FUNC */

/* As FC_FUNC, but for C identifiers containing underscores. /
/
#undef FC_FUNC_ */

/* Define to 1 if you are using the G95 Fortran compiler /
/
#undef FC_G95 */

/* Define to 1 if you are using the GNU Fortran compiler /
/
#undef FC_GCC */

/* Define to 1 if you are using the Hitachi Fortran compiler /
/
#undef FC_HITACHI */

/* Define to 1 if you are using the IBM XL Fortran compiler /
/
#undef FC_IBM */

/* Define to 1 if you are using the Intel Fortran compiler /
/
#undef FC_INTEL */

/* Define to 1 if you are using the MIPSpro Fortran compiler /
/
#undef FC_MIPSPRO */

/* Define to 1 if you are using the Open64 Fortran compiler /
/
#undef FC_OPEN64 */

/* Define to 1 if you are using the PathScale Fortran compiler /
/
#undef FC_PATHSCALE */

/* Define to 1 if you are using the Portland Group Fortran compiler */
#define FC_PGI 1

/* Define to 1 if you are using the Portland Group Fortran compiler version 6
/
/
#undef FC_PGI6 */

/* Define to 1 if you are using the Sun WorkShop /
/
#undef FC_SUN */

/* Define to 1 if you are using the GCC C compiler /
/
#undef GCC_CC */

/* Define to 1 if you are using the GCC C++ compiler /
/
#undef GCC_CXX */

/* Define to 1 if you want support for BIGDFT */
#define HAVE_BIGDFT 1

/* Define to 1 if you want to use bindings /
/
#undef HAVE_BINDINGS */

/* Define to 1 if you are working in a Bazaar branch /
/
#undef HAVE_BZR_BRANCH */

/* Define to 1 if you want to use internal error handlers /
/
#undef HAVE_ERROR_HANDLERS */

/* Define to 1 if you want support for ETSF_IO */
#define HAVE_ETSF_IO 1

/* Define to 1 if you want support for ETSF_XC */
#define HAVE_ETSF_XC 1

/* Define to 1 if your Fortran compiler supports exit() */
#define HAVE_FC_EXIT 1

/* Define to 1 if your Fortran compiler supports flush() */
#define HAVE_FC_FLUSH 1

/* Define to 1 if your Fortran compiler supports gamma() /
/
#undef HAVE_FC_GAMMA */

/* Define to 1 if you want to use the FFTW library /
/
#undef HAVE_FFTW */

/* Define to 1 if you want to use the threaded FFTW library /
/
#undef HAVE_FFTW_THREADS */

/* Define to 1 if you want support for FOX /
/
#undef HAVE_FOX */

/* Define to 1 if you want to use the GNU Scientifc Library /
/
#undef HAVE_GSL */

/* Define to 1 if you want to perform double-precision GW calculations /
/
#undef HAVE_GW_DPC */

/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1

/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1

/* Define to 1 if you want support for NETCDF */
#define HAVE_NETCDF 1

/* Define to 1 if you want to use the PAPI library /
/
#undef HAVE_PAPI */

/* Define to 1 if you have <signal.h>. /
/
#undef HAVE_SIGNAL_H */

/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1

/* Define to 1 if you have <stdio.h>. /
/
#undef HAVE_STDIO_H */

/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1

/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1

/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1

/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1

/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1

/* Define to 1 if you want support for WANNIER90 */
#define HAVE_WANNIER90 1

/* Define to 1 if you want support for XMLF90 /
/
#undef HAVE_XMLF90 */

/* Define to 1 if you are using the IBM XL C compiler /
/
#undef IBM_CC */

/* Define to 1 if you are using the IBM XL C++ compiler /
/
#undef IBM_CXX */

/* Define to 1 if you are using the Intel C compiler /
/
#undef INTEL_CC */

/* Define to 1 if you are using the Intel C++ compiler /
/
#undef INTEL_CXX */

/* Name of package */
#define PACKAGE “abinit”

/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT “Bugs : ABINIT

/* Define to the full name of this package. */
#define PACKAGE_NAME “ABINIT”

/* Define to the full name and version of this package. */
#define PACKAGE_STRING “ABINIT 5.7.4”

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME “abinit”

/* Define to the version of this package. */
#define PACKAGE_VERSION “5.7.4”

/* Define to 1 if you are using the PathScale C compiler /
/
#undef PATHSCALE_CC */

/* Define to 1 if you are using the PathScale C++ compiler /
/
#undef PATHSCALE_CXX */

/* Define to 1 if you are using the Portland Group C compiler */
#define PGI_CC 1

/* Define to 1 if you are using the Portland Group C++ compiler */
#define PGI_CXX 1

/* Read file list from a file instead of standard input /
/
#undef READ_FROM_FILE */

/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* Define to 1 if you are using the Sun C compiler /
/
#undef SUN_CC */

/* Define to 1 if you are using the Sun C++ compiler /
/
#undef SUN_CXX */

/* Use C clock instead of Fortran clock for timings /
/
#undef USE_CCLOCK */

/* Define to 1 if you want to be able to use macroave */
#define USE_MACROAVE 1

/* Version number of package */
#define VERSION “5.7.4”

/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel and VAX). */
#if defined BIG_ENDIAN

define WORDS_BIGENDIAN 1

#elif ! defined LITTLE_ENDIAN
/* # undef WORDS_BIGENDIAN */
#endif

#endif /* _ABINIT_CONFIG_H */


3----------------------------------------------------------------------------------------------------------

!{\src2tex{textfont=tt}}
!!***f ABINIT/initmpi_grid
!! NAME
!! initmpi_grid
!!
!! FUNCTION
!! Initialize the mpi informations for the grid
!! 2D if parallization FFT/BAND (!MPI paral_kgb)
!! 3D if parallization KPT/FFT/BAND (paral_kgb & MPI)
!!
!! COPYRIGHT
!!
!! INPUTS
!! mpi_enreg=informations about MPI parallelization
!!
!! OUTPUT
!! mpi_enreg=informations about MPI parallelization
!!
!! SIDE EFFECTS
!!
!! TODO
!!
!! PARENTS
!! abinit
!!
!! CHILDREN
!!
!! SOURCE

#if defined HAVE_CONFIG_H
include “config.h”
#endif
#if defined MPI && defined MPI2
use mpi
#endif
#if defined MPI && defined MPI1
include ‘mpif.h’
#endif

subroutine initmpi_grid(dtset,mpi_enreg)

use defs_basis
use defs_datatypes

!This section has been created automatically by the script Abilint (TD).
!Do not modify the following lines by hand.
!use interfaces_01manage_mpi, except_this_one => initmpi_grid
!End of the abilint section

implicit none



!ARGUMENTS
!=========================================
type(dataset_type),intent(in) :: dtset
type(MPI_type),intent(inout) :: mpi_enreg

!LOCAL VARIABLES
!=========================================
!Variables introduced for MPI version
integer :: ierr

!Variables introduced for the bandFFT version
logical :: reorder
logical, allocatable :: periode(:), keepdim(:)
integer, allocatable :: coords(:)
integer :: np_test

!DEBUG
! write(6,*)’ initmpi_grid : enter’
!ENDDEBUG

!Default parameters, for safety of sequential use
mpi_enreg%me_fft=0
mpi_enreg%me_kpt=0
mpi_enreg%me_band=0

#if defined MPI
! if(dtset%paral_kgb ==1) then

! TEST THE PARAMETERS OF THE 3D GRID
! ========================================

if(mpi_enreg%nproc_fft* &
& mpi_enreg%nproc_band* &
& mpi_enreg%nproc_kpt /= mpi_enreg%nproc)then

write(6,‘(8a,i5,a,i5,a,i5,a,i5)’) ch10,&
& ’ initmpi_grid : BUG -‘,ch10,&
& ’ The number of bandFFTkpt processors, npbandnpfftkpt, should be’,ch10,&
& ’ equal to the total number of processors, nproc.‘,ch10,&
& ’ However, npband=’,mpi_enreg%nproc_band,&
& ’ npfft =‘,mpi_enreg%nproc_fft,&
& ’ npkpt =’,mpi_enreg%nproc_kpt,&
& ’ and nproc=',mpi_enreg%nproc
call leave_new(‘PERS’)

end if

write(6,*) ‘npfft, npband and npkpt’,&
& mpi_enreg%nproc_fft,&
& mpi_enreg%nproc_band,&
& mpi_enreg%nproc_kpt

! CREATE THE 3D GRID
! ==================================================

mpi_enreg%dimcart=3

allocate(mpi_enreg%sizecart(mpi_enreg%dimcart))
allocate(periode (mpi_enreg%dimcart))
allocate(mpi_enreg%coords (mpi_enreg%dimcart))

mpi_enreg%sizecart(1) = mpi_enreg%nproc_fft
mpi_enreg%sizecart(2) = mpi_enreg%nproc_band
mpi_enreg%sizecart(3) = mpi_enreg%nproc_kpt

periode(:)=.false.
reorder =.false.

! create the cartesian grid with commcart as a communicator.
call MPI_CART_CREATE(MPI_COMM_WORLD,mpi_enreg%dimcart,mpi_enreg%sizecart,periode,&
& reorder,mpi_enreg%commcart_3d,ierr)


! Find the index and coordinates of the current processor
call MPI_COMM_RANK(mpi_enreg%commcart_3d, mpi_enreg%me_cart, ierr)
call MPI_CART_COORDS(mpi_enreg%commcart_3d, mpi_enreg%me_cart, mpi_enreg%dimcart, &
& mpi_enreg%coords, ierr)


! Create the communicator for space (Fourier) distribution
allocate(keepdim(mpi_enreg%dimcart))

keepdim(1)=.true.
keepdim(2)=.false.
keepdim(3)=.false.
call MPI_CART_SUB(mpi_enreg%commcart_3d, keepdim, mpi_enreg%comm_fft,ierr)

! Create the communicator for band distribution
keepdim(1)=.false.
keepdim(2)=.true.
keepdim(3)=.false.
call MPI_CART_SUB(mpi_enreg%commcart_3d, keepdim, mpi_enreg%comm_band,ierr)


! Create the communicator for kpt distribution
keepdim(1)=.false.
keepdim(2)=.false.
keepdim(3)=.true.
call MPI_CART_SUB(mpi_enreg%commcart_3d, keepdim, mpi_enreg%comm_kpt,ierr)

call MPI_COMM_SIZE(mpi_enreg%comm_fft,np_test, ierr)
write(6,) ‘mpi_enreg%sizecart(1),np_fft’ ,mpi_enreg%sizecart(1), np_test
call MPI_COMM_SIZE(mpi_enreg%comm_band,np_test, ierr)
write(6,
) ‘mpi_enreg%sizecart(2),np_band’,mpi_enreg%sizecart(2), np_test
call MPI_COMM_SIZE(mpi_enreg%comm_kpt,np_test, ierr)
write(6,*) ‘mpi_enreg%sizecart(3),np_kpt’,mpi_enreg%sizecart(3), np_test


! Create the communicator for FFT/band distribution
keepdim(1)=.true.
keepdim(2)=.true.
keepdim(3)=.false.
call MPI_CART_SUB(mpi_enreg%commcart_3d, keepdim, mpi_enreg%commcart,ierr)

call MPI_COMM_RANK(mpi_enreg%commcart, mpi_enreg%me_cart_2d, ierr)

! Define the correspondance with the fft
mpi_enreg%me_fft = mpi_enreg%coords(1)
mpi_enreg%me_band = mpi_enreg%coords(2)
mpi_enreg%me_kpt = mpi_enreg%coords(3)


! WRITE THE PROCESSORS COORDINATES IN THE 3D GRID
! =====================================================
write(6,*) ‘in initmpi_grid : me_fft, me_band, me_kpt are’,&
& mpi_enreg%me_fft,mpi_enreg%me_band,mpi_enreg%me_kpt

deallocate(periode)

! endif
#endif

!! COMMENTED AREA SINCE INTRODUCTION OF paral_kgb
!! BECAUSE USING FFT// imply to use MPI
!!$#if !defined MPI
!!$!!$ if(dtset%paral_kgb == 1) then
!!$! TEST THE PARAMETERS OF THE 2D GRID
!!$! =====================================================
!!$
!!$ if(mpi_enreg%nproc_fftmpi_enreg%nproc_band /= mpi_enreg%nproc)then
!!$ write(6,‘(8a,i5,a,i5,a,i5)’) ch10,&
!!$& ’ initmpi_grid : BUG -',ch10,&
!!$& ’ The number of band
FFT processors, npbandnpfft, should be’,ch10,&
!!$& ’ equal to the total number of processors, nproc.‘,ch10,&
!!$& ’ However, npband=’,mpi_enreg%nproc_band,’ npfft =‘,mpi_enreg%nproc_fft,&
!!$& ’ and nproc=’,mpi_enreg%nproc
!!$ call leave_new(‘PERS’)
!!$ end if
!!$
!!$ write(6,
) ‘npfft and npband’,&
!!$ & mpi_enreg%nproc_fft,&
!!$ & mpi_enreg%nproc_band
!!$
!!$! CREATE THE 2D GRID
!!$! ==================================================
!!$ mpi_enreg%dimcart=2
!!$
!!$ allocate(mpi_enreg%sizecart(mpi_enreg%dimcart))
!!$ allocate(periode (mpi_enreg%dimcart))
!!$ allocate(mpi_enreg%coords (mpi_enreg%dimcart))
!!$
!!$ mpi_enreg%sizecart(1)=mpi_enreg%nproc_fft
!!$ mpi_enreg%sizecart(2)=mpi_enreg%nproc_band
!!$
!!$ periode(:)=.false.
!!$ reorder =.false.
!!$
!!$! create the cartesian grid with commcart as a communicator.
!!$ call MPI_CART_CREATE(MPI_COMM_WORLD,mpi_enreg%dimcart,mpi_enreg%sizecart,periode,&
!!$& reorder,mpi_enreg%commcart,ierr)
!!$
!!$! Find the index and coordinates of the current processor
!!$ call MPI_COMM_RANK(mpi_enreg%commcart, mpi_enreg%me_cart, ierr)
!!$ call MPI_CART_COORDS(mpi_enreg%commcart, mpi_enreg%me_cart, mpi_enreg%dimcart, &
!!$& mpi_enreg%coords, ierr)
!!$
!!$! Create the communicator for space (Fourier) distribution
!!$ allocate(keepdim(mpi_enreg%dimcart))
!!$
!!$ keepdim(1)=.true.
!!$ keepdim(2)=.false.
!!$ call MPI_CART_SUB(mpi_enreg%commcart, keepdim, mpi_enreg%comm_fft,ierr)
!!$ call MPI_COMM_SIZE(mpi_enreg%comm_fft,np_test, ierr)
!!$
!!$! Create the communicator for band distribution
!!$ keepdim(1)=.false.
!!$ keepdim(2)=.true.
!!$ call MPI_CART_SUB(mpi_enreg%commcart, keepdim, mpi_enreg%comm_band,ierr)
!!$
!!$! Define the correspondance with the fft
!!$ mpi_enreg%me_fft = mpi_enreg%coords(1)
!!$ mpi_enreg%me_band = mpi_enreg%coords(2)
!!$
!!$
!!$! WRITE THE PROCESSORS COORDINATES IN THE 2D GRID
!!$! ==================================================
!!$ write(6,*) ‘in initmpi_grid: me_fft and me_band are’,mpi_enreg%me_fft,mpi_enreg%me_band
!!$
!!$ endif
!!$#endif
!!$#endif

!DEBUG
! write(6,*)’ initmpi_grid : exit’
!ENDDEBUG

end subroutine initmpi_grid
!!***


[/u]

Hi Connor2,

The “config.h” file you’re using is a “C” header file so wont work with Fortran. I don’t know this application myself so you may want to contact the authors. Though, you may want to first check that you’ve configured it correctly.

  • Mat