sundmanbo / opencalphad

Open Calphad, thermodynamic calculation code
http://www.opencalphad.org
181 stars 76 forks source link

OCASI compilation failure #48

Closed semikk closed 3 years ago

semikk commented 3 years ago

Hello, I'm trying to compile OCASI on linux using gfortran. I don't know specifics of different editions of fortran, but i tried all the different -std= keys and still nothing works. Could you please help me to compile it? Pasting here error logs.

gfortran -c -g -O2 -fopenmp -fPIC ./examples/TQ4lib/Cpp/Matthias/liboctqisoc.F90
./examples/TQ4lib/Cpp/Matthias/liboctqisoc.F90:49:38:

   49 |         character(c_char) :: eqname*24
      |                                      1
Error: Component ‘eqname’ of BIND(C) type at (1) must have length one
./examples/TQ4lib/Cpp/Matthias/liboctqisoc.F90:50:39:

   50 |         character(c_char) :: comment*72
      |                                       1
Error: Component ‘comment’ of BIND(C) type at (1) must have length one
./examples/TQ4lib/Cpp/Matthias/liboctqisoc.F90:66:39:

   66 |         character(c_char) :: eqextra*80
      |                                       1
Error: Component ‘eqextra’ of BIND(C) type at (1) must have length one
make[1]: *** [Makefile:149: liboctqisoc.o] Error 1
make[1]: Leaving directory '/home/karasyk/hea_compute/opencalphad'
make: *** [Makefile:58: OCASI] Error 2
CINTROINI commented 3 years ago

Hello, which version of gfortran are you using ?

Please note the following GitHub issue : https://github.com/oasys-kit/shadow3/issues/35

I have reproduced your bug with gcc/gfortran8.3.0 . It works fine when I change the ./examples/TQ4lib/Cpp/Matthias/liboctqisoc.F90 file as follows :

        character(kind=c_char, len=1) :: eqname(24)
        character(kind=c_char, len=1) :: comment72)
        character(kind=c_char, len=1) :: eqextra(80)

If i use gfortran6.3, it works fine without any modifications.

sundmanbo commented 3 years ago

Thanks Clement for the answer. the examples I normally never test and the one from Matthias is very old.