Error while compiling exciting_oxygen on Ubantu platform

Hi everyone,
I am facing problem while compiling the exciting oxygen file in ubantu. I have gone through the processes that are suggested in the discussion of Compilation error exciting_oxygen on Ubuntu, but I am still facing the error. The website says,

If compilation fails, manual editing of the file make.inc inside $EXCITINGROOT/build may be required.

If someone could guide me how to proceed ahead, I will be extremely grateful. The error and make.inc file are as follows:

make[3]: Entering directory ‘/home/tutorials/exciting/build/serial’
gfortran -O3 -march=native -ffree-line-length-0 -cpp -DXS -DISO -DLIBXC -I./finclude -c …/…/src/fftlib/cfftnd.f90
…/…/src/fftlib/cfftnd.f90:573:72:

573 | call cmf2kf ( lot, ido, l1, na, c, jump, inc, ch, 1, lot, wa(iw) )
| 1

Error: Type mismatch in argument ‘cc’ at (1); passed COMPLEX(8) to REAL(8)
…/…/src/fftlib/cfftnd.f90:575:72:

575 | call cmf2kf ( lot, ido, l1, na, ch, 1, lot, c, jump, inc, wa(iw) )
| 1

Error: Type mismatch in argument ‘ch’ at (1); passed COMPLEX(8) to REAL(8)
…/…/src/fftlib/cfftnd.f90:577:72:

577 | call cmf3kf ( lot, ido, l1, na, c, jump, inc, ch, 1, lot, wa(iw) )
| 1

Error: Type mismatch in argument ‘cc’ at (1); passed COMPLEX(8) to REAL(8)
…/…/src/fftlib/cfftnd.f90:579:72:

579 | call cmf3kf ( lot, ido, l1, na, ch, 1, lot, c, jump, inc, wa(iw) )
| 1

Error: Type mismatch in argument ‘ch’ at (1); passed COMPLEX(8) to REAL(8)
…/…/src/fftlib/cfftnd.f90:581:72:

581 | call cmf4kf ( lot, ido, l1, na, c, jump, inc, ch, 1, lot, wa(iw) )
| 1

Error: Type mismatch in argument ‘cc’ at (1); passed COMPLEX(8) to REAL(8)
…/…/src/fftlib/cfftnd.f90:583:72:

583 | call cmf4kf ( lot, ido, l1, na, ch, 1, lot, c, jump, inc, wa(iw) )
| 1

Error: Type mismatch in argument ‘ch’ at (1); passed COMPLEX(8) to REAL(8)
…/…/src/fftlib/cfftnd.f90:585:72:

585 | call cmf5kf ( lot, ido, l1, na, c, jump, inc, ch, 1, lot, wa(iw) )
| 1

Error: Type mismatch in argument ‘cc’ at (1); passed COMPLEX(8) to REAL(8)
…/…/src/fftlib/cfftnd.f90:587:72:

587 | call cmf5kf ( lot, ido, l1, na, ch, 1, lot, c, jump, inc, wa(iw) )
| 1

Error: Type mismatch in argument ‘ch’ at (1); passed COMPLEX(8) to REAL(8)
…/…/src/fftlib/cfftnd.f90:590:24:

590 | 1, lot, wa(iw) )
| 1
Error: Type mismatch in argument ‘cc’ at (1); passed COMPLEX(8) to REAL(8)
…/…/src/fftlib/cfftnd.f90:593:27:

593 | jump, inc, wa(iw) )
| 1
Error: Type mismatch in argument ‘ch’ at (1); passed COMPLEX(8) to REAL(8)
…/…/src/fftlib/cfftnd.f90:470:72:

470 | call cmf2kb ( lot, ido, l1, na, c, jump, inc, ch, 1, lot, wa(iw) )
| 1

Error: Type mismatch in argument ‘cc’ at (1); passed COMPLEX(8) to REAL(8)
…/…/src/fftlib/cfftnd.f90:472:72:

472 | call cmf2kb ( lot, ido, l1, na, ch, 1, lot, c, jump, inc, wa(iw) )
| 1

Error: Type mismatch in argument ‘ch’ at (1); passed COMPLEX(8) to REAL(8)
…/…/src/fftlib/cfftnd.f90:474:72:

474 | call cmf3kb ( lot, ido, l1, na, c, jump, inc, ch, 1, lot, wa(iw) )
| 1

Error: Type mismatch in argument ‘cc’ at (1); passed COMPLEX(8) to REAL(8)
…/…/src/fftlib/cfftnd.f90:476:72:

