Re: [petsc-users] how to use petsc4py with mpi subcommunicators?

2017-04-11 Thread Jed Brown
Rodrigo Felicio writes: > I think they are linked to the same MPI, but I am not sure how to confirm > that. Looking into mpi4py/mpi.cfg I see the expected mpicc. On > petsc4py/lib/petsc.cfg points to the petsc install directory and in there on > the configure.log

Re: [petsc-users] status of "make install" ?

2017-04-11 Thread Barry Smith
>> "Incorrect prefix usage. Specified destDir same as current >> PETSC_DIR/PETSC_ARCH" Satish, We need a better error message here. It should tell the user what you said below, that they need to run ./configure with a prefix before doing make install Barry > On Apr 11, 2017, at

Re: [petsc-users] how to use petsc4py with mpi subcommunicators?

2017-04-11 Thread Gaetan Kenway
Hi all I think I remember having this or a similar issue at some point as well. The issue was we had two (python wrapped) codes on the MPI_COMM_WORLD but only one of them used PETSc. We never did figure out how to just get petsc initialized on the one sub-comm. The workaround was just to do from

Re: [petsc-users] how to use petsc4py with mpi subcommunicators?

2017-04-11 Thread Rodrigo Felicio
I think they are linked to the same MPI, but I am not sure how to confirm that. Looking into mpi4py/mpi.cfg I see the expected mpicc. On petsc4py/lib/petsc.cfg points to the petsc install directory and in there on the configure.log file I see the same path for the same intel mpi compiler... I

Re: [petsc-users] FindPETSc.cmake expects petscvariables in wrong location

2017-04-11 Thread Satish Balay
On Tue, 11 Apr 2017, Joachim Wuttke wrote: > 'make test' was successful. > > And indeed, > ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/conf/petscvariables > exists. > There was a mistake in my PETSC_DIR. > Now FindPETSc.cmake does find petscvariables ... > > ... and I am at the next error: > CMake

Re: [petsc-users] how to use petsc4py with mpi subcommunicators?

2017-04-11 Thread Jed Brown
Looks like a question for Lisandro. I believe the code you have (with appropriate collective semantics) was intended to work, but I'm not in a position to debug right now. Have you confirmed that mpi4py is linked to the same MPI as petsc4py/PETSc? Rodrigo Felicio

Re: [petsc-users] FindPETSc.cmake expects petscvariables in wrong location

2017-04-11 Thread Joachim Wuttke
... and I am at the next error: CMake Error at cmake/modules/FindPETSc.cmake:164 (include): include could not find load file: ResolveCompilerPaths which is easily solved by copying that file from the external repository https://github.com/jedbrown/cmake-modules/ smime.p7s Description:

Re: [petsc-users] FindPETSc.cmake expects petscvariables in wrong location

2017-04-11 Thread Joachim Wuttke
'make test' was successful. And indeed, ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/conf/petscvariables exists. There was a mistake in my PETSC_DIR. Now FindPETSc.cmake does find petscvariables ... ... and I am at the next error: CMake Error at cmake/modules/FindPETSc.cmake:164 (include): include

Re: [petsc-users] FindPETSc.cmake expects petscvariables in wrong location

2017-04-11 Thread Satish Balay
On Tue, 11 Apr 2017, Satish Balay wrote: > On Tue, 11 Apr 2017, Joachim Wuttke wrote: > > > > you need to give me details on how you installed petsc. [say make.log] > > > > tar zxvf petsc-3.7.5.tar.gz > > > > cd petsc-3.7.5 > > > > ./configure --with-shared-libraries

Re: [petsc-users] FindPETSc.cmake expects petscvariables in wrong location

2017-04-11 Thread Satish Balay
On Tue, 11 Apr 2017, Joachim Wuttke wrote: > > you need to give me details on how you installed petsc. [say make.log] > > tar zxvf petsc-3.7.5.tar.gz > > cd petsc-3.7.5 > > ./configure --with-shared-libraries PETSC_DIR=/usr/local/src/petsc-3.7.5 > PETSC_ARCH=linux-amd64

Re: [petsc-users] FindPETSc.cmake expects petscvariables in wrong location

2017-04-11 Thread Joachim Wuttke
you need to give me details on how you installed petsc. [say make.log] tar zxvf petsc-3.7.5.tar.gz cd petsc-3.7.5 ./configure --with-shared-libraries PETSC_DIR=/usr/local/src/petsc-3.7.5 PETSC_ARCH=linux-amd64 --with-mpi-dir=/usr/lib/x86_64-linux-gnu/openmpi make MAKE_NP=7

Re: [petsc-users] FindPETSc.cmake expects petscvariables in wrong location

2017-04-11 Thread Satish Balay
you need to give me details on how you installed petsc. [say make.log] Satish On Tue, 11 Apr 2017, Joachim Wuttke wrote: > Satish, thank you very much for your prompt answers. > Your last one, however, does not solve my problem. > > PETSC_ARCH='' is not the solution. > > Line 115 of

Re: [petsc-users] FindPETSc.cmake expects petscvariables in wrong location

2017-04-11 Thread Joachim Wuttke
Satish, thank you very much for your prompt answers. Your last one, however, does not solve my problem. PETSC_ARCH='' is not the solution. Line 115 of FindPETSc.cmake, if (EXISTS "${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/conf/petscvariables") # > 3.5 would then search for

Re: [petsc-users] FindPETSc.cmake expects petscvariables in wrong location

