[petsc-users] Problem with running HDF5 example
Barry Smith
bsmith at mcs.anl.gov
Tue Sep 6 20:16:25 CDT 2011
Did you ./configure PETSc with the option --download-hdf5 or the option --with-hdf5-dir=directoryname ?
PETSc must be configured with hdf5 in a similar way to that it needs to be configured with hypre to use hypre
Barry
On Sep 6, 2011, at 7:13 PM, Mohamad M. Nasr-Azadani wrote:
> Hi guys,
>
> I was trying to run the example on HDF5,
> http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-3.1/src/dm/da/examples/tutorials/ex10.c.html
>
> But I could not.
> This is what I get:
> ***************
> >>make PETSC_DIR=/home/mmnasr/Softwares/petsc-3.1-p7 PETSC_ARCH=linux-gnu-c-opt ex10
>
> /home/mmnasr/Softwares/petsc-3.1-p7/linux-gnu-c-opt/bin/mpicc -o ex10.o -c -Wall -Wwrite-strings -Wno-strict-aliasing -O -I/home/mmnasr/Softwares/petsc-3.1-p7/linux-gnu-c-opt/include -I/home/mmnasr/Softwares/petsc-3.1-p7/include -I/home/mmnasr/Softwares/petsc-3.1-p7/linux-gnu-c-opt/include -D__INSDIR__=src/dm/da/examples/tutorials/ ex10.c
> /home/mmnasr/Softwares/petsc-3.1-p7/linux-gnu-c-opt/bin/mpicc -Wall -Wwrite-strings -Wno-strict-aliasing -O -o ex10 ex10.o -Wl,-rpath,/home/mmnasr/Softwares/petsc-3.1-p7/linux-gnu-c-opt/lib -L/home/mmnasr/Softwares/petsc-3.1-p7/linux-gnu-c-opt/lib -lpetsc -Wl,-rpath,/home/mmnasr/Softwares/petsc-3.1-p7/linux-gnu-c-opt/lib -L/home/mmnasr/Softwares/petsc-3.1-p7/linux-gnu-c-opt/lib -lml -lmpichcxx -lstdc++ -lHYPRE -lmpichcxx -lstdc++ -lflapack -lfblas -lnsl -lrt -L/home/mmnasr/Softwares/petsc-3.1-p7/linux-gnu-c-opt/lib -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5 -L/usr/lib/x86_64-linux-gnu -ldl -lmpich -lpthread -lrt -lgcc_s -lmpichf90 -lgfortran -lm -lm -lmpichcxx -lstdc++ -lmpichcxx -lstdc++ -ldl -lmpich -lpthread -lrt -lgcc_s -ldl
> ex10.o: In function `main':
> ex10.c:(.text+0x3b7): undefined reference to `PetscViewerHDF5Open'
> collect2: ld returned 1 exit status
> make: [ex10] Error 1 (ignored)
> /bin/rm -f -f ex10.o
>
> ************
> It seems that it does not find the compiled library and/or header files for it. Any ideas?
>
> Thanks,
> Mohamad
>
More information about the petsc-users
mailing list