[FLASH-USERS] Fortran interface of the HDF5 library for CCSN1d

Evan Patrick O'Connor evan.oconnor at astro.su.se
Wed Feb 9 14:51:55 EST 2022


Hi,


I see this too. This seems to stem from the top of that file.


#ifdef HAVE_HDF5_FORTRAN

#define IO_USE_HDF5_MOD HAVE_HDF5_FORTRAN

#else

#ifdef FLASH_HAVE_HDF5_MOD

#define IO_USE_HDF5_MOD FLASH_HAVE_HDF5_MOD

#endif

#endif


the variable FLASH_HAVE_HDF5_MOD is defined in the Flash.h file but it is not set to anything (the line is just #define FLASH_HAVE_HDF5_MOD) so then the variable IO_USE_HDF5_MOD is defined, but not set to anything. That is why there are issues on line 47 and 60.  A quick fix (caveat: I don't know the full details of the difference between HAVE_HDF5_FORTRAN and FLASH_HAVE_HDF5_MOD) is to just replace


#define IO_USE_HDF5_MOD FLASH_HAVE_HDF5_MOD


with


#define IO_USE_HDF5_MOD 1


with that I can get ccsn1d to build successfully in 4.6.2


Evan

________________________________
From: flash-users <flash-users-bounces at flash.rochester.edu> on behalf of kiyarash Taghiniyarami <kiyarash.niyarami at gmail.com>
Sent: Monday, February 7, 2022 9:50:11 PM
To: flash-users at flash.rochester.edu
Subject: [FLASH-USERS] Fortran interface of the HDF5 library for CCSN1d

Dear all FLASH users,

I tried to compile a core collapse supernova in 1D but still do not want to change the source/physics/Eos/EosNuclear/Config because I need to work with EosNuclear as well. To do so, the HDF5 needs Fortran bindings and I build it with the following command: CC=/home/taghinia/FLASH/MPICH/mpich-install/bin/mpicc  /home/taghinia/FLASH/HDF5/hdf5-1.10.5/configure --prefix=/home/taghinia/FLASH/HDF5/HDF5-install-oldversion/  --enable-fortran  --enable-parallel --enable-shared --with-pic --with-default-api-version=v16  --with-zlib=/home/taghinia/FLASH/zlib/zlib-install/include,/home/taghinia/FLASH/zlib/zlib-install/lib

but it seems not working properly because after CCSN1D compilation I get the following error:
io_intfTypesModule.F90:47:0:

   47 | #if IO_USE_HDF5_MOD == 0
      |
Error: operator '==' has no left operand
io_intfTypesModule.F90:60:0:

   60 | #if (IO_USE_HDF5_MOD != 0)
      |
Error: operator '!=' has no left operand
/home/taghinia/FLASH/MPICH/mpich-install/bin/mpif90 -ggdb -c -O2 -fdefault-real-8 -fdefault-double-8 -Wuninitialized -g -O2 -Wno-argument-mismatch -DMAXBLOCKS=1000 -DNXB=16 -DNYB=1 -DNZB=1 -DN_DIM=1 Logfile_data.F90
io_intfTypesModule.F90:66:42:

   66 |   integer,parameter :: io_fileID_t = FLASH_IO_FILEID_T
      |                                          1
Error: Symbol ‘hid_t’ at (1) has no IMPLICIT type
make: *** [Makefile:115: io_intfTypesModule.mod] Error 1
make: *** Waiting for unfinished jobs....
I also made some changes to the Makefile.h as:

F90FLAGS = -I ${HDF5_PATH}/include -DH5_USE_16_API

LIB_HDF5  = -L${HDF5_PATH}/lib -lhdf5_fortran -lhdf5  -lz

but got the same error. Could anyone help me with that? Kind Regards, Khodayar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20220209/fa49c875/attachment.htm>


More information about the flash-users mailing list