2017-04-11 Thread Satish Balay
If you use a prefix install - after the install process - you would Not use PETSC_ARCH. i.e PETSC_ARCH='' Satish On Tue, 11 Apr 2017, Joachim Wuttke wrote: > The PETSc FAQ recommends to use the FindPETSc.cmake module > from the repository https://github.com/jedbrown/cmake-modules. > > This

[petsc-users] FindPETSc.cmake expects petscvariables in wrong location

2017-04-11 Thread Joachim Wuttke
The PETSc FAQ recommends to use the FindPETSc.cmake module from the repository https://github.com/jedbrown/cmake-modules. This doesn't work for me. CMake fails with the following message: CMake Error at cmake/modules/FindPETSc.cmake:125 (message): The pair

Re: [petsc-users] status of "make install" ?

2017-04-11 Thread Satish Balay
It supports 2 modes: 1. inplace [default]: ./configure && make 2. prefix ./configure --prefix=/prefix/location && make && make install So to use 'make install' - you need to run configure with the correct prefix option. Satish On Tue, 11 Apr 2017, Joachim Wuttke wrote: > Does PETSc

Re: [petsc-users] status of PETSc installation via CMake?

2017-04-11 Thread Satish Balay
BTW: we don't use Autotools either. [our configure tool is homegrown] Satish On Tue, 11 Apr 2017, Satish Balay wrote: > We never had a cmake build infrastructure.. It was always configure && make. > > However - earlier on - we did have a mode of using cmake to generate > gnumakefiles

[petsc-users] status of "make install" ?

2017-04-11 Thread Joachim Wuttke
Does PETSc support the usual installation command sequence configure; make; make install? The installation web page does not mention "make install". The Makefile generated by configure does contain a target "install". However, "make install" does not work; it yields the error message

Re: [petsc-users] status of PETSc installation via CMake?

2017-04-11 Thread Satish Balay
We never had a cmake build infrastructure.. It was always configure && make. However - earlier on - we did have a mode of using cmake to generate gnumakefiles [currently depricated - it might still work] - but we've moved on to using native gnumakefiles - so don't need cmake to generate them

[petsc-users] status of PETSc installation via CMake?

2017-04-11 Thread Joachim Wuttke
The current source archive petsc-3.7.5.tar.gz comes with files - configure for Autotools based installation - CMakeLists.txt for CMake based installation However, the installation web page https://www.mcs.anl.gov/petsc/documentation/installation.html only mentions "./configure". So what is

[petsc-users] specifying vertex coordinates using DMPlexCreateFromCellListParallel

2017-04-11 Thread Hassan Raiesi
Hello, I'm trying to use DMPlexCreateFromCellListParallel to create a DM from an already partitioned mesh, It requires an array of numVertices*spaceDim numbers, but how should one order the coordinates of the vertices? we only pass the global vertex numbers using 'const int cells[]' to define

Re: [petsc-users] Solving NON-Diagonally dominant sparse system

2017-04-11 Thread Peetz, Darin T
Did you call KSPSetInitialGuessNonzero() or use the option -ksp_initial_guess_nonzero? Otherwise I think Petsc zeroes out your initial guess when you call KSPSolve(). From: petsc-users-boun...@mcs.anl.gov [petsc-users-boun...@mcs.anl.gov] on behalf of Kaushik

Re: [petsc-users] Solving NON-Diagonally dominant sparse system

2017-04-11 Thread Dave May
Nope - welcome to finite precision arithmetic. What's the condition number? On Tue, 11 Apr 2017 at 14:07, Kaushik Kulkarni wrote: > But anyway since I am starting off with the exact solution itself, > shouldn't the norm should be zero independent of the conditioning? > >

Re: [petsc-users] Solving NON-Diagonally dominant sparse system

2017-04-11 Thread Kaushik Kulkarni
But anyway since I am starting off with the exact solution itself, shouldn't the norm should be zero independent of the conditioning? On Tue, Apr 11, 2017 at 11:57 AM, Dave May wrote: > > > On Tue, 11 Apr 2017 at 07:28, Kaushik Kulkarni > wrote: >

Re: [petsc-users] Manual mistaken about VecSetValues

2017-04-11 Thread Patrick Sanan
The path is important, as there are many examples named "ex2.c". The example on pp. 32-35 is ${PETSC_DIR}/src/ksp/ksp/examples/tutorials/ex2.c , which is about KSP, not Vec. 2017-04-11 9:53 GMT+02:00 Joachim Wuttke : > The PETSc User Manual [ANL-95/11 Rev 3.7 ] says on

[petsc-users] Manual mistaken about VecSetValues

2017-04-11 Thread Joachim Wuttke
The PETSc User Manual [ANL-95/11 Rev 3.7 ] says on p. 44: Example usage of VecSetValues() may be found in ${PETSC_DIR}/src/vec/vec/examples/tutorials/ex2.c However, that example [pp. 32-35 in the User Manual] does not contain "VecSetValues". smime.p7s Description: S/MIME Cryptographic

Re: [petsc-users] Solving NON-Diagonally dominant sparse system

2017-04-11 Thread Dave May
On Tue, 11 Apr 2017 at 07:28, Kaushik Kulkarni wrote: > A strange behavior I am observing is: > Problem: I have to solve A*x=rhs, and currently I am currently trying to > solve for a system where I know the exact solution. I have initialized the > exact solution in the Vec