Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-06-05 Thread Barry Smith
On April 23 you sent us the message Hi, Ya that's better. I've been trying to remove the unnecessary codes (also some copyright issues with the university) and to present only the code which shows the error. But strangely, by restructuring and removing all the redundant stuffs, the error

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-06-01 Thread TAY wee-beng
Dear all, May I know if there is any problem compiling / building / running the file I emailed. We can work together if there is any. Thank you Yours sincerely, TAY wee-beng On 20/5/2014 1:43 AM, Barry Smith wrote: On May 19, 2014, at 1:26 AM, TAY wee-beng wrote: On 19/5/2014 11:36 AM,

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-05-27 Thread TAY wee-beng
On 20/5/2014 1:43 AM, Barry Smith wrote: On May 19, 2014, at 1:26 AM, TAY wee-beng wrote: On 19/5/2014 11:36 AM, Barry Smith wrote: On May 18, 2014, at 10:28 PM, TAY wee-beng wrote: On 19/5/2014 9:53 AM, Matthew Knepley wrote: On Sun, May 18, 2014 at 8:18 PM, TAY wee-beng wrote: Hi Barry

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-05-19 Thread Barry Smith
On May 19, 2014, at 1:26 AM, TAY wee-beng wrote: > On 19/5/2014 11:36 AM, Barry Smith wrote: >> On May 18, 2014, at 10:28 PM, TAY wee-beng wrote: >> >>> On 19/5/2014 9:53 AM, Matthew Knepley wrote: On Sun, May 18, 2014 at 8:18 PM, TAY wee-beng wrote: Hi Barry, I am trying

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-05-19 Thread Matthew Knepley
On Mon, May 19, 2014 at 1:26 AM, TAY wee-beng wrote: > On 19/5/2014 11:36 AM, Barry Smith wrote: > >> On May 18, 2014, at 10:28 PM, TAY wee-beng wrote: >> >> On 19/5/2014 9:53 AM, Matthew Knepley wrote: >>> On Sun, May 18, 2014 at 8:18 PM, TAY wee-beng wrote: Hi Barry, I am

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-05-18 Thread TAY wee-beng
On 19/5/2014 11:36 AM, Barry Smith wrote: On May 18, 2014, at 10:28 PM, TAY wee-beng wrote: On 19/5/2014 9:53 AM, Matthew Knepley wrote: On Sun, May 18, 2014 at 8:18 PM, TAY wee-beng wrote: Hi Barry, I am trying to sort out the details so that it's easier to pinpoint the error. However, I

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-05-18 Thread Barry Smith
On May 18, 2014, at 10:28 PM, TAY wee-beng wrote: > On 19/5/2014 9:53 AM, Matthew Knepley wrote: >> On Sun, May 18, 2014 at 8:18 PM, TAY wee-beng wrote: >> Hi Barry, >> >> I am trying to sort out the details so that it's easier to pinpoint the >> error. However, I tried on gnu gfortran and it

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-05-18 Thread Matthew Knepley
On Sun, May 18, 2014 at 8:18 PM, TAY wee-beng wrote: > Hi Barry, > > I am trying to sort out the details so that it's easier to pinpoint the > error. However, I tried on gnu gfortran and it worked well. On intel ifort, > it stopped at one of the "DMDAVecGetArrayF90". Does it definitely mean that

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-05-18 Thread TAY wee-beng
Hi Barry, I am trying to sort out the details so that it's easier to pinpoint the error. However, I tried on gnu gfortran and it worked well. On intel ifort, it stopped at one of the "DMDAVecGetArrayF90". Does it definitely mean that it's a bug in ifort? Do you work with both intel and gnu?

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-05-13 Thread Barry Smith
Please send you current code. So we may compile and run it. Barry On May 12, 2014, at 9:52 PM, TAY wee-beng wrote: > Hi, > > I have sent the entire code a while ago. Is there any answer? I was also > trying myself but it worked for some intel compiler, and some not. I'm still > not

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-05-12 Thread TAY wee-beng
Hi, I have sent the entire code a while ago. Is there any answer? I was also trying myself but it worked for some intel compiler, and some not. I'm still not able to find the answer. gnu compilers for most cluster are old versions so they are not able to compile since I have allocatable struc

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-04-23 Thread TAY wee-beng
Hi, Ya that's better. I've been trying to remove the unnecessary codes (also some copyright issues with the university) and to present only the code which shows the error. But strangely, by restructuring and removing all the redundant stuffs, the error is no longer there. I'm now trying to ad

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-04-20 Thread Barry Smith
Please send the entire code. If we can run it and reproduce the problem we can likely track down the issue much faster than through endless rounds of email. Barry On Apr 20, 2014, at 7:49 PM, TAY wee-beng wrote: > On 20/4/2014 8:39 AM, TAY wee-beng wrote: >> On 20/4/2014 1:02 AM, Matth

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-04-19 Thread Matthew Knepley
On Sat, Apr 19, 2014 at 4:59 AM, TAY wee-beng wrote: > On 19/4/2014 1:17 PM, Barry Smith wrote: > >> On Apr 19, 2014, at 12:11 AM, TAY wee-beng wrote: >> >> On 19/4/2014 12:10 PM, Barry Smith wrote: >>> On Apr 18, 2014, at 9:57 PM, TAY wee-beng wrote: On 19/4/2014 3:53 AM, Barr

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-04-19 Thread TAY wee-beng
On 19/4/2014 1:17 PM, Barry Smith wrote: On Apr 19, 2014, at 12:11 AM, TAY wee-beng wrote: On 19/4/2014 12:10 PM, Barry Smith wrote: On Apr 18, 2014, at 9:57 PM, TAY wee-beng wrote: On 19/4/2014 3:53 AM, Barry Smith wrote: Hmm, Interface DMDAVecGetArrayF90 Subroutine D

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-04-18 Thread Barry Smith
On Apr 19, 2014, at 12:11 AM, TAY wee-beng wrote: > On 19/4/2014 12:10 PM, Barry Smith wrote: >> On Apr 18, 2014, at 9:57 PM, TAY wee-beng wrote: >> >>> On 19/4/2014 3:53 AM, Barry Smith wrote: Hmm, Interface DMDAVecGetArrayF90 Subroutine DMDAVecGetArrayF90

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-04-18 Thread TAY wee-beng
On 19/4/2014 12:10 PM, Barry Smith wrote: On Apr 18, 2014, at 9:57 PM, TAY wee-beng wrote: On 19/4/2014 3:53 AM, Barry Smith wrote: Hmm, Interface DMDAVecGetArrayF90 Subroutine DMDAVecGetArrayF903(da1, v,d1,ierr) USE_DM_HIDE DM_HIDE da1 VEC

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-04-18 Thread Barry Smith
On Apr 18, 2014, at 9:57 PM, TAY wee-beng wrote: > On 19/4/2014 3:53 AM, Barry Smith wrote: >> Hmm, >> >> Interface DMDAVecGetArrayF90 >> Subroutine DMDAVecGetArrayF903(da1, v,d1,ierr) >> USE_DM_HIDE >> DM_HIDE da1 >> VEC_HIDE v >> PetscSc

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-04-18 Thread TAY wee-beng
On 19/4/2014 3:53 AM, Barry Smith wrote: Hmm, Interface DMDAVecGetArrayF90 Subroutine DMDAVecGetArrayF903(da1, v,d1,ierr) USE_DM_HIDE DM_HIDE da1 VEC_HIDE v PetscScalar,pointer :: d1(:,:,:) PetscErrorCode ierr End

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-04-18 Thread Barry Smith
Hmm, Interface DMDAVecGetArrayF90 Subroutine DMDAVecGetArrayF903(da1, v,d1,ierr) USE_DM_HIDE DM_HIDE da1 VEC_HIDE v PetscScalar,pointer :: d1(:,:,:) PetscErrorCode ierr End Subroutine So the d1 is a F90 POINTER. But you

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-04-18 Thread TAY wee-beng
Hi, I tried to pinpoint the problem. I reduced my job size and hence I can run on 1 processor. Tried using valgrind but perhaps I'm using the optimized version, it didn't catch the error, besides saying "Segmentation fault (core dumped)" However, by re-writing my code, I found out a few thin

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-04-15 Thread Barry Smith
Try running under valgrind http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind On Apr 14, 2014, at 9:47 PM, TAY wee-beng wrote: > > Hi Barry, > > As I mentioned earlier, the code works fine in PETSc debug mode but fails in > non-debug mode. > > I have attached my code. > > Tha

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-04-14 Thread TAY wee-beng
Hi Barry, As I mentioned earlier, the code works fine in PETSc debug mode but fails in non-debug mode. I have attached my code. Thank you Yours sincerely, TAY wee-beng On 15/4/2014 2:26 AM, Barry Smith wrote: Please send the code that creates da_w and the declarations of w_array B

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-04-14 Thread Jed Brown
TAY wee-beng writes: > Hi Barry, > > As I mentioned earlier, the code works fine in PETSc debug mode but > fails in non-debug mode. > > My code works in this way: > > */DM da_u,da_v,da_w/**/ > /**/ > /**/Vec This formatting is NOT easy to read. Please send text. http://lists.mcs.anl.gov/pip

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-04-14 Thread TAY wee-beng
Hi Barry, As I mentioned earlier, the code works fine in PETSc debug mode but fails in non-debug mode. My code works in this way: */DM da_u,da_v,da_w/**/ /**/ /**/Vec u_local,u_global,v_local,v_global,w_local,w_global,p_local,p_global/**/ /**/ /**/call DMDACreate3d(MPI_COMM_WORLD,DMDA_BOU

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-04-14 Thread Barry Smith
Please send the code that creates da_w and the declarations of w_array Barry On Apr 14, 2014, at 9:40 AM, TAY wee-beng wrote: > Hi Barry, > > I'm not too sure how to do it. I'm running mpi. So I run: > > mpirun -n 4 ./a.out -start_in_debugger > > I got the msg below. Before the gdb win

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-04-14 Thread Barry Smith
Please configure a PETSC_ARCH using --with-debugging=yes, and use the -start_in_debugger option with a build that has debugging turned on. This way it will give you exact line numbers and the values of variables when it crashes. After it crashes use “print ptr” and “print address” to se

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-04-14 Thread Matthew Knepley
On Mon, Apr 14, 2014 at 10:01 AM, TAY wee-beng wrote: > On 14/4/2014 10:44 PM, Matthew Knepley wrote: > > On Mon, Apr 14, 2014 at 9:40 AM, TAY wee-beng wrote: > >> Hi Barry, >> >> I'm not too sure how to do it. I'm running mpi. So I run: >> >> mpirun -n 4 ./a.out -start_in_debugger >> > >

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-04-14 Thread TAY wee-beng
On 14/4/2014 10:44 PM, Matthew Knepley wrote: On Mon, Apr 14, 2014 at 9:40 AM, TAY wee-beng > wrote: Hi Barry, I'm not too sure how to do it. I'm running mpi. So I run: mpirun -n 4 ./a.out -start_in_debugger add -debugger_pause 10 It seems that I nee

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-04-14 Thread Matthew Knepley
On Mon, Apr 14, 2014 at 9:40 AM, TAY wee-beng wrote: > Hi Barry, > > I'm not too sure how to do it. I'm running mpi. So I run: > > mpirun -n 4 ./a.out -start_in_debugger > add -debugger_pause 10 Matt > I got the msg below. Before the gdb windows appear (thru x11), the program > aborts.

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-04-14 Thread TAY wee-beng
Hi Barry, I'm not too sure how to do it. I'm running mpi. So I run: mpirun -n 4 ./a.out -start_in_debugger I got the msg below. Before the gdb windows appear (thru x11), the program aborts. Also I tried running in another cluster and it worked. Also tried in the current cluster in debug mo

Re: [petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-04-14 Thread Barry Smith
Because IO doesn’t always get flushed immediately it may not be hanging at this point. It is better to use the option -start_in_debugger then type cont in each debugger window and then when you think it is “hanging” do a control C in each debugger window and type where to see where each proc

[petsc-users] Problem with DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90

2014-04-14 Thread TAY wee-beng
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 DMDAVecGetArrayF9