Also, some ".f90" programs require the "fortran2003" feature as well. This is a possible cause ofr "no specific subroutine for the generic" problem.
Pierre On Mon, Nov 06, 2017 at 02:49:44PM +0000, Scot Breitenfeld wrote: > Can you include how you declared your arguments in h5dread_f? I would suspect > that one of your arguments is wrong and the compiler is not finding the > correct interface. > > Scot > > > On Nov 4, 2017, at 12:03 AM, Guido granda muñoz <[email protected]> > > wrote: > > > > Hello, > > > > I am having trouble with a code that uses hdf5. The code is written in > > fortran90 it consists of a main program(proccor.f90) and a > > module(module_correlation_functions.f90). > > > > After using the makefile to compile the code, I get the following error: > > > > gfortran -O3 -c module_correlation_functions.f90 -I/usr/local/hdf5/include > > -L/usr/local/hdf5/lib /usr/local/hdf5/lib/libhdf5hl_fortran.a > > /usr/local/hdf5/lib/libhdf5_hl.a /usr/local/hdf5/lib/libhdf5_fortran.a > > /usr/local/hdf5/lib/libhdf5.a -lz -ldl -lm -Wl,-rpath > > -Wl,/usr/local/hdf5/lib > > module_correlation_functions.f90:1583:68: > > > > call h5dread_f(dset_id,H5T_IEEE_F32BE,x,npart,error) > > 1 > > Error: There is no specific subroutine for the generic ‘h5dread_f’ at (1) > > module_correlation_functions.f90:1588:68: > > > > call h5dread_f(dset_id,H5T_IEEE_F32BE,y,npart,error) > > 1 > > Error: There is no specific subroutine for the generic ‘h5dread_f’ at (1) > > module_correlation_functions.f90:1593:68: > > > > call h5dread_f(dset_id,H5T_IEEE_F32BE,z,npart,error) > > 1 > > Error: There is no specific subroutine for the generic ‘h5dread_f’ at (1) > > makefile:38: recipe for target 'module_correlation_functions.o' failed > > make: *** [module_correlation_functions.o] Error 1 > > > > > > The makelife I used to compile the code includes the location of the hdf5 > > library : > > > > > > LIBSHDF=-I/usr/local/hdf5/include -L/usr/local/hdf5/lib > > /usr/local/hdf5/lib/libhdf5hl_fortran.a /usr/local/hdf5/lib/libhdf5_hl.a > > /usr/local/hdf5/lib/libhdf5_fortran.a /usr/local/hdf5/lib/libhdf5.a -lz > > -ldl -lm -Wl,-rpath -Wl,/usr/local/hdf5/lib > > FCFLAGS = -O3 > > # List of executables to be built within the package > > PROGRAMS = procorr > > > > # "make" builds all > > all: $(PROGRAMS) > > > > procorr.o: module_correlation_functions.o > > procorr: module_correlation_functions.o > > > > # ====================================================================== > > # And now the general rules, these should not require modification > > # ====================================================================== > > > > # General rule for building prog from prog.o; $^ (GNU extension) is > > # used in order to list additional object files on which the > > # executable depends > > %: %.o > > $(FC) $(FCFLAGS) -o $@ $^ $(LIBSHDF) > > > > # General rules for building prog.o from prog.f90 or prog.F90; $< is > > # used in order to list only the first prerequisite (the source file) > > # and not the additional prerequisites such as module or include files > > %.o: %.f90 > > $(FC) $(FCFLAGS) -c $^ $(LIBSHDF) > > > > # Utility targets > > .PHONY: clean veryclean > > > > clean: > > rm -f *.o *.mod *.MOD > > rm -f .last_fourier_transform > > rm -f cdm_redshift0_* > > rm -f *~ $(PROGRAMS) > > > > The call hdf5 statement is located on the module file > > (module_correlation_functions.f90) > > > > I am probably doing something wrong on the makefile because I used the same > > hdf5 library location to compile another fortran90+hdf5 code without any > > trouble. Could please help me ? > > > > The gfortran version used is: GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.4) > > 5.4.0 > > and the hdf5 version is: hdf5-1.8.19 compiled with the enable fortran > > option. > > > > _______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5
