Re: [petsc-users] Placing FindPETSc.cmake

2018-05-11 Thread Jed Brown
T(CMAKE_CXX_COMPILER mpicxx) >>> >>> find_package(PETSc COMPONENTS CXX) >>> >>> add_executable(hellopetsc main.cpp) >>> - >>> >>> --------- >>> /home/evan/opt/clion-2018.1.2/bin/cmake/bin/cmake >>> -DCMAKE_B

Re: [petsc-users] Placing FindPETSc.cmake

2018-05-11 Thread Jed Brown
Yes, it depends on this module from the same repository. Note that you can use pkg-config to find PETSc these days. Evan Um writes: > Hi Stefano, > > Thanks for your comment. Now, cmake was able to locate FindPETSc.cmake file > in my project directory, but I see a new error.

Re: [petsc-users] Solving advection equations implicitly

2018-05-07 Thread Jed Brown
nstead. > > > *Nishant Nangia* > Northwestern University > Ph.D. Candidate | Engineering Sciences and Applied Mathematics > Tech L386 > > On Mon, May 7, 2018 at 4:56 PM, Jed Brown <j...@jedbrown.org> wrote: > >> Do you want it to be time accurate (implies CFL

Re: [petsc-users] Solving advection equations implicitly

2018-05-07 Thread Jed Brown
Do you want it to be time accurate (implies CFL number is modest) or do you want very large time steps? If very large time steps, why not steady state? Nishant Nangia writes: > Hi all, > > I want to implicitly solve a linear advection equation of the form: > dQ/dt +

Re: [petsc-users] petsc4py: parallel matrix-vector multiplication

2018-05-06 Thread Jed Brown
d > it works right away, but then I fail to see how to make use of the > preconditioners for KSP (see my original message).. > > Thanks again! > -Robert- > > > On 06.05.18 16:52, Jed Brown wrote: >> Robert Speck <r.sp...@fz-juelich.de> writes: >> >&g

Re: [petsc-users] petsc4py: parallel matrix-vector multiplication

2018-05-06 Thread Jed Brown
Robert Speck writes: > Thanks for your reply and help. Yes, this is going to be a PDE solver > for structured grids. The first goal would be IDC (or Crank-Nicholson) > for the heat equation, which would require both solving a linear system > and application of the matrix.

Re: [petsc-users] Initial Guess for KSP in SNES

2018-04-29 Thread Jed Brown
Why do you want it to be an initial guess for the linear problem rather than for the nonlinear problem? I think you can use SNESSetUpdate() and in that function, SNESGetSolutionUpdate() which you can set to whatever you want the initial guess to be. Derek Gaston writes: >

Re: [petsc-users] libpciaccess dependency Problem

2018-04-27 Thread Jed Brown
Make sure your batch environment has the same modules loaded so you get the same versions of all the libraries. Aroli Marcellinus writes: > When I try to compile the program with PETSC, and run it with mpirun using > qsub. And I have checked the log and it something

Re: [petsc-users] preallocate space for matrices if only the global number of nonzeros is known

2018-04-16 Thread Jed Brown
Klaus Burkart <k_burk...@yahoo.com> writes: > For a symmetric matrix: > I assume, I should compute the number of nonzeros per row just for the upper > triangle? Yes. > > Am Montag, 16. April 2018, 14:23:19 MESZ hat Jed Brown > <j...@jedbrown.org> Folgend

Re: [petsc-users] preallocate space for matrices if only the global number of nonzeros is known

2018-04-16 Thread Jed Brown
Klaus Burkart writes: > Hi, > How can I preallocate space for matrices (some symmetric, others > asymmetric) if I have the global number of nonzeros (NNZ) but not the > number of nonzeros per row? Unfortunately, this is not enough for efficient assembly. It is more

Re: [petsc-users] Could not execute "['git', 'rev-parse', '--git-dir']"

2018-04-04 Thread Jed Brown
"Kong, Fande" writes: > Updated: > > If switch to a different version of git. The configuration is going to > work. > > > This one works: > > > * petsc]$ git --version git version 1.8.5.2* > > > This new version does not work: > > petsc]$ git --version > git version 2.16.2

Re: [petsc-users] A bad commit affects MOOSE

2018-04-03 Thread Jed Brown
Matthew Knepley <knep...@gmail.com> writes: > On Tue, Apr 3, 2018 at 6:20 PM, Jed Brown <j...@jedbrown.org> wrote: > >> Derek Gaston <fried...@gmail.com> writes: >> >> > On Tue, Apr 3, 2018 at 4:06 PM Jed Brown <j...@jedbrown.org> wrote: >>

Re: [petsc-users] A bad commit affects MOOSE

2018-04-03 Thread Jed Brown
Derek Gaston <fried...@gmail.com> writes: > On Tue, Apr 3, 2018 at 4:06 PM Jed Brown <j...@jedbrown.org> wrote: > >> Communicators should be cheap. One per library per "size" isn't a huge >> number of communicators. >> > > I agree - but that's

Re: [petsc-users] A bad commit affects MOOSE

2018-04-03 Thread Jed Brown
Matthew Knepley <knep...@gmail.com> writes: > On Tue, Apr 3, 2018 at 6:06 PM, Jed Brown <j...@jedbrown.org> wrote: > >> Derek Gaston <fried...@gmail.com> writes: >> >> > Sounds great to me - what library do I download that we're all goin

Re: [petsc-users] A bad commit affects MOOSE

2018-04-03 Thread Jed Brown
Derek Gaston writes: > Sounds great to me - what library do I download that we're all going to use > for managing the memory pool? :-) > > Seriously though: why doesn't MPI give us an ability to get unique tag IDs > for a given communicator? It's called a dup'd

Re: [petsc-users] A bad commit affects MOOSE

2018-04-03 Thread Jed Brown
Derek Gaston writes: > Do you think there is any possibility of getting Hypre to use disjoint tags > from PETSc so you can just use the same comm? Maybe a configure option to > Hypre to tell it what number to start at for its tags? Why have malloc when we could just

Re: [petsc-users] A bad commit affects MOOSE

2018-04-03 Thread Jed Brown
Derek Gaston writes: > Sorry, should read: "any one MPI process is not involved in more than ~2000 > *communicators*" Yes, as intended. Only the ranks in a communicator's group need to know about the existence of that communicator. > Derek > > On Tue, Apr 3, 2018 at 11:47

Re: [petsc-users] A bad commit affects MOOSE

2018-04-03 Thread Jed Brown
The PETSc model is that the "outer" communicator (passed by the caller) is dup'd to create an "inner" communicator which as attached (using MPI attributes) to the outer communicator. In the future, PETSc will find the inner communicator and use that, instead of dup'ing again. Derek Gaston

Re: [petsc-users] Question about MatCreateSubMatrix

2018-03-29 Thread Jed Brown
Manav Bhatia writes: > Thanks, Matt. > > I also read page 72 in the manual about creating and assembling matrices. > > Just so that I understand correctly, MatGetLocalSubMatrix is a generic call > to create submatrices in the split-local or split-global space? So, it is

Re: [petsc-users] Question about MatCreateSubMatrix

2018-03-29 Thread Jed Brown
Manav Bhatia writes: > Hi, > > I have quick questions about MatCreateSubMatrix: > > — Once the sub matrix is created, do I need to keep the IS (isrow and iscol) > in memory till this matrix is active, or can I destroy it immediately after > the creation of the matrix

[petsc-users] Postdoc Position at CU Boulder: High order discretization, multilevel methods, performance portability

2018-03-26 Thread Jed Brown
CU Boulder Computer Science has an immediate opening for a postdoctoral researcher in the development of robust and efficient methods for high order/compatible PDE discretization and multilevel solvers, including deployment in open source libraries. The project is especially interested in

Re: [petsc-users] MatAssembly Cost Jump

2018-03-24 Thread Jed Brown
Have you preallocated? Everything you are doing should take less than 1 second. I know this is about MatSetValues, but unpacking from the stash also takes time. https://www.mcs.anl.gov/petsc/documentation/faq.html#efficient-assembly You can also try running with -matstash_bts, which will use a

Re: [petsc-users] slepc-master does not configure correctly

2018-03-21 Thread Jed Brown
Yes, DESTDIR is something that is only used during "make install". If you had a prefix install of PETSc, it should get PETSC_DIR (set to that prefix) and empty PETSC_ARCH. "Kong, Fande" writes: > Hi All, > > ~/projects/slepc]> PETSC_ARCH=arch-darwin-c-debug-master

Re: [petsc-users] [petsc-maint] the role of field split pressure inner solver

2018-03-18 Thread Jed Brown
The inner solver matters in practice, but that paper is predicated on the assumption that a scalable inner solver is available and is practical to apply exactly (e.g., converge to a tight tolerance). In practice, it often occupies most of the time and sometimes is the greatest robustness

Re: [petsc-users] Warning at the beginning of compiling

2018-03-12 Thread Jed Brown
If you want your compiler to use more aggressive optimization, e.g., -O3 -march=native, then you should pass them as ./configure COPTFLAGS='-O3 -march=native' --any-other-options-you-might-have Edoardo alinovi writes: > Dear users, > > what does this warning means?

Re: [petsc-users] make: *** No rule to make target `chk_makej', needed by `all'. Stop.

2018-03-08 Thread Jed Brown
Thanks, Jose. "Jose E. Roman" writes: > Update the SLEPc repository and try again. > When a change in petsc-master affects SLEPc, you have to allow one or two > days for us to re-synchronize. > Jose > >> El 9 mar 2018, a las 3:59, Samuel Lanthaler

Re: [petsc-users] No VecGetLocalSubVector?

2018-03-08 Thread Jed Brown
Garth Wells <gn...@cam.ac.uk> writes: > On Thu, 2018-03-08 at 11:25 -0700, Jed Brown wrote: >> Garth Wells <gn...@cam.ac.uk> writes: >> >> > On Wed, 2018-03-07 at 16:13 -0700, Jed Brown wrote: >> > > No reason, just didn't need it. I do

Re: [petsc-users] No VecGetLocalSubVector?

2018-03-08 Thread Jed Brown
Garth Wells <gn...@cam.ac.uk> writes: > On Wed, 2018-03-07 at 16:13 -0700, Jed Brown wrote: >> No reason, just didn't need it. I don't think any PETSc developers >> use >> VecSetValues* because VecScatter is a more natural interface with >> lower >> overhea

Re: [petsc-users] No VecGetLocalSubVector?

2018-03-08 Thread Jed Brown
No reason, just didn't need it. I don't think any PETSc developers use VecSetValues* because VecScatter is a more natural interface with lower overhead. Garth Wells writes: > Is there a reason why there is no 'VecGetLocalSubVector' to match > MatGetLocalSubMatrix? > > I've

Re: [petsc-users] Load balancing / redistributing a 1D DM

2018-03-05 Thread Jed Brown
Matthew Knepley writes: > On Mon, Mar 5, 2018 at 9:01 AM, Tobin Isaac wrote: > >> This is a somewhat incomplete description of the steps in linear >> partitioning. The rest can be accomplished with PetscSF calls, but I >> should wrap it up in a

Re: [petsc-users] Fwd: what is the equivalent DMDAVecRestoreArray() function in petsc4py?

2018-02-15 Thread Jed Brown
HeeHo Park writes: > Yes, this works. > > u = da.getVecArray(U) > for i in range(mstart, mend): > u[i] = np.sin(np.pi*i*6.*h) + 3.*np.sin(np.pi*i*2.*h) > > The code above also worked without restoreVecArray. I guess the u just > points at the array U. It won't be

Re: [petsc-users] How to efficiently represent a diagonal matrix?

2018-02-14 Thread Jed Brown
Fande Kong writes: > On Wed, Feb 14, 2018 at 4:35 PM, Smith, Barry F. wrote: > >> >> What are you doing with the matrix? >> > > We are doing an explicit method. PDEs are discretized using a finite > element method, so there is a mass matrix. The mass

Re: [petsc-users] Write Non-Zero Values of MPI Matrix on an MPI Vector

2018-02-13 Thread Jed Brown
Ali Berk Kahraman writes: > OK, here is the thing. I have a 2D cartesian regular grid. I am working > on wavelet method collocation method, which creates an irregular > adaptive grid by turning grid points on an off on the previously > mentioned cartesian grid. I

Re: [petsc-users] Write Non-Zero Values of MPI Matrix on an MPI Vector

2018-02-13 Thread Jed Brown
Ali Kahraman writes: > > Dear All, > > My problem definition is as follows, > > I  have an MPI matrix with a random sparsity pattern i.e. I do not know how > many nonzeros there are on any row unless I call MatGetRow to learn it. There > are possibly unequal

Re: [petsc-users] Visualizing structured cell-centered data VTK

2018-02-07 Thread Jed Brown
"Buesing, Henrik" writes: >> >> > I have structured cell-centered data and would like to visualize >> >> > this with >> >> Paraview. Up to now I use PetscViewerVTKOpen and VecView to write >> >> data in *.vts format. I would like to tell PETSc that the fieldtype

Re: [petsc-users] Parallel output in PETSc with pHDF5 and VTK

2018-02-07 Thread Jed Brown
"Buesing, Henrik" writes: >> >>> Can PETSc use parallel HDF5? >> >> Yeah, the implementation is in VecView_MPI_HDF5_DA and uses >> >> H5FD_MPIO_COLLECTIVE if supported. Did you build your HDF5 with >> MPI? >> > >> > I just --download-hdf5. Do I need to do

Re: [petsc-users] Visualizing structured cell-centered data VTK

2018-02-07 Thread Jed Brown
"Buesing, Henrik" writes: >> > I have structured cell-centered data and would like to visualize this with >> Paraview. Up to now I use PetscViewerVTKOpen and VecView to write data in >> *.vts format. I would like to tell PETSc that the fieldtype is >>

Re: [petsc-users] Parallel output in PETSc with pHDF5 and VTK

2018-02-07 Thread Jed Brown
"Buesing, Henrik" writes: >>> Can PETSc use parallel HDF5? >> Yeah, the implementation is in VecView_MPI_HDF5_DA and uses >> H5FD_MPIO_COLLECTIVE if supported. Did you build your HDF5 with MPI? > > I just --download-hdf5. Do I need to do something else? That

Re: [petsc-users] Parallel output in PETSc with pHDF5 and VTK

2018-02-07 Thread Jed Brown
"Buesing, Henrik" writes: > Dear all, > > I would like to write HDF5 and VTK files in parallel. I found Vec example > 19: > "Parallel HDF5 Vec Viewing". But I do not understand

Re: [petsc-users] Visualizing structured cell-centered data VTK

2018-02-07 Thread Jed Brown
"Buesing, Henrik" writes: > Dear all, > > I have structured cell-centered data and would like to visualize this with > Paraview. Up to now I use PetscViewerVTKOpen and VecView to write data in > *.vts format. I would like to tell PETSc that the fieldtype is >

Re: [petsc-users] pseudo-transient ?

2018-02-06 Thread Jed Brown
cit form. So, I think I have to configure the SNES. > > -----Original Message- > From: Jed Brown [mailto:j...@jedbrown.org] > Sent: Wednesday, February 7, 2018 6:40 AM > To: Smith, Barry F. <bsm...@mcs.anl.gov>; Mohammad Hassan Baghaei > <mhbagh...@mail.sjtu.edu.cn>

Re: [petsc-users] MatZeroRowsColumnsLocal for MatNest

2018-02-04 Thread Jed Brown
age, we can just fix up the dispatch. > Garth > > On 4 February 2018 at 18:43, Jed Brown <j...@jedbrown.org> wrote: > >> It is not implemented and it's somewhat inconsistent with the MatNest >> philosophy of specifying everything in terms of local indices, though it >

Re: [petsc-users] MatZeroRowsColumnsLocal for MatNest

2018-02-04 Thread Jed Brown
It is not implemented and it's somewhat inconsistent with the MatNest philosophy of specifying everything in terms of local indices, though it could be implemented. "Garth N. Wells" writes: > Should MatZeroRowsColumnsLocal work for matrices of type MATNEST? > > Garth

Re: [petsc-users] A question on Schur complement

2018-01-26 Thread Jed Brown
saturday luis writes: > Thanks, Jed. > > It seems that MatCreateLRC requires two dense matrices for U and V > according to the page > http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatCreateLRC.html > > Not sure if it is applicable to sparse matrices.

Re: [petsc-users] A question on Schur complement

2018-01-26 Thread Jed Brown
saturday luis writes: > Hi PETSc team: > > I want to consult for a good way of doing an approximated Schur complement > matrix. So I just want to handle a matrix in the format C + B^t B, or > sometimes B^t B. > > An easy way is to run with the MatCreateSchurComplement to

Re: [petsc-users] Time cost by Vec Assembly

2018-01-22 Thread Jed Brown
Fande Kong <fdkong...@gmail.com> writes: > On Fri, Oct 7, 2016 at 10:30 PM, Jed Brown <j...@jedbrown.org> wrote: > >> Barry Smith <bsm...@mcs.anl.gov> writes: >> > There is still something wonky here, whether it is the MPI >> implementation o

Re: [petsc-users] quad precision solvers

2017-12-31 Thread Jed Brown
Santiago Andres Triana writes: > Hi petsc-users, > > What solvers (either petsc-native or external packages) are available for > quad precision (i.e. __float128) computations? All native solvers and none of the external packages. > I am dealing with a large (1e6 x 1e6),

Re: [petsc-users] Growing memory use with VecGhostUpdate

2017-12-26 Thread Jed Brown
ll that help to solve this ? > > There is a recent issue related to memory leak > > https://github.com/open-mpi/ompi/issues/4567 > <https://github.com/open-mpi/ompi/issues/4567> > > Thank you > praveen > >> On 26-Dec-2017, at 7:33 PM, Jed Brown &l

Re: [petsc-users] Growing memory use with VecGhostUpdate

2017-12-26 Thread Jed Brown
First check PetscMallocGetCurrentUsage() in the loop to confirm that there is no leak of PetscMalloc()'ed memory. That would mean the leak comes from elsewhere, maybe MPI. Then get a stack trace for the leaking memory (e.g., using valgrind --tool=massif or a debugger)? Praveen C

Re: [petsc-users] Advices to decrease bicgstab iterations

2017-12-13 Thread Jed Brown
Edoardo alinovi writes: > Ps: I am solving Navier-Stokes equation (pressure-correction equation in > particular). The matrix is sparse and in mpiaij fotmat. If you're just solving a pressure projection then you can and should use multigrid. For example, -pc_type

Re: [petsc-users] Advices to decrease bicgstab iterations

2017-12-12 Thread Jed Brown
When asking solvers advice, please always explain the problem you are solving and the discretization that you use. Edoardo alinovi writes: > Dear petsc users, > > I am doing some calculations to test my code in parallel using petsc. With > respect the serial code,

Re: [petsc-users] SNESLineSearchSetPre/PostCheck()

2017-12-01 Thread Jed Brown
"Buesing, Henrik" <hbues...@eonerc.rwth-aachen.de> writes: >> -Ursprüngliche Nachricht- >> Von: Jed Brown [mailto:j...@jedbrown.org] >> Gesendet: 01 December 2017 14:18 >> An: Buesing, Henrik <hbues...@eonerc.rwth-aachen.de>; petsc-users >&

Re: [petsc-users] SNESLineSearchSetPre/PostCheck()

2017-12-01 Thread Jed Brown
"Buesing, Henrik" writes: > Dear all, > > So what is the difference between the pre and post check? When should I use > what? PreCheck runs before starting the line search, PostCheck runs after the line search has completed and (if relevant) the inequality

Re: [petsc-users] tensor-product mesh

2017-11-26 Thread Jed Brown
You could use DMDA but would need to write some dummy equations for all the points replicated in the center, and that might slow your solver. Mohammad Hassan Baghaei writes: > Hi > > I am going to solve the PDEs on a domain of a circle, which I need to use > the

Re: [petsc-users] MatZeroRowsColumns

2017-11-24 Thread Jed Brown
Matthew Knepley writes: > On Fri, Nov 24, 2017 at 6:42 AM, Samuel Lanthaler > wrote: > >> Ah, great. I didn't understand that "optional" arguments are not optional >> in the fortran sense of the word. After setting up two vectors to pass to >> the

Re: [petsc-users] MatZeroRowsColumns

2017-11-24 Thread Jed Brown
Samuel Lanthaler writes: > Ah, great. I didn't understand that "optional" arguments are not > optional in the fortran sense of the word. After setting up two vectors > to pass to the routine, the program works. Thank you very much! > > One additional question: In the

Re: [petsc-users] Intel MKL

2017-11-20 Thread Jed Brown
Randall Mackie writes: > Dear PETSc team: > > On upgrading to version 3.8, we have discovered an inconsistency in the > python configuration scripts for using Intel MKL for BLAS/LAPACK. > It seems that these options were changed between 3.7 and 3.8: > > > Version 3.8: >

Re: [petsc-users] Auxiliary fields for multigrid

2017-11-19 Thread Jed Brown
"zakaryah ." writes: > Ok, thanks for the suggestions. > ​I'd like to check that I understand the approach. > > I create one DMDA for the variables to be solved by the SNES. That DMDA > will be coarsened and refined by the options I pass to e.g. FAS. In my > user context

Re: [petsc-users] questions about vectorization

2017-11-18 Thread Jed Brown
Richard Tran Mills writes: > On Tue, Nov 14, 2017 at 12:13 PM, Zhang, Hong wrote: > >> >> >> On Nov 13, 2017, at 10:49 PM, Xiangdong wrote: >> >> 1) How about the vectorization of BAIJ format? >> >> >> BAIJ kernels are optimized with

Re: [petsc-users] Auxiliary fields for multigrid

2017-11-17 Thread Jed Brown
Dave May writes: > Are there PETSc examples that do this? >> > > Not that I'm aware off. Most use Galerkin or rediscretize the operator on > the coarser levels. src/snes/examples/tutorials/ex48.c

Re: [petsc-users] Possible to recover ILU(k) from hypre/pilut?

2017-11-15 Thread Jed Brown
"Smith, Barry F." writes: >> On Nov 15, 2017, at 6:38 AM, Mark Lohry wrote: >> >> I've found ILU(0) or (1) to be working well for my problem, but the petsc >> implementation is serial only. Running with -pc_type hypre -pc_hypre_type >> pilut with default

Re: [petsc-users] IDR availalbe in PETSC?

2017-11-15 Thread Jed Brown
There isn't an IDR in PETSc, but there is BCGSL which usually performs similarly. Contributions welcome. Evan Um writes: > Dear PETSC users, > > I was wondering if anyone already tried/developed an induced dimension > reduction (IDR) solver for PETSC? I think that it is a

Re: [petsc-users] questions about vectorization

2017-11-13 Thread Jed Brown
Mark Adams writes: > On Sun, Nov 12, 2017 at 11:35 PM, Xiangdong wrote: > >> Hello everyone, >> >> Can someone comment on the vectorization of PETSc? For example, for the >> MatMult function, will it perform better or run faster if it is compiled >> with

Re: [petsc-users] SNES without SNESSetJacobian, snes_fd or snes_mf

2017-11-09 Thread Jed Brown
Florian Kauer writes: > Hi, > what is the SNES solver actually doing when you do not provide a > jacobian and not explicitly select either finite differencing > approximation or matrix-free Newton-Krylov method? > > I just noticed that I mistakenly did this, but a good

Re: [petsc-users] troubleshooting AMG, coupled navier stokes, large eigenvalues on coarsest level

2017-11-08 Thread Jed Brown
Mark Lohry writes: >> >> You want to use the Schur complement PCs for NS. We have some support for PC where you give us a mass matrix. >>> >>> >>> I'll look into it, but I'm not aware of Schur complement being used for >>> compressible/coupled NS, only for

Re: [petsc-users] A number of questions about DMDA with SNES and Quasi-Newton methods

2017-10-25 Thread Jed Brown
tial solve. Is there a more > efficient way - can I just create J and somehow extract the global > submatrix J_hh? > > On Tue, Oct 24, 2017 at 11:01 PM, Jed Brown <j...@jedbrown.org> wrote: > >> Hmm, this is a use case we would like to support, but I'm not sure how &g

Re: [petsc-users] A number of questions about DMDA with SNES and Quasi-Newton methods

2017-10-24 Thread Jed Brown
Hmm, this is a use case we would like to support, but I'm not sure how to do it. I think at this point that your local submatrix will only have a stencil set if you were using MatNest, which I don't recommend (whatever you do, don't depend on it). But since you have the DMDA for your J_hh block,

Re: [petsc-users] A number of questions about DMDA with SNES and Quasi-Newton methods

2017-10-23 Thread Jed Brown
the geometric multigrid solver). DMCreateInjection(), >> DMCreateInterpolation(), DMCreateRestriction(). >> >> Barry >> >> > >> > Thanks again - it's amazing to me how thorough the PETSc methods are, >> and the ease with which the user

Re: [petsc-users] A number of questions about DMDA with SNES and Quasi-Newton methods

2017-10-22 Thread Jed Brown
>> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for >> trouble shooting. >> >> [0]PETSC ERROR: Petsc Release Version 3.7.6, Apr, 24, 2017 >> >> [0]PETSC ERROR: ./CalculateOpticalFlow on a arch-linux2-c-opt named >> node046.hpc.

Re: [petsc-users] Distributing already assembled stiffness matrix

2017-10-18 Thread Jed Brown
. > 2)When I also tried using MatSetValues it doesn't seem to use the same > indexing as compressed row storage format.What type of indexing should > be used when MatSetValues are used and called from rank 0 for CRS > Matrices? > > On 2017-10-18 13:33, Jed Brown wrote: >> Easiest i

Re: [petsc-users] Distributing already assembled stiffness matrix

2017-10-18 Thread Jed Brown
Easiest is to assemble into a distributed matrix from rank 0. So instead of calling MatCreate using PETSC_COMM_SELF, use a parallel communicator (like PETSC_COMM_WORLD). It is fine if only rank 0 calls MatSetValues, but all processes must call MatAssemblyBegin/End. "Jaganathan, Srikrishna"

Re: [petsc-users] High-dimensional DMDA

2017-10-17 Thread Jed Brown
Matthew Knepley <knep...@gmail.com> writes: > On Tue, Oct 17, 2017 at 5:01 PM, Jed Brown <j...@jedbrown.org> wrote: > >> Tobin Isaac <tis...@cc.gatech.edu> writes: >> >> > Which is something so rote that creating DTFD to convert the pointwise >>

Re: [petsc-users] High-dimensional DMDA

2017-10-17 Thread Jed Brown
Tobin Isaac writes: > Which is something so rote that creating DTFD to convert the pointwise > residuals/jacobians into stencils would go along way towards unifying > DMDA and DMPlex in a single useful interface. On a related topic, I have reason to add Fornberg's

Re: [petsc-users] Issue with -log_view

2017-10-17 Thread Jed Brown
Thanks for the test case. Fixed here (now in 'next' and will merge to 'maint' tomorrow). https://bitbucket.org/petsc/petsc/commits/aa139df67e726a84ab5cd3b5e98c800722a9f20a Stefano Zampini writes: > cutting and paste a message I sent a couple of days ago on the

Re: [petsc-users] Can not configure PETSc-master with clang-3.9

2017-10-16 Thread Jed Brown
"Kong, Fande" writes: > Hi All, > > I just upgraded MAC OS, and also updated all other related packages. Now > I can not configure PETSc-master any more. Your compiler paths are broken.

Re: [petsc-users] DMDA and boundary conditions

2017-10-15 Thread Jed Brown
"zakaryah ." writes: > Thanks for all the answers, Barry! > > By constant vector, I just meant the part of the function or Jacobian which > doesn't depend on the state variable. If you need inhomogeneous Neumann, you'll have to modify the ghost value. MIRROR is really a

Re: [petsc-users] Reading in a matrix from ASCII file

2017-10-05 Thread Jed Brown
on() line 0 in unknown file > application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0 > [unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=59 > : > system msg for write_line failure : Bad file descriptor > > -Storm > > P.S. Should I be using reply-all to in these e

Re: [petsc-users] Reading in a matrix from ASCII file

2017-10-05 Thread Jed Brown
http://www.mcs.anl.gov/petsc/documentation/faq.html#sparse-matrix-ascii-format Better, read it using Python on MATLAB and write it (using the provided PETSc scripts) in PETSc binary format. Parallel IO with ASCII files is a dead end. Storm Weiner writes: > Hey there,

Re: [petsc-users] How to interface with PETSc from another application?

2017-10-04 Thread Jed Brown
Matthew Knepley writes: > On Wed, Oct 4, 2017 at 6:52 PM, Klaus Burkart wrote: > >> Thank you for the hint, the problem becomes clearer, it's looking for >> libpetsc.so.3.7 which is not found but is located in the same directory >> as libpetsc.so but

Re: [petsc-users] How to interface with PETSc from another application?

2017-10-04 Thread Jed Brown
sue. You can use ldd to check whether the plugin was linked correctly (it should find libpetsc.so). > > Jed Brown <j...@jedbrown.org> schrieb am 21:39 Mittwoch, 4.Oktober 2017: > > > Klaus Burkart <k_burk...@yahoo.com> writes: > >> When I link the petsc li

Re: [petsc-users] How to interface with PETSc from another application?

2017-10-04 Thread Jed Brown
d to add that path to LD_LIBRARY_PATH so the loader can find it. None of these are PETSc issues, just linking dynamic libraries. > Jed Brown <j...@jedbrown.org> schrieb am 18:45 Mittwoch, 4.Oktober 2017: > > > Klaus Burkart <k_burk...@yahoo.com> writes: > &g

Re: [petsc-users] How to interface with PETSc from another application?

2017-10-04 Thread Jed Brown
ent variable or a configuration file to get run-time options to PETSc. > I came back to this simple test after writing "the complete code" which > showed these problems and stripped it down, step-by-step, to figure out what > causes the problem i.e. everything but a declaration.

Re: [petsc-users] How to interface with PETSc from another application?

2017-10-04 Thread Jed Brown
Klaus Burkart writes: > What's the concept to interface with PETSc from another application to solve > a linear system with PETSc? > > The standard procedure of the job: > > 1: The application provides a matrix which needs to be converted and be > loaded into PETSc > > 2:

Re: [petsc-users] A number of questions about DMDA with SNES and Quasi-Newton methods

2017-10-03 Thread Jed Brown
doing wrong? > > On Tue, Oct 3, 2017 at 10:08 AM, Jed Brown <j...@jedbrown.org> wrote: > >> Barry Smith <bsm...@mcs.anl.gov> writes: >> >> >> On Oct 3, 2017, at 5:54 AM, zakaryah . <zakar...@gmail.com> wrote: >> >> >> >&g

Re: [petsc-users] A number of questions about DMDA with SNES and Quasi-Newton methods

2017-10-03 Thread Jed Brown
Barry Smith writes: >> On Oct 3, 2017, at 5:54 AM, zakaryah . wrote: >> >> I'm still working on this. I've made some progress, and it looks like the >> issue is with the KSP, at least for now. The Jacobian may be >> ill-conditioned. Is it possible

Re: [petsc-users] How to link petsc?

2017-10-01 Thread Jed Brown
Either use the PETSc makefiles or use pkg-config. This is a pretty comprehensive makefile you can use: PETSc.pc := $(PETSC_DIR)/$(PETSC_ARCH)/lib/pkgconfig/PETSc.pc CC := $(shell pkg-config --variable=ccompiler $(PETSc.pc)) CXX := $(shell pkg-config --variable=cxxcompiler $(PETSc.pc)) FC :=

Re: [petsc-users] Incorrect Eigenvalues when Setting KSP and PC types

2017-09-29 Thread Jed Brown
Barry Smith writes: > 1) The test is definitely in the wrong place. If we are testing and > erroring if using Cholesky and mat is not marked as symmetric or hermitian > the test should be in MatGetFactor() not in a particular implementation. > > 2) It is a tough call if

Re: [petsc-users] Creating a Matrix Using Inner Products of Columns and Rows of Two matrices

2017-09-26 Thread Jed Brown
Why is this not MatMatMult()? Ali Berk Kahraman writes: > Hello all, > > I have to generate a matrix C such that > ,Ck,m=∑pAk,pDp,mC_{k,m}=\sum_{p}A_{k,p}D_{p,m} where A and D are two > square matrices of the same size. This is simply the inner products of > rows

Re: [petsc-users] what is the restriction for PCMG, and how to control it?

2017-09-18 Thread Jed Brown
Ed Bueler writes: > Dear PETSc -- > > This is most embarassing, but somehow I can't see it in the docs. > > Regarding defaults for DMDA and PCMG, for the fine-to-coarse restriction, > does -pc_type mg use the adjoint of interpolation? (I.e. "full > weighting," at least up

Re: [petsc-users] SNES ex12 visualization

2017-09-14 Thread Jed Brown
"Kong, Fande" writes: >> Given the way I/O is structured on big machines, we believe the multiple >> file route is a huge mistake. Also, all our measurements >> say that sending some data on the network is not noticeable given the disk >> access costs. >> > > I have slightly

Re: [petsc-users] Example for solving system of pde with snes

2017-09-10 Thread Jed Brown
Matthew Knepley writes: > On Sun, Sep 10, 2017 at 9:15 AM, Praveen C wrote: > >> >> >>> >>> You can use SNESSetJacobian, but DMSNESSetJacobianLocal is more >>> convenient in my opinion. >>> >>> > I still have some doubt. If >>> > >>> > da0 --> for residual

Re: [petsc-users] Example for solving system of pde with snes

2017-09-10 Thread Jed Brown
Praveen C writes: > Hello Matt > > >> No. You want 2 DAs, 1 for evaluating residuals with s = 3, and one for >> making a Jacobian with s = 1. You give these >> two DAs to >> >> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/SNES/ >> DMDASNESSetFunctionLocal.html

Re: [petsc-users] Example for solving system of pde with snes

2017-09-10 Thread Jed Brown
Praveen C writes: > Dear all > > I am solving 3 coupled first order PDE in 2-D with SNES. The stencil is > (3+1+3) in both directions due to weno scheme. I want to use matrix-free > gmres. For preconditioner, I will use first order scheme with stencil > (1+1+1) in both

Re: [petsc-users] A number of questions about DMDA with SNES and Quasi-Newton methods

2017-09-05 Thread Jed Brown
"zakaryah ." writes: > OK - I've checked the Jacobian and function very thoroughly and I am > confident there are no errors. Does Newton converge quadratically when you have a good enough initial guess? Globalization of large deformation elasticity is a persistent

Re: [petsc-users] Red-black block Jacobi in PETSc?

2017-09-03 Thread Jed Brown
ining the block > sizes. Is there something equivalent for PCSOR?) > > Also, could you provide a brief overview of how I should go about altering > SOR to do the coloring? Thanks! > > > > On Tue, Aug 29, 2017 at 11:35 PM, Barry Smith <bsm...@mcs.anl.gov> wrote: > >

Re: [petsc-users] Fwd: direct solvers on KNL

2017-09-01 Thread Jed Brown
Matthew Knepley writes: > Admittedly it was for different computations, but we saw strong scaling > degradation after 32 cores of KNL > in https://arxiv.org/abs/1705.09907, What is "heterogeneous" about KNL? Also, how is it an "accelerator" (a term created by NVIDIA

Re: [petsc-users] Red-black block Jacobi in PETSc?

2017-08-29 Thread Jed Brown
Barry Smith writes: > Ok, you should be using the BAIJ matrix it supports point-block Jacobi and > point-block Gauss-Seidel. > >We do not have a red-black Jacobi/Gauss-Seidel but you could easily add > it. You will add it, not by using a any shell objects but by

Re: [petsc-users] Petsc ILU PC Change between 3.6.4 and 3.7.x?

2017-08-28 Thread Jed Brown
to:c.kl...@marin.nl | http://www.marin.nl > > MARIN news: > http://www.marin.nl/web/News/News-items/Improved-modelling-of-sheet-cavitation-dynamics-on-Delft-Twistll-Hydrofoil-1.htm > > > From: Jed Brown <j...@jedbrown.org> > Sent: Thur

Re: [petsc-users] Logo?

2017-08-25 Thread Jed Brown
rhaps we can think up something > simple like this for PETSc? > > --Richard > > On Fri, Aug 25, 2017 at 7:12 AM, Jed Brown <j...@jedbrown.org> wrote: > >> Haha, there's a reason nobody uses it. ;-) >> >> Lukas van de Wiel <lukas.drinkt.t...@gmail.com>

Re: [petsc-users] Shell matrix MatCreateVecs

2017-08-25 Thread Jed Brown
Barry Smith <bsm...@mcs.anl.gov> writes: >> On Aug 24, 2017, at 7:42 PM, Jed Brown <j...@jedbrown.org> wrote: >> >> "Jose E. Roman" <jro...@dsic.upv.es> writes: >> >>>> El 24 ago 2017, a las 22:51, Greg Meyer <gregory.me...@gm

<    2   3   4   5   6   7   8   9   10   11   >