Hello,
I have a problem using 'VecScatterCreateToZero'. I attach to this email a test code that illustrates the problem. I create a 2D DA then I ask for the coordinates (that have been set just before), which are returned in a global vector. I want to write the coordinates in a file, so I use 'VecScatterCreateToZero' to put all the values in sequential vector. It seems to work fine but sometimes (depending on the number of proc used) the coordinates in the sequential vectors are ordered differently. to run the code and see the problem : mpiexec -n 4 ./vecdacoord > problem.txt I have attached problem.txt too. Is someone can explain to me how I could obtain my coordinates in a natural order ? Thx -------------- next part -------------- Process [0] 0 0 0.25 0 0.5 0 0.75 0 1 0 0 0.25 0.25 0.25 0.5 0.25 0.75 0.25 Process [1] 1 0.25 0 0.5 0.25 0.5 0.5 0.5 0.75 0.5 1 0.5 Process [2] 0 0.75 0.25 0.75 0.5 0.75 0.75 0.75 1 0.75 0 1 Process [3] 0.25 1 0.5 1 0.75 1 1 1 0 0 0.25 0 0.5 0 0 0.25 0.25 0.25 0.5 0.25 0 0.5 0.25 0.5 0.5 0.5 0.75 0 1 0 0.75 0.25 1 0.25 0.75 0.5 1 0.5 0 0.75 0.25 0.75 0.5 0.75 0 1 0.25 1 0.5 1 0.75 0.75 1 0.75 0.75 1 1 1 -------------- next part -------------- A non-text attachment was scrubbed... Name: vecdacoord.c Type: text/x-csrc Size: 1946 bytes Desc: not available URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090827/07916919/attachment.c>
