[petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90
TAY wee-beng
zonexo at gmail.com
Mon Apr 14 06:52:37 CDT 2014
Hi,
My code hangs and I added in mpi_barrier and print to catch the bug. I
found that it hangs after printing "7". Is it because I'm doing
something wrong? I need to access the u,v,w array so I use
DMDAVecGetArrayF90. After access, I use DMDAVecRestoreArrayF90.
call DMDAVecGetArrayF90(da_u,u_local,u_array,ierr)
call MPI_Barrier(MPI_COMM_WORLD,ierr); if (myid==0) print *,"3"
call DMDAVecGetArrayF90(da_v,v_local,v_array,ierr)
call MPI_Barrier(MPI_COMM_WORLD,ierr); if (myid==0) print *,"4"
call DMDAVecGetArrayF90(da_w,w_local,w_array,ierr)
call MPI_Barrier(MPI_COMM_WORLD,ierr); if (myid==0) print *,"5"
call
I_IIB_uv_initial_1st_dm(I_cell_no_u1,I_cell_no_v1,I_cell_no_w1,I_cell_u1,I_cell_v1,I_cell_w1,u_array,v_array,w_array)
call MPI_Barrier(MPI_COMM_WORLD,ierr); if (myid==0) print *,"6"
call DMDAVecRestoreArrayF90(da_w,w_local,w_array,ierr) !must be
in reverse order
/* call MPI_Barrier(MPI_COMM_WORLD,ierr); if (myid==0) print *,"7"*/
call DMDAVecRestoreArrayF90(da_v,v_local,v_array,ierr)
call MPI_Barrier(MPI_COMM_WORLD,ierr); if (myid==0) print *,"8"
call DMDAVecRestoreArrayF90(da_u,u_local,u_array,ierr)
--
Thank you.
Yours sincerely,
TAY wee-beng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140414/01a91164/attachment.html>
More information about the petsc-users
mailing list