0

I am currently try to compile these files using HDF5 I have directly linked and included everything necessary ( I think) but still the compile unable to find the files that is needed

This is my Makefile:

CC = h5cc
FC = h5fc
LD = h5fc

FDEBUG  = -std -g -traceback
CFLAGS  = -g -O0 -Wall -pedantic
FFLAGS  = -g -O0 -Wall -I$(H5DIR)/include -L$(H5DIR)/lib/libhdf5hl_fortran.a
LDFLAGS = -I$(H5DIR)/include -L$(H5DIR)/lib/libhdf5hl_fortran.a
#LDFLAGS = -I$(MKLROOT)/include -L$(MKLROOT) -mkl=sequential
#     -opt-block-factor=16 -opt-prefetch=4 \

.SUFFIXES:
.SUFFIXES: .c .f .f90 .F90 .o

OBJS = timing.o    \
       kinds.o \
       rw_matrix.o \

EXE  = matmul_omp.exe

all: $(EXE)

$(EXE): $(OBJS) matmul_omp.o
    $(LD) $(LDFLAGS) -o $@ $^

.f90.o:
    -$(RM) -f $*.o $*.mod
    $(FC) $(FFLAGS) -c $<

.c.o:
    $(CC) $(CFLAGS) -c $<

.PHONEY: clean
clean:

THis is the err:

h5fc -I/curc/tools/x_86_64/rh6/hdf5/1.8.13/szip/2.1/zlib/1.2.8/jpeglib/9a/openmpi/1.8.2/intel/13.0.0/include -L/curc/tools/x_86_64/rh6/hdf5/1.8.13/szip/2.1/zlib/1.2.8/jpeglib/9a/openmpi/1.8.2/intel/13.0.0/lib/libhdf5hl_fortran.a  -o matmul_omp.exe timing.o matmul_omp.o

gfortran: /usr/lib64/libhdf5hl_fortran.a: No such file or directory
gfortran: /usr/lib64/libhdf5_hl.a: No such file or directory
gfortran: /usr/lib64/libhdf5_fortran.a: No such file or directory
gfortran: /usr/lib64/libhdf5.a: No such file or directory

As you can see that I directly link libhdf5hl_fortran.a. but i dont know why the error is giving a different directory /usr/lib64/

3
  • 1
    Where is the library installed? What is the value of H5DIR? Commented Oct 12, 2014 at 7:23
  • 1
    Both the include (-I) and library (-L) paths look wonky to me. Intel include files inside an openmpi directory, fair enough, but that's inside a jpeglib directory inside a zlib directory inside an szip directory ... you get the picture. If those are correct the installation is weird and I'm not surprised the makefile can't find the libraries. All this is a long-winded way of asking the same questions as @VladimirF. Commented Oct 12, 2014 at 9:37
  • H5DIR = /curc/tools/x_86_64/rh6/hdf5/1.8.13/szip/2.1/zlib/1.2.8/jpeglib/9a/openmpi/1.8.2/intel/13.0.0/ I have checked inside the directory and I found these files in there. Still the problem remainds Commented Oct 12, 2014 at 19:10

1 Answer 1

1

I think you have a couple of things wrong here.

If you are using h5fc then you shouldn't need to add all the include and lib paths. That is the whole point of the helper applications.

You are adding the paths that have Intel, yet your h5fc has a GNU (gfortran) error.

The gfortran build of HDF5 looks as if it does not have the fortran bindings built.

I would suggest trying the following. Using the full paths (as you have done) but call ifort instead of h5fc:

ifort -I/curc/tools/x_86_64/rh6/hdf5/1.8.13/szip/2.1/zlib/1.2.8/jpeglib/9a/openmpi/1.8.2/intel/13.0.0/include \
      -L/curc/tools/x_86_64/rh6/hdf5/1.8.13/szip/2.1/zlib/1.2.8/jpeglib/9a/openmpi/1.8.2/intel/13.0.0/lib/libhdf5hl_fortran.a  \
      -o matmul_omp.exe timing.o matmul_omp.o
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.