[petsc-users] Petsc and HDF5: example src/dm/da/examples/tutorials/ex9 doesn't work

Brad Aagaard baagaard at usgs.gov
Fri Sep 23 09:44:35 CDT 2011


Jeff,

The behavior you describe will happen if parallel I/O is not enabled 
when building HDF5. Make sure you configure with --enable-parallel.

Brad


On 09/22/2011 10:18 PM, Jeffrey Wiens wrote:
> Hello,
>
> I am a new Petsc user and am having problems with saving HDF5 files on Petsc 3.1. I am running the following commands:
>
>     PetscViewer    viewer;
>     ierr = PetscViewerHDF5Open(PETSC_COMM_WORLD,file_name,FILE_MODE_WRITE,&viewer); AssertWithException(ierr);
>     VecView(x,viewer);
>     PetscViewerDestroy(viewer);
>
> When running these commands using multiple cores, Petsc only saves a portion of the vector. However, if I switch to using one core, the
> entire vector is saved. I can recreate the same problem using example 9 in petsc/3.1-p7/src/dm/da/examples/tutorials where the following occurs:
>
>> ~/sfw/petsc/3.1-p7/src/dm/da/examples/tutorials$ mpiexec -n 2 ./ex9
> Vectors are not equal
>> ~/sfw/petsc/3.1-p7/src/dm/da/examples/tutorials$ mpiexec -n 1 ./ex9
> Vectors are equal
>
> I have manually installed HDF5 from the source. Does my HDF5 install need a special configuration for this to work?
>
> Thanks in advance.
> Jeff
>



More information about the petsc-users mailing list