476 | call cmf3kb ( lot, ido, l1, na, ch, 1, lot, c, jump, inc, wa(iw) )
| 1

Error: Type mismatch in argument ‘ch’ at (1); passed COMPLEX(8) to REAL(8)
…/…/src/fftlib/cfftnd.f90:478:72:

478 | call cmf4kb ( lot, ido, l1, na, c, jump, inc, ch, 1, lot, wa(iw) )
| 1

Error: Type mismatch in argument ‘cc’ at (1); passed COMPLEX(8) to REAL(8)
…/…/src/fftlib/cfftnd.f90:480:72:

480 | call cmf4kb ( lot, ido, l1, na, ch, 1, lot, c, jump, inc, wa(iw) )
| 1

Error: Type mismatch in argument ‘ch’ at (1); passed COMPLEX(8) to REAL(8)
…/…/src/fftlib/cfftnd.f90:482:72:

482 | call cmf5kb ( lot, ido, l1, na, c, jump, inc, ch, 1, lot, wa(iw) )
| 1

Error: Type mismatch in argument ‘cc’ at (1); passed COMPLEX(8) to REAL(8)
…/…/src/fftlib/cfftnd.f90:484:72:

484 | call cmf5kb ( lot, ido, l1, na, ch, 1, lot, c, jump, inc, wa(iw) )
| 1

Error: Type mismatch in argument ‘ch’ at (1); passed COMPLEX(8) to REAL(8)
…/…/src/fftlib/cfftnd.f90:487:24:

487 | 1, lot, wa(iw) )
| 1
Error: Type mismatch in argument ‘cc’ at (1); passed COMPLEX(8) to REAL(8)
…/…/src/fftlib/cfftnd.f90:490:27:

490 | jump, inc, wa(iw) )
| 1
Error: Type mismatch in argument ‘ch’ at (1); passed COMPLEX(8) to REAL(8)
make[3]: *** [Makefile.fft:10: cfftnd.o] Error 1
make[3]: Leaving directory ‘/home/tutorials/exciting/build/serial’
make[2]: *** […/Make.common:159: fftlib.a] Error 2
make[2]: Leaving directory ‘/home/tutorials/exciting/build/serial’
make[1]: *** [Makefile:3: all] Error 2
make[1]: Leaving directory ‘/home/tutorials/exciting/build/serial’
make: *** [Makefile:20: serial] Error 2

The make.inc files is :

F90 = gfortran
F90_OPTS = -O3 -march=native -ffree-line-length-0
CPP_ON_OPTS = -cpp -DXS -DISO -DLIBXC
F77 = $(F90)
F77_OPTS = -O3

Required for compilation of LibXC

FCCPP = cpp

F90_DEBUGOPTS = -g -O0 -DUSE_ASSERT -fbounds-check -fbacktrace -Wall -Wextra -ffree-line-length-0 -fcheck=all -finit-integer=2147483647 -finit-real=snan
-frecord-gcc-switches -finit-character=42 -finit-logical=true -ffpe-trap=invalid,zero,overflow -fdump-core -fstack-protector-all -pipe

Unusable debug flags: -pedantic

F77_DEBUGOPTS = $(F90_DEBUGOPTS)

If compiling on mac, one may need to specify the location of the openMP header file.

For example, if using Macports it may look like:

INCL = -I/opt/local/lib/gcc10/gcc/x86_64-apple-darwin19/10.2.0/finclude/

INCL =

Libaries

LIB_ARP = libarpack.a

Use native blas/lapack by default

export USE_SYS_LAPACK=true
LIB_LPK = -L./ -llapack -lblas
LIB_FFT = fftlib.a
LIB_BZINT = libbzint.a
LIBS = (LIB_ARP) (LIB_LPK) (LIB_FFT) (LIB_BZINT)

SMP and MPI compilers, flags and preprocessing variables

MPIF90 = mpif90
MPIF90_OPTS = -DMPI
MPI_LIBS =

To use Scalapack, include the preprocessing variable, provide the library path and library name

#MPIF90_OPTS = -DMPI -DSCAL
#MPI_LIBS = -L/opt/local/lib/ -lscalapack

SMPF90_OPTS = -fopenmp -DUSEOMP
SMPF77_OPTS = $(SMPF90_OPTS)
SMP_LIBS =

BUILDMPI = true
BUILDSMP = true
BUILDMPISMP = true

Any help with the compilation will be highly appreciated.
Regards,
Paritosh Singh

This is documented in INSTALL, the make.inc files for gfortran, has been answered on the forum, and can be found be googling “gfortran type mismatch in argument”.

Add the compiler flag: -fallow-argument-mismatch