[petsc-dev] HDF5 Viewer for Fortran 90

Chris Eldred chris.eldred at gmail.com
Wed May 29 14:23:29 CDT 2013


I am having issues getting the HDF5 Viewer to work with Fortran 90.
Specifically, I get the following types of errors when attempting to link
my executable together:

/home/user/Dropbox/NTM/SIEVETEST/OPERATOR/src/output.f90:664: undefined
reference to `petscviewerhdf5settimestep_'
/home/user/Dropbox/NTM/SIEVETEST/OPERATOR/src/output.f90:668: undefined
reference to `petscviewerhdf5pushgroup_'
/home/user/Dropbox/NTM/SIEVETEST/OPERATOR/src/output.f90:675: undefined
reference to `petscviewerhdf5popgroup_'

It seems like the Fortran interfaces for the HDF5-specific viewer functions
are not present (there are no issues with the other viewer functions).

My linking command is:

mpif90 -ffree-line-length-none -cpp -Wall -O0 -g -idirafter
${PETSC_DIR}/include -idirafter ${PETSC_DIR}/${PETSC_ARCH}/include -o swe
swe.o initialize.o TRISK.o common.o scheme.o output.o mesh.o orthodual.o
operators.o function_spaces.o stencils.o initialconditions.o timestepping.o
-Wl,-rpath,${PETSC_DIR}/${PETSC_ARCH}/lib -L${PETSC_DIR}/${PETSC_ARCH}/lib
-lpetsc -ltriangle -lX11 -lparmetis -lmetis -lpthread -lctetgen -lchaco
-lml -lflapack -lfblas -lm -lhdf5_fortran -lhdf5hl_fortran -lhdf5_hl -lhdf5
-lz

The code looks like:

#include <finclude/petsc.h90>

call PetscViewerHDF5Open(PETSC_COMM_WORLD, 'testfile.h5', FILE_MODE_WRITE,
viewer, ierr)
CHKERRQ(ierr)
call PetscViewerHDF5SetTimestep(viewer,step,ierr)
CHKERRQ(ierr)
call PetscViewerHDF5PushGroup(viewer,'/testgroup',ierr)
CHKERRQ(ierr)

I configured the latest version of petsc-dev with the following options:

 --download-boost --download-chaco --download-ctetgen
--download-f-blas-lapack --download-fiat --download-generator
--download-metis --download-ml --download-mpich --download-parmetis
--download-scientificpython --download-triangle --download-hdf5
--with-openmp --with-threadcomm --with-pthreadclasses --with-clanguage=cxx
--with-dynamic-loading --with-shared-libraries --with-sieve
PETSC_ARCH=arch-linux2-cxx-debug

Any ideas?

-- 
Chris Eldred
DOE Computational Science Graduate Fellow
Graduate Student, Atmospheric Science, Colorado State University
B.S. Applied Computational Physics, Carnegie Mellon University, 2009
chris.eldred at gmail.com / celdred at atmos.colostate.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130529/e7f7cfe5/attachment.html>


More information about the petsc-dev mailing list