Closed BenWibking closed 3 years ago
My configuration looks like this:
Gadgetviewer v1.1.1 configuration
--------------------------------------
Compilers
Fortran compiler: gfortran
Fortran flags : -fopenmp -O3 -g -O2
C compiler : gcc
C flags : -g -O2
Plotting library (only need one of these)
PLPlot : no
Cairo : yes
Other libraries
HDF5 : yes
PNG : yes
Internal precision of particle data
Positions : 4 bytes
Velocities : 4 bytes
Floating point properties : 4 bytes
Integer properties (e.g. IDs) : 8 bytes
Particle array indexes : 8 bytes
Thanks for reporting this. I think the problem is that the code is calling the same C function with a scalar argument in some places and an array in others. That's probably not strictly allowed, but older compilers didn't check.
I've pushed a workaround for this to master. If you download the latest master and run ./autogen.sh in the source directory then configure and compile as normal it should work. The configure script now checks if the compiler accepts the flag "-fallow-argument-mismatch", which downgrades the error to a warning.
If you can't run autogen.sh (e.g. no autotools installed) then you could try compiling the 1.1.1 release with "-fallow-argument-mismatch" added to the FCFLAGS variable. E.g.
./configure FCFLAGS="-O2 -g -fopenmp -fallow-argument-mismatch"
The right way to fix this would be to use the iso_c_binding module to call C functions, but I probably wont have time to do that in the next few weeks. Most compilers didn't support iso_c_binding when I originally wrote gadgetviewer.
Thanks, that problem is fixed now. I now get a new error I've added in a separate issue (#12).
I am trying to compile gadgetviewer on my macOS machine. I have installed gfortran via homebrew. I run ./autogen.sh and ./configure successfully, but make fails with a compile error on key_file.F90 when using gfortran version 10.2.0: