Re: [petsc-users] Calling MATLAB code within a parallel C/C++ code

2020-06-08 Thread Barry Smith
You should use the PetscMatlabEngine https://www.mcs.anl.gov/petsc/petsc-3.13/docs/manualpages/Sys/PetscMatlabEngine.html Barry > On Jun 8, 2020, at 7:09 PM, Amneet Bhalla wrote: > > Hi Folks, > > M

Re: [petsc-users] Calling MATLAB code within a parallel C/C++ code

2020-06-08 Thread Barry Smith
mcs.anl.gov/petsc/petsc-3.13/src/snes/tutorials/ex5.c.html > <https://www.mcs.anl.gov/petsc/petsc-3.13/src/snes/tutorials/ex5.c.html> > > Are there more examples, which are perhaps simpler than the above, which I > can refer to? > > On Mon, Jun 8, 2020 at 5:51 PM Barry

Re: [petsc-users] Make stream

2020-06-09 Thread Barry Smith
You might look at the notes about MPI binding. It might give you a bit better performance. https://www.mcs.anl.gov/petsc/documentation/faq.html#computers The streams is exactly the DAXPY operation so this is the speed up yo

Re: [petsc-users] Calling MATLAB code within a parallel C/C++ code

2020-06-09 Thread Barry Smith
===== > YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Abort trap: 6 (signal 6) > This typically refers to a problem with your application. > Please see the FAQ page for debugging suggestions > Completed test examples > > > I have added th

Re: [petsc-users] Calling MATLAB code within a parallel C/C++ code

2020-06-09 Thread Barry Smith
with >> 1 MPI process >> See http://www.mcs.anl.gov/petsc/documentation/faq.html >> <http://www.mcs.anl.gov/petsc/documentation/faq.html> >> dyld: Library not loaded: @rpath/libeng.dylib >> Referenced from: >> /Users/amneetb/Softwares/PETSc-Gitlab/PETSc/src/snes/examples/

Re: [petsc-users] Calling MATLAB code within a parallel C/C++ code

2020-06-09 Thread Barry Smith
e since these are now baked in the > linker? > > Also, Is this branch based-off of latest master? I'm currently using PETSc > v3.12.2 for IBAMR. Anything close to this version should work for me. > > > On Tue, Jun 9, 2020 at 3:17 PM Barry Smith <mailto:bsm...

Re: [petsc-users] A series of GPU questions

2020-06-09 Thread Barry Smith
You might take a look at https://publications.anl.gov/anlpubs/2020/04/159190.pdf in the introduction there is a short discussion about some of the "gotchas" when using multi-core CPUs connected to multiple GPUs; it is focused on an

Re: [petsc-users] MatGetRow for global rows of a parallel matrix

2020-06-10 Thread Barry Smith
You can use MatCreateSubMatrices() with each process getting a single sequential dense sub matrix that consists of the entire matrix. Use VecDuplicateVecs() to create an array of 72 vectors (create a single seq vector of size 4 as the input to this routine) Then use MatDenseGetArrayRead(

Re: [petsc-users] Parallel writing in HDF5-1.12.0 when some processors have no data to write

2020-06-11 Thread Barry Smith
Are you making HDF5 calls that fail or is it PETSc routines calling HDF5 that fail? Regardless it sounds like the easiest fix is to switch back to the previous HDF5 and wait for HDF5 to fix what sounds to be a bug. Barry > On Jun 11, 2020, at 1:05 AM, Danyang Su wrote: > > Hi All,

Re: [petsc-users] Calling MATLAB code within a parallel C/C++ code

2020-06-11 Thread Barry Smith
ccess the users graphics/window system but hopefully it won't be a problem Barry > > > > On Tue, Jun 9, 2020 at 4:26 PM Barry Smith <mailto:bsm...@petsc.dev>> wrote: > > Great, yes you should not need the DYLIB paths > > The branch is off mas

Re: [petsc-users] Direct linear solver in Petsc

2020-06-12 Thread Barry Smith
For the problem sizes you describe with sparse matrices the PETSc built in one is competitive with the external solvers, sometimes faster, it is not worth using the external solvers for such small problems. The external solvers have much more elaborate implements of sparse factorizations and

Re: [petsc-users] Debugging suggestions: GAMG

2020-06-13 Thread Barry Smith
The LAPACK routine ieeeck_ intentionally does a divide by zero to check if the system can handle it without generating an exception. It doesn't have anything to do with the particular matrix data passed to LAPACK. In KSPComputeExtremeSingularValues_GMRES() we have the code structure

Re: [petsc-users] Debugging suggestions: GAMG

2020-06-13 Thread Barry Smith
n. > 0x7f8d1a422be1 in ieeeck_ () from /lib64/liblapack.so.3 > > > > On 6/13/20 9:04 AM, Barry Smith wrote: >> You could try in gdb to put a break point in ieee_handler and find all the >> places it gets called, maybe this will lead to the location of the cause. >

Re: [petsc-users] Debugging suggestions: GAMG

2020-06-14 Thread Barry Smith
ing. > > Thread 1 "feap" received signal SIGFPE, Arithmetic exception. > 0x7f8d1a422be1 in ieeeck_ () from /lib64/liblapack.so.3 > > > > On 6/13/20 9:04 AM, Barry Smith wrote: >> You could try in gdb to put a break point in ieee_handler and find all the >> places it gets called, maybe this will lead to the location of the cause. >

Re: [petsc-users] configure error

2020-06-15 Thread Barry Smith
It is reporting ld: cannot find -lmkl_intel_ilp64 Please send the output from ls /mnt/disks/intel-2018-3-222-blade-runtime-env-2018-1-07-08-2018-132838/2019.3/intel/compilers_and_libraries_2019.3.199/linux/mkl ls /mnt/disks/intel-2018-3-222-blade-runtime-env-2018-1-07-08-2018-132

Re: [petsc-users] Suppress printing in PETSc

2020-06-17 Thread Barry Smith
Bruce, Normally PETSc does does not print output unless you ask it, except error messages. In C and C++ you can set the global variables FILE *PETSC_STDOUT and FILE *PETSC_STDERR to any file you like, for example /dev/null. In this way anything PETSc prints will just disappear. Bar

Re: [petsc-users] Regarding P4est

2020-06-18 Thread Barry Smith
In PETSc the implementation names are always XXX_classname so you can use whatever tools your development environment has for finding all the implementations. For example, git grep or Emacs etags, etc Barry > On Jun 18, 2020, at 1:20 PM, Satish Balay via petsc-users > wrote: > > On Thu,

Re: [petsc-users] Problem with GPU configure at NERSC

2020-06-18 Thread Barry Smith
Mark, When it calls the C compiler it prints Preprocess stderr before filtering:No supported cpu target is set, CRAY_CPU_TARGET=x86-64 will be used. Load a valid targeting module or set CRAY_CPU_TARGET the C compiler is outputting its message on stderr and that is triggering the configur

Re: [petsc-users] Problem with GPU configure at NERSC

2020-06-18 Thread Barry Smith
Mark, Please try the branch barry/2020-06-18/filter-nersc-cray/maint and DO NOT set the variable CRAY_CPU_TARGET (to test the branch, if it works it will be put into maint) Thanks Barry > On Jun 18, 2020, at 3:57 PM, Mark Adams wrote: > > I am trying to configure the GPU nodes

Re: [petsc-users] Problem with GPU configure at NERSC

2020-06-18 Thread Barry Smith
ly need to compile your own software directly on the > GPU nodes themselves, rather than cross-compiling for the GPU nodes on a > login node. > > > On Thu, Jun 18, 2020 at 7:44 PM Barry Smith <mailto:bsm...@petsc.dev>> wrote: > > Mark, > > Please try th

Re: [petsc-users] MatFindOffBlockDiagonalEntries error

2020-06-19 Thread Barry Smith
Looks like a completely different location now. Are you calling MatAXPY ? If so perhaps the arguments are wrong. One is likely a parallel matrix and one sequential. > On Jun 19, 2020, at 11:46 AM, Eda Oktay wrote: > > Dear Mark, > > I updated Petsc and again, here's the error: > > [0]PE

Re: [petsc-users] SNES Line search: fixing the non zero solution values of dirichlet nodes during line search

2020-06-20 Thread Barry Smith
Ashish, Based on this " RHS as increment of (Dirichlet_value-solution_value). " I am guessing your inhomogeneous Dirichlet boundary conditions are time dependent, that is u(t) = b(t) for a given b? If so your problem is really a DAE, not an ODE. You can solve it in several ways:

Re: [petsc-users] PETSc initialization error

2020-06-20 Thread Barry Smith
Junchao, This is a good bug fix. It solves the problem when PETSc initialize is called many times. There is another fix you can do to limit PETSc mpiuni running out of attributes inside a single PETSc run: int MPI_Comm_create_keyval(MPI_Copy_function *copy_fn,MPI_Delete_functio

Re: [petsc-users] SNES Line search: fixing the non zero solution values of dirichlet nodes during line search

2020-06-22 Thread Barry Smith
> On Jun 22, 2020, at 11:56 AM, Ashish Patel wrote: > > Thanks Stefano, Barry and Hong for your feedback. > Stefano, the option that you suggested is helpful to freeze the dirichlet > values. However, it did not completely solve the convergence issue for > nonlinear problems using linesearch

Re: [petsc-users] Question about HDF5 Viewer and Datasets

2020-06-23 Thread Barry Smith
I looked at the code VecView_MPI_HDF5 and VecView_MPI_HDF5_DA they both seem to use the timestep variable to allow putting multiple datasets into the fire. Perhaps you forgot call PetscViewerHDF5SetTimestep for the DMDA case? Otherwise it looks like there must be a bug in VecView_MPI_HDF5_

[petsc-users] Open discussion on PETSc's future design and implementation

2020-06-23 Thread Barry Smith
We've open a broad general discussion on PETSc's future design and implementation at https://gitlab.com/petsc/petsc/-/issues/643 . There is a possibility of a strip to the metal and rebuild the design approach. All ideas no matter how large or

Re: [petsc-users] Inaccurate Matrix Inversion using MatMatSolve

2020-06-25 Thread Barry Smith
Please send the code. This should work fine. Barry > On Jun 25, 2020, at 2:43 PM, Rakesh Halder wrote: > > Hi all, > > I'm using PETSc for matrix calculations as part of a model order reduction > code. An algorithm I'm using requires that I compute the explicit inverse of > a matrix, a

Re: [petsc-users] Problem coupling Petsc into OpenFOAM

2020-06-25 Thread Barry Smith
Mark, Thanks for letting us know. We have added it to the PETSc package list. Should any issues come up we'll be glad to help support it. Barry > On Jun 25, 2020, at 4:53 AM, Mark Olesen wrote: > > Late followup, but people may want to know that a PETSc/OpenFOAM interface is > in

Re: [petsc-users] PETSc initialization error

2020-06-26 Thread Barry Smith
Jun 20, 2020 at 7:35 PM Sam Guo <mailto:sam@cd-adapco.com>> wrote: > Hi Junchao, >Your patch works. > > Thanks, > Sam > > On Sat, Jun 20, 2020 at 4:23 PM Junchao Zhang <mailto:junchao.zh...@gmail.com>> wrote: > > > On Sat, Jun 20, 2020

Re: [petsc-users] PETSc initialization error

2020-06-26 Thread Barry Smith
or the quick response. >I will call PetscInitialize once and skip the PetscFinalize for now to > avoid the crash. The crash is actually in PetscInitialize, not PetscFinalize. > > Thanks, > Sam > > On Fri, Jun 26, 2020 at 1:21 PM Barry Smith <mailto:bsm...@petsc.dev>&

Re: [petsc-users] DIVERGED_NANORINF when using HYPRE/BoomerAMG

2020-07-01 Thread Barry Smith
You can run the hyper case with -fp_trap in a debugger and it may stop exactly in hypre where the inf/nan appears. Or if you know how to catch floating point exceptions in your debugger run in the debugger with that option to find where in hypre the inf/nan appears. Barry > On Jul 1, 20

Re: [petsc-users] DIVERGED_NANORINF when using HYPRE/BoomerAMG

2020-07-02 Thread Barry Smith
41 min > 1.922154232776e+84 max/min 2.731206885389e+57 > 5 KSP unpreconditioned resid norm 7.736650641501e-01 true resid norm > 7.736650641501e-01 ||r(i)||/||b|| 1.e+00 > 5 KSP Residual norm 7.736650641501e-01 % max 5.250261290126e+141 min > 1.874815205276e+84 max/m

Re: [petsc-users] matcreate and assembly issue

2020-07-02 Thread Barry Smith
https://www.mcs.anl.gov/petsc/documentation/faq.html#efficient-assembly Perhaps we should provide more information at this FAQ to help track down such issues. > On Jul 2, 2020, at 8:10 PM, Matthew Knepley wrote: >

Re: [petsc-users] [Ext] Re: matcreate and assembly issue

2020-07-03 Thread Barry Smith
Karl, If a particular process is receiving values with MatSetValues() that belong to a different process it needs to allocate temporary space for those values. If there are many values destined for a different process this space can be arbitrarily large. The values are not pass to the fi

Re: [petsc-users] Performance of ISCreateGeneral()

2020-07-05 Thread Barry Smith
Mark is correct. Since ISCreateGeneral is labeled in the manual page as Collective this means that all processes synchronize during the call. Hence if any process gets to the call long before the other processes it will look like a great deal of time is being spent in the call, when in fact i

Re: [petsc-users] /lib64/libc.so.6(cfree+0x1f8)[0x7f810f237438] Signal received

2020-07-06 Thread Barry Smith
Where is your loop? In a bash script or inside your compiled program? If inside the program I assume it is outside of PetscInitialize()? Is it outside of MPI_Init()? It can't be because MPI_Init() can only be called once. If inside the problem you can use -start_in_debugger to get the

Re: [petsc-users] Zero diagonal term for direct solver

2020-07-08 Thread Barry Smith
There is also -pc_factor_nonzeros_along_diagonal which reorders to move the zeros off the diagonal before the numerical factorization But if having 0 leads to a factorization without error then it will produce the correct answer (this means that zero got filled in during the factorization)

Re: [petsc-users] MatCreateSubMatrices in PETSc 3.12.5 vs. 3.13.3

2020-07-09 Thread Barry Smith
Change PETSC_COMM_WORLD to PETSC_COMM_SELF Barry > On Jul 9, 2020, at 7:48 AM, Serge Van Criekingen > wrote: > > Dear PETSc team, > > I have a parallel matrix that, in some cases, I want to turn into a > sequential matrix on rank 0. I have been succesfully using > "MatCreateSubMatri

Re: [petsc-users] DM_BOUNDARY_GHOSTED

2020-07-09 Thread Barry Smith
David, I don't think you can do it directly, you need to know how to adjust the matrix entry and make the entry. The reason is that when you put a value in the ghost location nothing knows that you have done this and thus nothing has the information to help with the Jacobian. Here i

Re: [petsc-users] VecAssemblyEnd_MPI_BTS

2020-07-14 Thread Barry Smith
valgrind? > On Jul 14, 2020, at 11:29 AM, Fande Kong wrote: > > The petsc configuration log was attached. > > Thanks, > > Fande, > > > > On Tue, Jul 14, 2020 at 9:16 AM Fande Kong > wrote: > Hi All, > > > I was doing a large-scale simulation using 12288 cor

Re: [petsc-users] Errors encountered with KSPsolver with MATNEST and VECNEST

2020-07-15 Thread Barry Smith
From the error message the second vector you are using to form the nest vector has not been completely created/set up. Make sure you called either VecCreateSeq(), VecCreateMPI() or did VecCreate(), VecSetType(), VecSetUp() and if it is the right hand side make sure you put numerical values in

Re: [petsc-users] Errors encountered with KSPsolver with MATNEST and VECNEST

2020-07-15 Thread Barry Smith
t; /usr/local/petsc/petsc-3.12.5/src/ksp/pc/interface/precon.c > [0]PETSC ERROR: #5 KSP_PCApply() line 281 in > /usr/local/petsc/petsc-3.12.5/include/petsc/private/kspimpl.h > [0]PETSC ERROR: #6 KSPInitialResidual() line 65 in > /usr/local/petsc/petsc-3.12.5/src/ksp/ksp/interface/itres.c

Re: [petsc-users] PetscLogFlops Error

2020-07-18 Thread Barry Smith
> On Jul 18, 2020, at 11:27 PM, Karl Yang wrote: > > > Hello, > > I was using FGMRES solver with fieldsplit preconditioner for solving a fluid > equation. > I have the code ran for coarser meshes and it works fine. But when I got it > to run for very fine meshes I encountered the PetscLogF

Re: [petsc-users] PetscLogFlops Error

2020-07-19 Thread Barry Smith
. I see the issue and I think I can now continue my work > with a quick fix as you suggested. > > Regards > JT > > On Jul 19 2020, at 1:26 pm, Barry Smith wrote: > > > > On Jul 18, 2020, at 11:27 PM, Karl Yang wrote: > > > > > > Hello, > >

[petsc-users] position posted at Argonne National Laboratory

2020-07-19 Thread Barry Smith
Some PETSc users or developers may be interested in this position posting at Argonne. From: Stefan Wild w...@anl.gov Date: July 19, 2020 Subject: Staff Position, Numerical PDEs and Scientific Computing, Argonne The Laboratory for Applied Mathematics, Numerical Software, a

Re: [petsc-users] Tough to reproduce petsctablefind error

2020-07-20 Thread Barry Smith
Is there a comprehensive MPI test suite (perhaps from MPICH)? Is there any way to run this full test suite under the problematic MPI and see if it detects any problems? Is so, could someone add it to the FAQ in the debugging section? Thanks Barry > On Jul 20, 2020, at 1

Re: [petsc-users] snes setjacobian with csr sparse matrix

2020-07-20 Thread Barry Smith
If you are running sequentially you likely want the first routine, in parallel the third routine. MatCreateSeqAIJWithArrays() PETSC_EXTERN PetscErrorCode MatSeqAIJSetPreallocationCSR(Mat,const PetscInt [],const PetscInt [],const PetscScalar []); PETSC_EXTERN PetscErrorCode MatMPIAIJSetPreal

Re: [petsc-users] SUPERLU_DIST in single precision

2020-07-21 Thread Barry Smith
Felix, What are your needs, do you want this for CPUs or for GPUs? Do you wish to run all your code in single precision or just the SuperLU_Dist solver while the rest of your code double? If you want to run everything on CPUs using single precision then adding the support is very

Re: [petsc-users] Is PETSc using internet?

2020-07-21 Thread Barry Smith
Here is one type of hang. $ petscmpiexec -n 2 ./ex1 then in another window $ ps | grep ex1 12015 ttys0000:00.01 /bin/csh -f /Users/barrysmith/Src/petsc/lib/petsc/bin/petscmpiexec -n 2 ./ex1 12038 ttys0000:00.01 mpiexec -n 2 ./ex1 12193 ttys0010:00.00 grep ex1 ~/Src/petsc/

Re: [petsc-users] Error on INTEGER SIZE using DMDACreate3d

2020-07-21 Thread Barry Smith
I assume PIC_3D is your code and you are using OpenMP? Are you calling hypre from inside your OpenMP parallelism? From inside PIC_3D? The SIGTERM is confusing to me. Are you using signals in any way? Usually a sigterm comes outside a process not process or thread crash. I assume for_

Re: [petsc-users] pcsetup

2020-07-21 Thread Barry Smith
> On Jul 21, 2020, at 5:11 PM, Alex Fleeter wrote: > > Hi: > > I guess I could rephrase my question like this. I am using MATNEST. > > When I updated the matrix, I did assembly only for the sub-matrices. Then > when I call the KSP solver, I can see that the pcsetup was called only in the >

Re: [petsc-users] pcsetup

2020-07-21 Thread Barry Smith
Alex, See my long email. The thing with nested preconditioners (like yours) is they have multiple PCSetUps(), possibly outer ones and inner ones. Each of these PC independently triggers a rebuild based on its own state, hence the inner PCSetUps will be triggered when you change the inne

Re: [petsc-users] SUPERLU_DIST in single precision

2020-07-21 Thread Barry Smith
s > before asking Nvidia folks. > > I am busy this week, but should get to it next week. I suggest you wait for > me to clear this, instead of duplicating the work. > > Sherry > > > On Tue, Jul 21, 2020 at 5:22 PM Barry Smith <mailto:bsm...@petsc.dev>> wrote:

Re: [petsc-users] Matrix assembly in SNES problem

2020-07-22 Thread Barry Smith
> On Jul 22, 2020, at 7:03 AM, Adolfo Rodriguez wrote: > > I am trying to replace the non-linear solver in a flow simulation problem > where the matrix sparsity can change during the iterations. I tried > successfully to create the matrix within the FormJacobian function but I have > a memo

Re: [petsc-users] Matrix assembly in SNES problem

2020-07-22 Thread Barry Smith
> On Jul 22, 2020, at 9:35 AM, Adolfo Rodriguez wrote: > > Hong, > > Thanks for your email. My question now is how to handle situations where the > matrix structure changes during the iteration process? The routine you are calling MatSeqAIJSetPreallocationCSR() is fine. It allows you to

Re: [petsc-users] Installation failure

2020-07-27 Thread Barry Smith
Hmm, configure is a mess. Since you explicitly use MPI compilers --with-cc=mpiicc --with-cxx=mpiicpc --with-fc=mpiifort the --with-mpi-include=/opt/intel/compilers_and_libraries_2016/linux/mpi/intel64/include --with-mpi-lib=/opt/intel/compilers_and_libraries_2016.3

Re: [petsc-users] VecLoad into a SubVector ?

2020-07-27 Thread Barry Smith
I don't understand the logic of VecRestoreSubVector() at all. I don't see how it could work. } else { PETSC_UNUSED PetscObjectState dummystate = 0; PetscBool valid; ierr = PetscObjectComposedDataGetInt((PetscObject)*Y,VecGetSubVectorSavedStateId,dummystate,valid);CHKERRQ(ierr);

Re: [petsc-users] VecLoad into a SubVector ?

2020-07-28 Thread Barry Smith
Sajid, This seems like a good fix. Barry > On Jul 27, 2020, at 11:34 PM, Sajid Ali > wrote: > > Hi Barry/Matt, > > The fix to this bug would be to disable replacearray op on a subvector. I > modified the source code for vecio.c forcing VecLoad_HDF5 to always perform > an array

Re: [petsc-users] Petsc configure error (cmake)

2020-07-28 Thread Barry Smith
Eda, The branch barry/2020-07-28/cmake-use-make-if-given/maint should resolve the problem. It will force the cmake build to use the make obtained with --download-make Barry > On Jul 28, 2020, at 9:48 AM, Matthew Knepley wrote: > > On Tue, Jul 28, 2020 at 10:45 AM Eda Oktay

Re: [petsc-users] Only print converged reason when not converged

2020-07-28 Thread Barry Smith
Alex, The actual printing is done with SNESReasonView() and KSPReasonView() I would suggest copying those files to Moose with a name change and removing all the code you don't want. Then you can call your versions immediately after SNESSolve() and KSPSolve(). Barry > On Jul 28, 2

Re: [petsc-users] Only print converged reason when not converged

2020-07-28 Thread Barry Smith
> guarantee SNES/KSP is already done? > > Thanks, > > Fande, > > On Tue, Jul 28, 2020 at 12:02 PM Barry Smith <mailto:bsm...@petsc.dev>> wrote: > > Alex, > > The actual printing is done with SNESReasonView() and KSPReasonView() I > would suggest

Re: [petsc-users] Petsc configure error (cmake)

2020-07-28 Thread Barry Smith
> using the following line: > > ./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran > --download-make --download-mpich --download-openblas --download-metis > --download-parmetis --download-chaco > --download-slepc=/home/eda/slepc-v3.13.2.tar.gz --download-cmake > --with-X=1 >

Re: [petsc-users] Only print converged reason when not converged

2020-07-28 Thread Barry Smith
on't converge). So maybe the > PostSolve will work fine. > > Can't you just define another ASCII format that prints what you want for > ReasonView? > >Matt > > On Tue, Jul 28, 2020 at 12:20 PM Barry Smith <mailto:bsm...@petsc.dev>> wrote: > > KP

Re: [petsc-users] solving saddle point problem in distributed memory

2020-07-28 Thread Barry Smith
SuperLU_DIST won't "magically" run on saddle point problems. It only does limited pivoting, realistically a parallel LU cannot always do complete pivoting or it becomes a sequential algorithm. For parallel you need to use PCFIELDSPLIT, for sequential you can use SuperLU (not SuperLU_DIST) si

Re: [petsc-users] solving saddle point problem in distributed memory

2020-07-28 Thread Barry Smith
ector solver in parallel is indeed limited, especially the saddle > point problem in parallel. I have done some search online, but I did not find > a working set up at this moment. Could you give a sample setup of the direct > solver for parallel run? It is really appreciated. >

Re: [petsc-users] Petsc configure error (cmake)

2020-07-29 Thread Barry Smith
UNABLE to CONFIGURE with GIVEN OPTIONS(see configure.log > for details): > --- > Error running configure on CMAKE > ******* > > Am I doing somet

Re: [petsc-users] SUPERLU_DIST in single precision

2020-07-31 Thread Barry Smith
>>> SUPERLU_DIST. Maybe we will also incorporate GPUs in the future, but >>> there are no immediate plans yet. So if you could provide the support, >>> that would be awesome. >>> >>> Best regards, >>> Felix >>> >>> Zitat von Barry S

Re: [petsc-users] using fieldsplit for matrix assembled using aij

2020-07-31 Thread Barry Smith
-pc_fieldsplit_block_size 3 (you may not need this if the code sets the block size to 3). -pc_fieldsplit_0_fields 0,1 -pc_fieldsplit_1_fields 2 > On Jul 31, 2020, at 7:05 PM, Raju Mandhapati via petsc-users > wrote: > > Hello, > > I have a matrix assembled in interlaced format.

Re: [petsc-users] using fieldsplit for matrix assembled using aij

2020-07-31 Thread Barry Smith
it_0_fields 0,1 -pc_fieldsplit_1_fields 2 Barry > > thanks, > Raju. > > > > > On Fri, Jul 31, 2020 at 7:21 PM Barry Smith <mailto:bsm...@petsc.dev>> wrote: > > -pc_fieldsplit_block_size 3 (you may not need this if the code sets the > block si

Re: [petsc-users] SUPERLU_DIST in single precision

2020-07-31 Thread Barry Smith
. Maybe we will also incorporate GPUs in the future, but >>> there are no immediate plans yet. So if you could provide the support, >>> that would be awesome. >>> >>> Best regards, >>> Felix >>> >>> Zitat von Barry Smith : >>> >>

Re: [petsc-users] overlap cpu and gpu?

2020-08-01 Thread Barry Smith
Nicola, This is really viable or practical at this time with PETSc. It is not impossible but requires careful coding with threads, another possibility is to use one half of the virtual GPUs for each solve, this is also not trivial. I would recommend first seeing what kind of performance

Re: [petsc-users] SUPERLU_DIST in single precision

2020-08-03 Thread Barry Smith
++ (compiling with gcc and g++ seems to work ) > > Do you know what is going on there? (I am running on the Draco cluster, if > that helps (https://www.mpcdf.mpg.de/services/computing/draco)) > > > Best regards, > Felix > > Zitat von Barry Smith : > >> Fel

Re: [petsc-users] SUPERLU_DIST in single precision

2020-08-03 Thread Barry Smith
) > > > It seems that there is something going on with mkl in case I want to > use Intel compilers for C and C++ (compiling with gcc and g++ seems to > work ) > > Do you know what is going on there? (I am running on the Draco > cluster, if that helps > (https

Re: [petsc-users] overlap cpu and gpu?

2020-08-04 Thread Barry Smith
ives the GPU in the other part. >> They can all be part of the same coupled system on the full communicator, >> but PETSc doesn't currently support some ranks having their Vec arrays on >> GPU and others on host, so you'd be paying host-device transfer costs on >

Re: [petsc-users] SUPERLU_DIST in single precision

2020-08-04 Thread Barry Smith
to add > self.addToArgs(args,'-DCMAKE_CXX_FLAGS:STRING','-I'+self.blasLapack.include) > > as well (for me only adding the C flag raised the same error as before; with > this, it works for me even if CPATH isn't set) > Thank you again very much :) > > Best regards, &g

Re: [petsc-users] reuse Mumps factorization for multiple RHS

2020-08-04 Thread Barry Smith
Yes, it automatically uses the same factorization. > On Aug 4, 2020, at 6:55 PM, Anthony Paul Haas wrote: > > Hello, > > When using Mumps to solve a linear system of equations (see below), can I > reuse the factorization to solve for multiple RHS, ie, can I use KSPSolve > multiple times w

Re: [petsc-users] Code (possibly) not running on GPU with CUDA

2020-08-05 Thread Barry Smith
Gordon, Do you have a call to DMSetFromOptions()? Barry > On Aug 5, 2020, at 10:24 AM, GIBB Gordon wrote: > > Hi, > > I’ve built PETSc with NVIDIA support for our GPU machine > (https://cirrus.readthedocs.io/en/master/user-guide/gpu.html >

Re: [petsc-users] Test convergence with non linear preconditioners

2020-08-05 Thread Barry Smith
Adolfo, You can also just change the tolerances for the inner solve using the options data base and the prefix for the inner solve. When you run with -snes_view it will show the prefix for each of the (nested) solvers. You can also run with -help to get all the possible options

Re: [petsc-users] Test convergence with non linear preconditioners

2020-08-05 Thread Barry Smith
l?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon> > Virus-free. www.avast.com > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link> >

Re: [petsc-users] Best practices for solving Dense Linear systems

2020-08-06 Thread Barry Smith
> On Aug 6, 2020, at 7:32 PM, Nidish wrote: > > I'm relatively new to PETSc, and my applications involve (for the most part) > dense matrix solves. > > I read in the documentation that this is an area PETSc does not specialize in > but instead recommends external libraries such as Elemental

Re: [petsc-users] Best practices for solving Dense Linear systems

2020-08-06 Thread Barry Smith
version > finish up for 2e4 so far (my patience runs out faster). > > What's going on here? I thought elemental was supposed to be superior for > dense matrices. > > I can share the code if that's appropriate for this forum (sorry, I'm new > her

Re: [petsc-users] Best practices for solving Dense Linear systems

2020-08-07 Thread Barry Smith
00 -mat_type elemental -pc_type lu -ksp_type > preonly > > elemental seems to perform poorly in both cases. > > Nidish > > On 8/7/20 12:50 AM, Barry Smith wrote: >> >> What is the output of -ksp_view for the two case? >> >> It is not only the

Re: [petsc-users] Best practices for solving Dense Linear systems

2020-08-07 Thread Barry Smith
> On Aug 7, 2020, at 12:26 PM, Nidish wrote: > > > > On 8/7/20 8:52 AM, Barry Smith wrote: >> >> >>> On Aug 7, 2020, at 1:25 AM, Nidish mailto:n...@rice.edu>> >>> wrote: >>> >>> Indeed - I was just using the default s

Re: [petsc-users] Test convergence with non linear preconditioners

2020-08-07 Thread Barry Smith
e=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon> > Virus-free. www.avast.com > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link> > > > On Wed, Aug 5, 2020 at

Re: [petsc-users] Best practices for solving Dense Linear systems

2020-08-08 Thread Barry Smith
methods for your size problems. Barry > On Aug 8, 2020, at 4:55 PM, Nidish wrote: > > > > On 8/7/20 12:55 PM, Barry Smith wrote: >> >> >>> On Aug 7, 2020, at 12:26 PM, Nidish mailto:n...@rice.edu>> >>> wrote: >

Re: [petsc-users] Parallelizing Nonlinear Algebraic systems without DM

2020-08-08 Thread Barry Smith
> On Aug 9, 2020, at 1:14 AM, Nidish wrote: > > Hello, > > My question is related to solving a generic nonlinear algebraic system in > parallel. I'm using the word generic to point to the fact that the system may > or may not be from a finite element/mesh type object - it's just a residual

Re: [petsc-users] Does an optimized compilation with -march=native on multi-CPU HPC cluster make sense?

2020-08-11 Thread Barry Smith
> On Aug 11, 2020, at 6:58 AM, Bastian Löhrer > wrote: > > Dear PETSc users, > > we use PETSc in our code. > Therefore, we have multiple PETSc compilations lying around, each compiled > differently, > e.g debug build using an Intel-compiler, optimized build for Intel-CPUs using > an Intel-

Re: [petsc-users] overlap cpu and gpu?

2020-08-12 Thread Barry Smith
; >> On Sat, Aug 1, 2020 at 3:24 PM Jed Brown > <mailto:j...@jedbrown.org>> wrote: >> You can use MPI and split the communicator so n-1 ranks create a DMDA for >> one part of your system and the other rank drives the GPU in the other part. >> They can all be part of th

Re: [petsc-users] componentwise matrix multiplication

2020-08-12 Thread Barry Smith
When the sparse matrices have the same nonzero structure then you also just get access to the two arrays as in the dense case. For two general sparse you can look at the code for MatAXPY and do the same thing but with multiply. Barry > On Aug 11, 2020, at 10:31 PM, Zhang, Hong via pe

Re: [petsc-users] Bus Error

2020-08-12 Thread Barry Smith
Mark. When valgrind is not feasible (like on many centrally controlled batch systems) you can run PETSc with an extra flag to do some memory error checks -malloc_debug this 1) fills all malloced memory with Nan so if the code is using uninitialized memory it may be detected and 2)

Re: [petsc-users] Bus Error

2020-08-12 Thread Barry Smith
locpy() line 187 in > /home/mlohry/dev/cmake-build/external/petsc/src/sys/utils/str.c > [ 0]32 bytes PetscFunctionListAdd_Private() line 222 in > /home/mlohry/dev/cmake-build/external/petsc/src/sys/dll/reg.c > [ 0]16 bytes ISCreate_General() line 647 in > /home/mlohry/dev/cmake-bui

Re: [petsc-users] overlap cpu and gpu?

2020-08-12 Thread Barry Smith
unless you configure your hardware to match this problem, >> and the two solves have the same cost, you will not see close to 2x speedup. >> Your time is better spent elsewhere. >> >> Mark >> >> On Sat, Aug 1, 2020 at 3:24 PM Jed Brown > <mailto:j...@jedb

Re: [petsc-users] Measuring memory consumption

2020-08-12 Thread Barry Smith
Pascal, Do KSPGetPC(ksp,&pc); PCFactorGetMatrix(pc,fact) PetscViewerPushFormat(PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)fact)),PETSC_VIEWER_ASCII_INFO); MatView(fact,PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)fact); PetscViewerPopFormat(PETSC_VIEWER_STDOUT_(PetscObje

Re: [petsc-users] MatZeroRows

2020-08-13 Thread Barry Smith
Anthony, Keeping the nonzero locations (with zero in them) will be a bit faster in the call to MatZeroRows() because otherwise it has to shift all the entries in the sparse matrix arrays data structures to "remove" the unneeded locations. But the real question is how it affects tim

Re: [petsc-users] overlap cpu and gpu?

2020-08-13 Thread Barry Smith
wrong with my > petscrc? > Anything else am I missing? > > Thanks > > Il giorno gio 13 ago 2020 alle ore 03:17 Barry Smith <mailto:bsm...@petsc.dev>> ha scritto: > >The QR is always done on the CPU, we don't have generic calls to > blas/lapack go to th

Re: [petsc-users] Tough to reproduce petsctablefind error

2020-08-13 Thread Barry Smith
> > > On Thu, Jul 23, 2020 at 5:58 PM Junchao Zhang <mailto:junchao.zh...@gmail.com>> wrote: > On Mon, Jul 20, 2020 at 7:05 AM Barry Smith <mailto:bsm...@petsc.dev>> wrote: > > Is there a comprehensive MPI test suite (perhaps from MPICH)? Is there >

Re: [petsc-users] Help with DMDASetBlockFillsSparse

2020-08-13 Thread Barry Smith
Alex, Ahh, some over-zealous error checking used for the sparse case that is not there otherwise. You can edit src/dm/impls/da/fdda.c and remove the lines if (bx == DM_BOUNDARY_PERIODIC && (m % col)) SETERRQ(PetscObjectComm((PetscObject)da),PETSC_ERR_SUP,"For coloring efficiency ensur

Re: [petsc-users] ParMETIS vs. CHACO when no partitioning is made

2020-08-14 Thread Barry Smith
Could be a bug in Chaco or its call from PETSc for the special case of one process. Could you send a sample code that demonstrates the problem? Barry > On Aug 14, 2020, at 8:53 AM, Eda Oktay wrote: > > Hi all, > > I am trying to try something. I am using the same MatPartitioning codes

Re: [petsc-users] Question on matrix assembly

2020-08-14 Thread Barry Smith
Sajid, Are the rows truly compute from first to last in order and all entries for a row are available together? Barry > On Aug 14, 2020, at 1:00 PM, Sajid Ali > wrote: > > > @Matthew Knepley : Thanks for the explanation on > preallocation. > > >Howeve

Re: [petsc-users] Question on matrix assembly

2020-08-15 Thread Barry Smith
Sajid, In the branch barry/2020-08-13/matsetvalues-nopreallocation-seqaij I have provided a new function MatSeqAIJSetTotalPreallocation() that requires only a single estimate for the entire number of nonzeros in the matrix (not row by row). If you provide the rows in order with sorted c

  1   2   3   4   5   6   7   8   9   10   >