Re: [petsc-users] Question on usage of PetscMalloc(Re)SetCUDAHost

2020-08-25 Thread Barry Smith
PetscMallocSetCUDAHost() switches from using the regular malloc on the CPU to using cudaMallocHost() it also switches the free.These means between the PetscMallocSetCUDAHost() and the PetscMallocResetCUDAHost() all mallocs are done with cudaHost version and so are all frees. If any memory

Re: [petsc-users] creation of parallel dmplex from a partitioned mesh

2020-08-25 Thread Cameron Smith
On 8/24/20 4:57 PM, Matthew Knepley wrote: On Mon, Aug 24, 2020 at 4:27 PM Jed Brown > wrote: Cameron Smith mailto:smith...@rpi.edu>> writes: > We made some progress with star forest creation but still have work to do. > > We revisited

Re: [petsc-users] error when solving a linear system with gmres + pilut/euclid

2020-08-25 Thread Alfredo Jaramillo
In fact, on my machine the code is compiled with gnu, and on the cluster it is compiled with intel (2015) compilers. I just run the program with "-fp_trap" and got: === |> Assembling interface problem. Unk # 56 |> Solving interface

Re: [petsc-users] error when solving a linear system with gmres + pilut/euclid

2020-08-25 Thread Alfredo Jaramillo
Yes, Barry, that is correct. On Tue, Aug 25, 2020 at 1:02 AM Barry Smith wrote: > > On one system you get this error, on another system with the identical > code and test case you do not get the error? > > You get it with three iterative methods but not with MUMPS? > > Barry > > > On Aug

Re: [petsc-users] error when solving a linear system with gmres + pilut/euclid

2020-08-25 Thread Barry Smith
Sounds like it might be a compiler problem generating bad code. On the machine where it fails you can run with -fp_trap to have it error out as soon as a Nan or Inf appears. If you can use the debugger on that machine you can tell the debugger to catch floating point exceptions and see

Re: [petsc-users] error when solving a linear system with gmres + pilut/euclid

2020-08-25 Thread Barry Smith
I have submitted a merge request https://gitlab.com/petsc/petsc/-/merge_requests/3096 that will make the error handling and message clearer in the future. Barry > On Aug 25, 2020, at 8:55 AM, Alfredo Jaramillo > wrote: > > In

Re: [petsc-users] error when solving a linear system with gmres + pilut/euclid

2020-08-25 Thread Alfredo Jaramillo
thank you, Barry, I wasn't able to reproduce the error on my computer, neither on a second cluster. On the first cluster, I requested to activate X11 at some node for attaching a debugger, and that activation (if possible) should take some time. I will inform you of any news on that. kind

Re: [petsc-users] Question on usage of PetscMalloc(Re)SetCUDAHost

2020-08-25 Thread Sajid Ali
Hi Barry, Thanks for the explanation! Removing the calls to PetscMalloc(Re)SetCUDAHost solved that issue. Just to clarify, all PetscMalloc(s) happen on the host and there is no special PetscMalloc for device memory allocation ? (Say for an operation sequence PetscMalloc1(N, ),

Re: [petsc-users] Question on usage of PetscMalloc(Re)SetCUDAHost

2020-08-25 Thread Junchao Zhang
On Tue, Aug 25, 2020 at 9:01 PM Sajid Ali wrote: > Hi Barry, > > Thanks for the explanation! Removing the calls to > PetscMalloc(Re)SetCUDAHost solved that issue. > > Just to clarify, all PetscMalloc(s) happen on the host and there is no > special PetscMalloc for device memory allocation ? (Say

Re: [petsc-users] error when solving a linear system with gmres + pilut/euclid

2020-08-25 Thread Barry Smith
Irony, the more one pays for a machine the more difficult it is to debug on. > On Aug 25, 2020, at 4:54 PM, Alfredo Jaramillo > wrote: > > thank you, Barry, > > I wasn't able to reproduce the error on my computer, neither on a second > cluster. On the first cluster, I requested to

[petsc-users] Question on usage of PetscMalloc(Re)SetCUDAHost

2020-08-25 Thread Sajid Ali
Hi PETSc-developers, Is it valid to allocate matrix values on host for use on a GPU later by embedding all allocation logic (i.e the code block that calls PetscMalloc1 for values and indices and sets them using MatSetValues) within a section marked by PetscMalloc(Re)SetCUDAHost ? My