Re: [petsc-dev] Modify 3rd party lib

2020-04-21 Thread Mark Adams
On Mon, Apr 20, 2020 at 10:28 PM Xiaoye S. Li wrote: > Mark, > thanks for debugging this! Indeed, I confirm -- that particular "free" > should be regular free instead of cudaHostfree(), because that data > structure is not allocated by cudaAllocHost(). I have been running this > cuda code on Su

Re: [petsc-dev] Modify 3rd party lib

2020-04-21 Thread Stefano Zampini
> On Apr 21, 2020, at 2:12 PM, Mark Adams wrote: > > > > On Mon, Apr 20, 2020 at 10:28 PM Xiaoye S. Li > wrote: > Mark, > thanks for debugging this! Indeed, I confirm -- that particular "free" > should be regular free instead of cudaHostfree(), because that data struct

[petsc-dev] MATOP_MAT_MULT

2020-04-21 Thread Pierre Jolivet
Hello, Am I seeing this correctly? #include int main(int argc,char **args) { Mat A; PetscBool hasMatMult; PetscErrorCodeierr; ierr = PetscInitialize(&argc,&args,NULL,NULL);if (ierr) return ierr; ierr = MatCreate(PETSC_COMM_WORLD,&A);CHKERRQ(ierr); ierr = Mat

Re: [petsc-dev] Modify 3rd party lib

2020-04-21 Thread Mark Adams
> > > Odd, but it seems to work fine for me now. eg, I get a speedup of 6x on a > ~50K equation 3D systems (Q3 elements with 2 dof per vertex). > > > > Mark, is it such speedup wrt the CPU version of SUPERLU_DIST? Or just the > PETSc factorizations? > I was not clear. THis is on SUMMIT. One CPU a

Re: [petsc-dev] MATOP_MAT_MULT

2020-04-21 Thread Zhang, Hong via petsc-dev
Pierre, MatMatMult_xxx() is removed from MatOps table. MatMatMult() is replaced by MatProductCreate() MatProductSetType(,MATPRODUCT_AB) MatProductSetFromOptions() MatProductSymbolic() MatProductNumeric() Where/when do you need query a single matrix for its product operation? Hong

Re: [petsc-dev] Modify 3rd party lib

2020-04-21 Thread Xiaoye S. Li
Mark, even with multiple cores CPU (either with OpenMP or MPI), you can still use GPU. The current model uses GPU as an off-load device, each MPI drives one GPU. Since Summit has a lot more memory on GPU (compared to the older GPUs), we can give a larger portion of the work to GPU. I'll write la

Re: [petsc-dev] MATOP_MAT_MULT

2020-04-21 Thread Pierre Jolivet
> On 21 Apr 2020, at 5:22 PM, Zhang, Hong wrote: > > Pierre, > MatMatMult_xxx() is removed from MatOps table. Shouldn’t there be a deprecation notice somewhere? There is nothing about MATOP_MAT_MULT in the 3.13 changelog https://www.mcs.anl.gov/petsc/documentation/changes/313.html

Re: [petsc-dev] MATOP_MAT_MULT

2020-04-21 Thread Jose E. Roman
> El 21 abr 2020, a las 17:53, Pierre Jolivet > escribió: > > > >> On 21 Apr 2020, at 5:22 PM, Zhang, Hong wrote: >> >> Pierre, >> MatMatMult_xxx() is removed from MatOps table. > > Shouldn’t there be a deprecation notice somewhere? > There is nothing about MATOP_MAT_MULT in the 3.13 cha

[petsc-dev] Should PetscSignalHandlerDefault avoid calling MPI_Abort?

2020-04-21 Thread John Peterson
Hi, I started a thread on disc...@mpich.org regarding some hanging canceled jobs that we were seeing: https://lists.mpich.org/pipermail/discuss/2020-April/005910.html It turns out that there are some fairly strict rules about what types of functions (asynchronous-safe only) can be called from si

Re: [petsc-dev] MATOP_MAT_MULT

2020-04-21 Thread Zhang, Hong via petsc-dev
Pierre, The old API, MatMatMult(), MatPtAP() ... are still available as wrappers to the new API: MatProductCreate() MatProductSetType(,MATPRODUCT_AB/PtAP) MatProductSetFromOptions() MatProductSymbolic() MatProductNumeric() You do not need to change your code. When you call MatMatMult() with seqsba

Re: [petsc-dev] MATOP_MAT_MULT

2020-04-21 Thread Zhang, Hong via petsc-dev
Jose, We need both A and Vmat to determine if Wmat= A*Vmat is supported or not. MatHasOperation(A,MATOP_MAT_MULT,&flg); //this call is not sufficient to ensure Wmat. How about replacing if (V->vmm && flg) { ierr = BVGetMat(V,&Vmat);CHKERRQ(ierr); ierr = BVGetMat(W,&Wmat);CHKERRQ(ierr);

Re: [petsc-dev] Should PetscSignalHandlerDefault avoid calling MPI_Abort?

2020-04-21 Thread Junchao Zhang
I don't see problems calling _exit in PetscSignalHandlerDefault. Let me try it first. --Junchao Zhang On Tue, Apr 21, 2020 at 3:17 PM John Peterson wrote: > Hi, > > I started a thread on disc...@mpich.org regarding some hanging canceled > jobs that we were seeing: > > https://lists.mpich.org/

Re: [petsc-dev] MATOP_MAT_MULT

2020-04-21 Thread Pierre Jolivet
> On 22 Apr 2020, at 12:05 AM, Zhang, Hong wrote: > > Pierre, > The old API, MatMatMult(), MatPtAP() ... are still available as wrappers to > the new API: >> MatProductCreate() >> MatProductSetType(,MATPRODUCT_AB/PtAP) >> MatProductSetFromOptions() >> MatProductSymbolic() >> MatProductNumeric(