[petsc-users] cudaSetDevice
Jed Brown
jedbrown at mcs.anl.gov
Thu Sep 26 19:37:36 CDT 2013
Harshad Sahasrabudhe <hsahasra at purdue.edu> writes:
> Basically, PetscInitialize is called 2 times, the second time from
> libmesh.
It should not be.
$ git grep -C3 PetscInitialize src/base/libmesh.C
src/base/libmesh.C- // Check whether the calling program has already initialized
src/base/libmesh.C- // PETSc, and avoid duplicate Initialize/Finalize
src/base/libmesh.C- PetscBool petsc_already_initialized;
src/base/libmesh.C: ierr = PetscInitialized(&petsc_already_initialized);
src/base/libmesh.C- CHKERRABORT(libMesh::COMM_WORLD,ierr);
src/base/libmesh.C- if (petsc_already_initialized != PETSC_TRUE)
src/base/libmesh.C- libmesh_initialized_petsc = true;
--
src/base/libmesh.C-# else
src/base/libmesh.C- if (libmesh_initialized_petsc)
src/base/libmesh.C- {
src/base/libmesh.C: ierr = PetscInitialize (&argc, const_cast<char***>(&argv), NULL, NULL);
src/base/libmesh.C- CHKERRABORT(libMesh::COMM_WORLD,ierr);
src/base/libmesh.C- }
src/base/libmesh.C-# endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130927/3ccb5dac/attachment.pgp>
More information about the petsc-users
mailing list