Hi Ashwin,
I've been working on this issue the last couple of days and wanted to
give you an update. First off, thanks for the test case. This has helped
a lot in tracking down the issues. I've created a couple of unit tests
based on your test case.
There were several independent bugs that prevented the VecView to work
with -dm_vec_type cusp. I've fixed some of them in this branch:
https://bitbucket.org/dmeiser/petsc/branch/fix-cusp-dmda
Viewing a vector created from a DM should now be possible. For instance
the test case you provided should work with this branch.
There are still some issues remaining. DMGlobalToLocalBegin/End and
DMLocalToGlobalBegin/End are not working. I haven't been able to track
these down yet. I'll return to this next week.
Cheers,
Dominic
On 06/24/2014 08:15 PM, Ashwin Srinath wrote:
Hello, petsc-users
I'm having trouble /viewing/ an mpicusp vector. Here's the simplest
case that reproduces the problem:
int main(int argc, char** argv) {
PetscInitialize(&argc, &argv, NULL, NULL);
DM da;
Vec V;
DMDACreate2d( PETSC_COMM_WORLD,
DM_BOUNDARY_NONE, DM_BOUNDARY_NONE,
DMDA_STENCIL_BOX,
5, 5,
PETSC_DECIDE, PETSC_DECIDE,
1,
1,
NULL, NULL,
&da);
DMCreateGlobalVector(da, &V);
VecSet(V, 1);
VecView(V, PETSC_VIEWER_STDOUT_WORLD);
PetscFinalize();
return 0;
}
I get the error:
[1]PETSC ERROR: Null argument, when expecting valid pointer
[0]PETSC ERROR: Trying to copy from a null pointer
I executed with the following command:
mpiexec -n 2 ./main -dm_vec_type cusp -vec_type cusp
Both GPUs are attached to two different processes.
This program works fine for vecmpi vectors, i.e., -dm_vec_type mpi and
-vec_type mpi. Also, I don't get an error unless I try to /view/ the
vector. Can someone please point out what I'm doing wrong?
Thanks for your time,
Ashwin Srinath
--
Dominic Meiser
Tech-X Corporation
5621 Arapahoe Avenue
Boulder, CO 80303
USA
Telephone: 303-996-2036
Fax: 303-448-7756
www.txcorp.com