Re: [petsc-users] Mac OSX 10.14 related MPI compilation issue

2018-10-17 Thread Smith, Barry F.
Ian, You need to use brew to uninstall the MPI in /usr/local before you use the other install of MPI. There is no easy systematic way to force the compiler and linker to find the "other" mpi.h first. Barry Having multiple MPI's installed on the system is often problematic. >

Re: [petsc-users] fortran INTENT with petsc object gives segfault after upgrade from 3.8.4 to 3.10.2

2018-10-19 Thread Smith, Barry F.
Hmm, the intent of all three first arguments should be in since they are passed in from the routine above. Does it work if you replace > Vec, INTENT(out) :: rr_system with > Vec, INTENT(in) :: rr_system ? Barry > On Oct 19, 2018, at 3:51 AM, Klaij, Christiaan wrote: > > I've re

Re: [petsc-users] PetscInt overflow

2018-10-19 Thread Smith, Barry F.
> On Oct 19, 2018, at 7:56 AM, Zhang, Junchao wrote: > > > On Fri, Oct 19, 2018 at 4:02 AM Jan Grießer > wrote: > With more than 1 MPI process you mean i should use spectrum slicing in divide > the full problem in smaller subproblems? > The --with-64-bit-indices is not a possibility for me

Re: [petsc-users] fortran INTENT with petsc object gives segfault after upgrade from 3.8.4 to 3.10.2

2018-10-19 Thread Smith, Barry F.
arch & Development > MARIN | T +31 317 49 33 44 | mailto:c.kl...@marin.nl | http://www.marin.nl > > MARIN news: > http://www.marin.nl/web/News/News-items/Seminar-Scheepsbrandstof-en-de-mondiale-zwavelnorm-2020.htm > > > From: Smith,

Re: [petsc-users] random SLEPc segfault using openmpi-3.0.1

2018-10-19 Thread Smith, Barry F.
> On Oct 19, 2018, at 2:08 PM, Moritz Cygorek wrote: > > Hi, > > I'm using SLEPc to diagonalize a huge sparse matrix and I've encountered > random segmentation faults. https://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind > > > I'm actually using a the slepc example 4 without m

Re: [petsc-users] p4est error

2018-10-20 Thread Smith, Barry F.
> On Oct 20, 2018, at 4:14 PM, Isaac, Tobin G wrote: > > I think adler32 is in zlib: p4est typically finds it in configure. Can you > send along config.log from externalpackages/git.p4est? Is there a way to pass the zlib information to ./configure? We should add that to p4est.py Reason:

Re: [petsc-users] fortran INTENT with petsc object gives segfault after upgrade from 3.8.4 to 3.10.2

2018-10-22 Thread Smith, Barry F.
pment > MARIN | T +31 317 49 33 44 | mailto:c.kl...@marin.nl | http://www.marin.nl > > MARIN news: > http://www.marin.nl/web/News/News-items/Seminar-Scheepsbrandstof-en-de-mondiale-zwavelnorm-2020.htm > > > From: Smith, Barry F. &g

Re: [petsc-users] Problems with fortran subroutine DMDAVecGetArrayF90

2018-10-26 Thread Smith, Barry F.
You are calling the routine incorrectly. Take a look at usage in src/dm/examples/tutorials/ex11f90.F90 Barry > On Oct 26, 2018, at 5:16 AM, SONG Pengyang wrote: > > Hi all, > I am trying to change a KSP tutorial code ex34.c to ex34f.F90. I found that > after I changed DMDAVecGetArray t

Re: [petsc-users] Problems with fortran subroutine DMDAVecGetArrayF90

2018-10-26 Thread Smith, Barry F.
g, China > TEL: (+86) 15762264643 > > -邮件原件- > 发件人: Smith, Barry F. > 发送时间: 2018年10月27日 9:02 > 收件人: SONG Pengyang > 抄送: petsc-users@mcs.anl.gov > 主题: Re: [petsc-users] Problems with fortran subroutine DMDAVecGetArrayF90 > > > You are calling the routi

Re: [petsc-users] "Could not find a suitable archiver. Use --with-arto specify an archiver"

2018-10-27 Thread Smith, Barry F.
> On Oct 27, 2018, at 9:45 AM, Balay, Satish wrote: > > On Fri, 26 Oct 2018, avatar wrote: > >> Thank Satish. I would like to call Matlab function in Pestc. For example, >> calculating the condition number of a petsc matrix. > > Hm - sounds like you need --with-matlab-engine. I'm not sure

Re: [petsc-users] [petsc-maint] How to impose boundary conditions using DMDA

2018-10-28 Thread Smith, Barry F.
Matt, How difficult would it be to impose such boundary conditions with DMPlex? Presumably you just connect the mesh up "properly" and it is straightforward? Barry > On Oct 27, 2018, at 10:23 AM, Matthew Knepley wrote: > > On Sat, Oct 27, 2018 at 2:02 AM Fengwen Wang wrote:

Re: [petsc-users] Convergence of AMG

2018-10-28 Thread Smith, Barry F.
> On Oct 28, 2018, at 12:16 PM, Manav Bhatia wrote: > > Hi, > >I am attempting to solve a Mindlin plate bending problem with AMG solver > in petsc. This test case is with a mesh of 300x300 elements and 543,606 dofs. > >The discretization includes 6 variables (u, v, w, tx, ty, tz),

Re: [petsc-users] Convergence of AMG

2018-10-29 Thread Smith, Barry F.
Exactly how much does it increase with number of levels? Send a chart number of levels and number of iterations. With say -mg_levels_ksp_maxit 4 Thanks Barry > On Oct 29, 2018, at 12:59 PM, Manav Bhatia wrote: > > Thanks for the clarification. > > I also observed that the number

Re: [petsc-users] how to set the matrix with the new cell ordering with metis

2019-11-24 Thread Smith, Barry F.
You can possibly use the PETSc object AO (see AOCreate()) to manage the reordering. The non-contiguous order you start with is the application ordering and the new contiguous ordering is the petsc ordering. Note you will likely need to reorder the cell vertex or edge numbers as well. Bar

Re: [petsc-users] Domain decomposition using DMPLEX

2019-11-25 Thread Smith, Barry F.
"No, I have an unstructured mesh that increases in resolution away from the center of the cuboid. See Figure: 5 in the ArXiv paper https://arxiv.org/pdf/1907.02604.pdf for a slice through the midplane of the cuboid. Given this type of mesh, will dmplex do a cuboidal domain decomposition?"

Re: [petsc-users] petsc without MPI

2019-11-25 Thread Smith, Barry F.
I agree this is confusing. https://gitlab.com/petsc/petsc/merge_requests/2331 the flag PETSC_HAVE_MPI will no longer be set when MPI is not used (only MPIUNI is used). Barry The code API still has MPI* in it with MPI but they are stubs that just handle the sequential code and do not r

Re: [petsc-users] Memory optimization

2019-11-26 Thread Smith, Barry F.
> I am basically trying to solve a finite element problem, which is why in 3D I > have 7 non-zero diagonals that are quite farm apart from one another. In 2D I > only have 5 non-zero diagonals that are less far apart. So is it normal that > the set up time is around 400 times greater in the 3D

Re: [petsc-users] Outputting matrix for viewing in matlab

2019-11-29 Thread Smith, Barry F.
> On Nov 28, 2019, at 7:07 PM, baikadi pranay wrote: > > Hello PETSc users, > > I have a sparse matrix built and I want to output the matrix for viewing in > matlab. However i'm having difficulty outputting the matrix. I am writing my > program in Fortran90 and I've included the following

Re: [petsc-users] Weird behaviour of PCGAMG in coupled poroelasticity

2019-11-29 Thread Smith, Barry F.
I would first run with -ksp_monitor_true_residual -ksp_converged_reason to make sure that those "very fast" cases are actually converging in those runs also use -ksp_view to see what the GMAG parameters are. Also use the -info option to have it print details on the solution process. Ba

Re: [petsc-users] (no subject)

2019-12-01 Thread Smith, Barry F.
How many colors is it requiring? And how long is the MatGetColoring() taking? Are you running in parallel? The MatGetColoring() MATCOLORINGSL uses a sequential coloring algorithm so if your matrix is large and parallel the coloring will take a long time. The parallel colorings are MATCOLO

Re: [petsc-users] (no subject)

2019-12-02 Thread Smith, Barry F.
378 > Number of rows 756 > 0 1188 > 1 1188 > 2 1188 > 3 1188 > 4 1188 > 5 1188 > ... > > Is this normal? > When using MCFD, is there any difference using mpiaij and mpibaij? > > Best, > Li > >

Re: [petsc-users] (no subject)

2019-12-02 Thread Smith, Barry F.
euse it forever. You can also try -snes_mf -snes_lag_jacobian -2 which should compute the Jacobian once, use that original one to build the preconditioner once and reuse the same preconditioner but use the matrix free to define the operator. Barry > > Regards, > Li >

Re: [petsc-users] MatView to disk for Elemental

2019-12-03 Thread Smith, Barry F.
sorry about this. The numerical values between C and Fortran got out of sync. I've attached a patch file you can apply with patch -p1 < format.patch or you can use the branch https://gitlab.com/petsc/petsc/merge_requests/2346 Barry > On Dec 3, 2019, at 1:10 AM, Marius Buerkle wrot

Re: [petsc-users] (no subject)

2019-12-03 Thread Smith, Barry F.
will the following time steps reuse the Jacobian built > at the first time step? > > Best, > Li > > > > On Tue, Dec 3, 2019 at 12:10 AM Smith, Barry F. wrote: > > > > On Dec 2, 2019, at 2:30 PM, Li Luo wrote: > > > > -snes_mf fails to converge

Re: [petsc-users] MatView to disk for Elemental

2019-12-04 Thread Smith, Barry F.
It still > outputs "Elemental matrix (explicit ordering)" to StdOut which is kinda > annoying, is there anyway to turn this off? > > > Von: "Smith, Barry F." > An: "Marius Buerkle" > Cc: "petsc-users@mcs.anl.gov" > Betreff: Re:

Re: [petsc-users] Could not find a CXX preprocessor on Catalina

2019-12-05 Thread Smith, Barry F.
Hmm, MPICH and OpenMPI have also passed this info in there compilers; perhaps this is a newer version clang that no longer tolerates these options I think we need to strip out those options as a guess > On Dec 4, 2019, at 2:18 PM, Balay, Satish wrote: > > Yes - this is a link time opti

Re: [petsc-users] Updating TS solution outside PETSc

2019-12-05 Thread Smith, Barry F.
Are you using cell-centered or vertex centered discretization ( makes a slight difference)? Our model is to use DM_BOUNDARY_MIRROR DMBoundaryType. This means that u_first_real_grid_point - u_its_ghost_point = 0 (since DMGlobalToLocal will automatically put into the physical ghost locat

Re: [petsc-users] dof of DMDA & DMPlex

2019-12-05 Thread Smith, Barry F.
Hmm, for DMDA and DMStag is should not have a limit (certain ranges of values are better optimized than others but more optimizations may be done). For DMPLEX in theory again it should be what ever you like (again larger values may require more optimization in our code to get really grea

Re: [petsc-users] Updating TS solution outside PETSc

2019-12-05 Thread Smith, Barry F.
set it to the value it would get if it wasn't an edge, then the > derivative isn't preserved anymore. > > This is where I get stuck. > > Ellen > > > On 12/5/19 10:16 AM, Smith, Barry F. wrote: >> >> Are you using cell-centered or vertex

Re: [petsc-users] petsc under cygwin

2019-12-05 Thread Smith, Barry F.
Can you actually build and run C++ programs with the MPI? Executing: mpicxx -o /tmp/petsc-Llvze6/config.setCompilers/conftest.exe -fopenmp -fPIC /tmp/petsc-Llvze6/config.setCompilers/conftest.o Possible ERROR while running linker: exit code 1 stderr: /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/

Re: [petsc-users] petsc under cygwin

2019-12-05 Thread Smith, Barry F.
an build and run C programs > with MPI. > > I have -with-log=0 because there is an overhead if many small objects > are created, which is my case. > > As for the fortran, I will remove --with-fortran=0 > > On 12/5/2019 11:53 PM, Smith, Barry F. wrote: >> Can you

Re: [petsc-users] CMake error in PETSc

2019-12-08 Thread Smith, Barry F.
There is something missing in the cmake process that is causing needed libraries not to be linked. Please email your program and your CMake stuff (files you use) so we can reproduce the problem and find a fix. Barry > On Dec 8, 2019, at 10:06 PM, Yingjie Wu wrote: > > Hi, > Thank

Re: [petsc-users] CMake error in PETSc

2019-12-09 Thread Smith, Barry F.
PETSC_ARCH to find the configuration file AND use the compilers from the configuration file. It works for me, please let me know if you have trouble. Barry > On Dec 8, 2019, at 10:38 PM, Yingjie Wu wrote: > > Thank you very much for your help. > My programs are as follow >

Re: [petsc-users] MatView to disk for Elemental

2019-12-10 Thread Smith, Barry F.
uerkle wrote: > > Hi, > > Is it actually possible to submit a pull (merge) request ? I followed the > petsc wiki but this didn't work. > > Best > Marius > > > Gesendet: Donnerstag, 05. Dezember 2019 um 07:45 Uhr > Von: "Marius Buerkle"

Re: [petsc-users] Bad Termination error in MatPartitioningApply with ParMETIS

2019-12-18 Thread Smith, Barry F.
Can you please send use the exact code and data file that causes the crash? And any options. There are bugs in Metis/Parmetis that we need to track down and eliminate since it is so central to PETSc's work flow. Barry > On Dec 18, 2019, at 4:21 AM, Eda Oktay wrote: > > Hi all, >

Re: [petsc-users] Strange Memory Increase in PCHYPRE BOOMERAMG

2019-12-18 Thread Smith, Barry F.
Thank you for the full and detailed report. The memory leak could be anywhere but my guess is it is in the interface between PETSc and Hyper. The first thing to check is if PETSc memory keeps increasing. The simplest way to do this is run your code 3 independent times with -malloc_debug

Re: [petsc-users] possible memory leak

2019-12-24 Thread Smith, Barry F.
There are no leaks but it appears what is happening is that rather than recycle the memory PETSc is returning to the system the system is generating new space as needed. Since the old PETSc pages are never used again this should be harmless. Barry > On Dec 24, 2019, at 9:47 AM, Marius

Re: [petsc-users] possible memory leak

2019-12-24 Thread Smith, Barry F.
h one (or which revision), I wil check it. > > > Gesendet: Mittwoch, 25. Dezember 2019 um 00:53 Uhr > Von: "Smith, Barry F." > An: "Marius Buerkle" > Cc: "Mark Adams" , "petsc-usersmcs.anl.gov" > > Betreff: Re: [petsc-users]

Re: [petsc-users] TS shallow reset

2020-01-07 Thread Smith, Barry F.
Do you reset the initial tilmestep? Otherwise the second solve thinks it is at the end. Also you may need to reset the iteration number Something like ierr = TSSetTime(appctx->ts, 0);CHKERRQ(ierr); ierr = TSSetStepNumber(appctx->ts, 0);CHKERRQ(ierr); ierr = TSSetTimeStep(appctx->ts,

Re: [petsc-users] [petsc-maint] (no subject)

2020-01-07 Thread Smith, Barry F.
> On Jan 7, 2020, at 8:59 AM, Mark Adams wrote: > > I’m not sure what the compilers, and C++ are doing here > > On Tue, Jan 7, 2020 at 9:17 AM Кудров Илья wrote: > However, after configuring > > cout<<1. + 1.*PETSC_i< > outputs (1, 0) instead of (1, 1). Where after configure? PETSC_

Re: [petsc-users] Problems applying multigrid

2020-01-08 Thread Smith, Barry F.
Yeah, this is an annoying feature of DMDA and PCMG in PETSc. Some coarse grid ranges and particular parallel layouts won't work with geometric multigrid. You are using 314 on the coarse and 628 on the fine grid. Try changing the them by 1 and start with one process. Barry > On Jan 8

Re: [petsc-users] Matload with given parallel layout

2017-10-25 Thread Smith, Barry F.
> On Oct 25, 2017, at 11:59 AM, Karin&NiKo wrote: > > Barry, Matt, > Thank you very much for that clarification. My question is mainly motivated > by the will to transfer test matrices from an industrial software to a more > light and agile PETSc code, in order to run numerical experiments. Si

Re: [petsc-users] petsc4py

2017-10-25 Thread Smith, Barry F.
Since the matrix changes size you will need to create a new matrix, fill it up, solve with it, destroy it for each time-step. No big deal. > On Oct 25, 2017, at 1:52 PM, Cetinbas, Cankur Firat wrote: > > Hi, > > We have a code in python to solve for 3D water transport in a nano scale

Re: [petsc-users] DIVERGED_DTOL with SNES after switching to 3.8

2017-10-28 Thread Smith, Barry F.
Run with something like -snes_divergence_tolerance 1e20 Barry > On Oct 28, 2017, at 9:31 AM, David Knezevic > wrote: > > Hi all, > > I updated to the head of the maint branch (b5b0337). Previously (with version > 3.7), I had a SNES test case that converged like this: > > NL s

Re: [petsc-users] setting ghost padding region

2017-10-29 Thread Smith, Barry F.
> On Oct 29, 2017, at 5:20 PM, Guido Giuntoli wrote: > > I have a ghost vector "b" and I want to work with my local representation > adding values in my local part and my ghost padding region. Is this possible > or I have to use VecSetValues ? What do you really want to do? put values in

Re: [petsc-users] preconditioning matrix-free newton-krylov

2017-10-30 Thread Smith, Barry F.
> On Oct 29, 2017, at 11:50 AM, Mark Lohry wrote: > > Thanks again Barry, I've got the preconditioners hooked up with > -snes_mf_operator and at least AMG looks to be working great on a high order > unstructured DG problem. > > Couple questions on the SNESSetLagJacobian + SNESSetLagPreconditi

Re: [petsc-users] Poisson problem with boundaries inside the domain

2017-10-30 Thread Smith, Barry F.
If you using DMDA then you can't just "remove" some grid points from the vector. What you need to do is for your function evaluation at these interior grid points do f[j][i] = u[j][i] - ub in the FormFunction (ub is the Dirichlet value) and put a 1 one the diagonal of that row of the Jac

Re: [petsc-users] Updating Fortran code to petsc 3.8

2017-10-30 Thread Smith, Barry F.
Please clarify. 1) You can successfully update to 3.8 and compile and run the code? 2) You do not have a way to support both 3.7 and 3.8 except by putting a large number of #ifdef in the code? Yes, 3.8 is a dramatic shift in API (to one we feel is much better), it is not simple to write

Re: [petsc-users] preconditioning matrix-free newton-krylov

2017-10-30 Thread Smith, Barry F.
the info on the lag logic, I'll play with the TS pre/post calls > for the time-accurate problems and only use LagJacobian. > > On Mon, Oct 30, 2017 at 11:29 AM, Smith, Barry F. wrote: > > > On Oct 29, 2017, at 11:50 AM, Mark Lohry wrote: > > > > Thanks again Bar

Re: [petsc-users] preconditioning matrix-free newton-krylov

2017-10-30 Thread Smith, Barry F.
called binaryoutput and we can run the coloring codes local to performance debug. Barry > > On Mon, Oct 30, 2017 at 1:55 PM, Smith, Barry F. wrote: > > > On Oct 30, 2017, at 12:39 PM, Mark Lohry wrote: > > > > > > > > > > 3) Are there any h

Re: [petsc-users] preconditioning matrix-free newton-krylov

2017-10-30 Thread Smith, Barry F.
debug. > > > Will send this evening. Thanks but send for the AIJ case, not BAIJ > > > On Mon, Oct 30, 2017 at 3:02 PM, Smith, Barry F. wrote: > > > On Oct 30, 2017, at 1:58 PM, Mark Lohry wrote: > > > > Hmm, metis doesn't really have anything to

Re: [petsc-users] petsc4py sparse matrix construction time

2017-10-31 Thread Smith, Barry F.
You also need to make sure that most matrix entries are generated on the process that they will belong on. Barry > On Oct 30, 2017, at 8:01 PM, Matthew Knepley wrote: > > On Mon, Oct 30, 2017 at 8:06 PM, Cetinbas, Cankur Firat > wrote: > Hello, > > > > I am a beginner both in PETSc

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

2017-10-31 Thread Smith, Barry F.
> On Oct 30, 2017, at 9:32 PM, zakaryah . wrote: > > You were right, of course. I fixed the problem with the function evaluation > and the code seems to be working now, at least on small test problems. > > Is there a way to setup preallocation of the Jacobian matrix, with the entire > first

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

2017-10-31 Thread Smith, Barry F.
> On Oct 31, 2017, at 10:26 AM, zakaryah . wrote: > > OK Barry, I'll have a look - thanks. Should I use DMShellSetCreateMatrix to > set the routine I write for matrix allocation? What do you do now and how do you create/set the matrix? Are you creating one big old matrix that has all rows

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

2017-10-31 Thread Smith, Barry F.
> On Oct 31, 2017, at 11:59 AM, zakaryah . wrote: > > First I set up the composite DM, which contains one redundant field coupled > to everything else, and a DMDA, which of course only has local couplings > given by the stencil. I then create the matrix with DMCreateMatrix, with the > compo

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

2017-10-31 Thread Smith, Barry F.
Looks like you need to first call DMCompositeSetCoupling() > On Oct 31, 2017, at 11:59 AM, zakaryah . wrote: > > First I set up the composite DM, which contains one redundant field coupled > to everything else, and a DMDA, which of course only has local couplings > given by the stencil. I

Re: [petsc-users] configuration error

2017-10-31 Thread Smith, Barry F.
Manav, Thanks for reporting the problem Fande, Thanks for the pointer. Satish determined the correct long term fix and it is in the branch barry/fix-lto_library-option-maint and will be put in the maint branch and master branch if it passes the testing tonight. Barry >

Re: [petsc-users] Problem with encapsulation of PETSc/SLEPc in Fortran

2017-11-02 Thread Smith, Barry F.
> On Nov 1, 2017, at 10:23 AM, Thibaut Appel wrote: > > Dear PETSc/SLEPc users, > > I am encountering a problem when I try to isolate my calls to PETSc/SLEPc > routines in a module. When I have a single file everything works fine, but > when I have, say: > - modA.f90 (Independant modules) >

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

2017-11-02 Thread Smith, Barry F.
> On Nov 1, 2017, at 10:32 PM, zakaryah . wrote: > > I worked on the assumptions in my previous email and I at least partially > implemented the function to assign the couplings. For row 0, which is the > redundant field, I set dnz[0] to end-start, and onz[0] to the size of the > matrix min

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

2017-11-02 Thread Smith, Barry F.
l to the processor, i.e. > should my iterations go from 0 to nrows-1? What is the general idea behind > setting the structure from within FormCoupleLocations? I'm currently not > doing that at all. > > Thanks for all the help! > > On Thu, Nov 2, 2017 at 12:31 PM, Smith, Barry

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

2017-11-03 Thread Smith, Barry F.
> On Nov 3, 2017, at 10:59 AM, zakaryah . wrote: > > Hi - I think I managed to get this to work. The second call to > FormCoupleLocations is actually pretty simple - it just has to set the matrix > values! One thing that was hard to figure out was why line 168 calls > MatGetOwnershipRange

Re: [petsc-users] SNES update solution vector

2017-11-03 Thread Smith, Barry F.
You should not need to "tamper" with the solution process to achieve this. I would just change how my FormFunction and FormJacobian behave to implement the different boundary conditions. Why would that not work? Barry > On Nov 3, 2017, at 4:39 PM, Bikash Kanungo wrote: > > Hi Matt, >

Re: [petsc-users] SNES update solution vector

2017-11-05 Thread Smith, Barry F.
o add this option to the implementation and make a pull request). Barry > > Thanks, > Bikash > > > > On Fri, Nov 3, 2017 at 6:20 PM, Smith, Barry F. wrote: > > > You should not need to "tamper" with the solution process to achieve this. > >

Re: [petsc-users] petsc with fortran modules

2017-11-05 Thread Smith, Barry F.
> On Nov 3, 2017, at 5:41 PM, Satish Balay wrote: > > On Fri, 3 Nov 2017, Ed D'Azevedo wrote: > >> Dear PETSc expert, >> >> I have a question on the correct way to use Fortran module in petsc. >> >> In this url on "UsingFortran" >> >> >> http://www.mcs.anl.gov/petsc/petsc-current/docs/man

Re: [petsc-users] Newton LS - better results on single processor

2017-11-09 Thread Smith, Barry F.
> On Nov 9, 2017, at 3:33 PM, zakaryah . wrote: > > Hi Stefano - when I referred to the iterations, I was trying to point out > that my method solves a series of nonlinear systems, with the solution to the > first problem being used to initialize the state vector for the second > problem, et

Re: [petsc-users] Coloring of a finite volume unstructured mesh

2017-11-09 Thread Smith, Barry F.
To use the PETSc coloring based Jacobian computer (which uses finite differences) you absolutely have to be able to provide the nonzero structure of the Jacobian. Now once you provide the nonzero structure of the Jacobian the PETSc MatColoring routines can actually compute the coloring f

Re: [petsc-users] Help with PETSc signal handling

2017-11-09 Thread Smith, Barry F.
> On Nov 7, 2017, at 6:47 AM, Gard Spreemann wrote: > > On Tuesday 7 November 2017 07:35:36 CET Mark Adams wrote: >> PETSc's signal handler is for segvs, etc. I don't know the details but I >> don't think we care about external signals. > > I see. I'll sketch what I'm trying to achieve in case

Re: [petsc-users] Newton methods that converge all the time

2017-11-09 Thread Smith, Barry F.
Henrik, Please describe in some detail how you are handling phase change. If you have if () tests of any sort in your FormFunction() or FormJacobian() this can kill Newton's method. If you are using "variable switching" this WILL kill Newtons' method. Are you monkeying with phase definiti

Re: [petsc-users] Newton LS - better results on single processor

2017-11-11 Thread Smith, Barry F.
e that all of this has something to do with the spectrums of the > matrices involved in the solve but I don't know enough to improve the results > I'm obtaining. > > On Thu, Nov 9, 2017 at 11:09 PM, Smith, Barry F. wrote: > > > > On Nov 9, 2017, at 3:33 PM,

Re: [petsc-users] Coloring of a finite volume unstructured mesh

2017-11-13 Thread Smith, Barry F.
nonzero entries in the Jacobian due to the stencil. > If not I would really appreciate an example illustrating how I should do it. > > Thanks in advance!! > > Javier > > > > On Friday, November 10, 2017 05:09 CET, "Smith, Barry F." > wrote: > &g

Re: [petsc-users] Lapack with Quadruple Precision in PETSc and SLEPc

2017-11-13 Thread Smith, Barry F.
Tobias, When you use PETSc in quad precision you need to ./configure with --download-f2cblaslapack this uses a version of BLAS/LAPACK obtained by running f2c on the reference version of BLAS/LAPACK (that is, fortran code from netlib) and then massages the source code for quad precision.

Re: [petsc-users] questions about vectorization

2017-11-14 Thread Smith, Barry F.
Use MKL versions of block formats? > On Nov 14, 2017, at 4:40 PM, Richard Tran Mills wrote: > > 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

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

2017-11-15 Thread Smith, Barry F.
> 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 settings has considerably worse convergence. I've tried > using -pc_

Re: [petsc-users] superlu_dist produces random results

2017-11-15 Thread Smith, Barry F.
Meaningless differences > On Nov 15, 2017, at 2:26 PM, Kong, Fande wrote: > > Hi, > > There is a heat conduction problem. When superlu_dist is used as a > preconditioner, we have random results from different runs. Is there a random > algorithm in superlu_dist? If we use ASM or MUMPS as t

Re: [petsc-users] superlu_dist produces random results

2017-11-15 Thread Smith, Barry F.
n() is always positive. > > > Fande, > > > > > On Wed, Nov 15, 2017 at 1:59 PM, Smith, Barry F. wrote: > > Meaningless differences > > > > On Nov 15, 2017, at 2:26 PM, Kong, Fande wrote: > > > > Hi, > > > > There is a

Re: [petsc-users] superlu_dist produces random results

2017-11-15 Thread Smith, Barry F.
t 4:24 PM, Kong, Fande wrote: > > > > On Wed, Nov 15, 2017 at 2:52 PM, Smith, Barry F. wrote: > > > > On Nov 15, 2017, at 3:36 PM, Kong, Fande wrote: > > > > Hi Barry, > > > > Thanks for your reply. I was wondering why this happens only when we u

Re: [petsc-users] superlu_dist produces random results

2017-11-15 Thread Smith, Barry F.
> > On Wed, Nov 15, 2017 at 3:35 PM, Smith, Barry F. wrote: > > Since the convergence labeled linear does not converge to 14 digits in one > iteration I am assuming you are using lagged preconditioning and or lagged > Jacobian? > > We are using Jacobian-free Newton.

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

2017-11-15 Thread Smith, Barry F.
> On Nov 15, 2017, at 9:40 PM, Jed Brown wrote: > > "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 >>

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

2017-11-15 Thread Smith, Barry F.
nst ILU generally speaking. Barry > > On Nov 15, 2017 10:50 PM, "Smith, Barry F." wrote: > > > > On Nov 15, 2017, at 9:40 PM, Jed Brown wrote: > > > > "Smith, Barry F." writes: > > > >>> On Nov 15, 2017, at 6:38 AM, Mark

Re: [petsc-users] Compilation error with ifort: invalid return statement in main

2017-11-19 Thread Smith, Barry F.
In some of the Fortran examples we have code like call PetscInitialize(PETSC_NULL_CHARACTER,ierr) if (ierr .ne. 0) then print*,'Unable to initialize PETSc' stop endif Eventually we should update all the examples with this, or something even better

Re: [petsc-users] TAO: Finite Difference vs Continuous Adjoint gradient issues

2017-11-22 Thread Smith, Barry F.
> On Nov 22, 2017, at 3:48 AM, Julian Andrej wrote: > > Hello, > > we prepared a small example which computes the gradient via the continuous > adjoint method of a heating problem with a cost functional. Julian, The first thing to note is that the continuous adjoint is not exactly t

Re: [petsc-users] How can I retrieve the IS for all Missing Diagonal entries?

2017-11-22 Thread Smith, Barry F.
> On Nov 22, 2017, at 10:13 AM, Eric Chamberland > wrote: > > Hi, > > I have 2 questions: > > First, I am looking for a function that is almost like MatMissingDiagonal, > but that would return me *all* missing diagonal entries. > > Does it exists? I'm afraid not. > > If not, is there

Re: [petsc-users] MatZeroRowsColumns

2017-11-23 Thread Smith, Barry F.
MatZeroRowsColumns() as two vector arguments you are missing > On Nov 23, 2017, at 2:43 PM, Samuel Lanthaler wrote: > > Hi there, > I'm new to PETSc and have been trying to do some basic manipulation of > matrices in fortran, but don't seem to be able to set a row/column to zero > using the

Re: [petsc-users] crash with PCASM in parallel

2017-11-24 Thread Smith, Barry F.
First run under valgrind. https://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind If that doesn't help send the exact output from the debugger (cut and paste) and the exact version of PETSc you are using. Also out put from -ksp_view_pre Barry > On Nov 24, 2017, at 8:03 AM, Dani

Re: [petsc-users] preallocation after DMCreateMatrix?

2017-11-24 Thread Smith, Barry F.
> On Nov 24, 2017, at 1:21 PM, Matteo Semplice wrote: > > Hi. > > The manual for DMCreateMatrix says "Notes: This properly preallocates the > number of nonzeros in the sparse matrix so you do not need to do it > yourself", so I got the impression that one does not need to call the > preallo

Re: [petsc-users] crash with PCASM in parallel

2017-11-25 Thread Smith, Barry F.
smoothers. > HYPRE BoomerAMG: Measure typelocal > HYPRE BoomerAMG: Coarsen type Falgout > HYPRE BoomerAMG: Interpolation type classical > linear system matrix = precond matrix: > Mat Object: 24 MPI processes > type: mpiaij > rows=1122000, cols=

Re: [petsc-users] storing many petsc objects in a single file

2017-11-26 Thread Smith, Barry F.
Storm, Specifically for TS there is an abstract object called TSTrajectory which is a way to store histories of simulations (it is used by TSAdjoint but also useable for other purposes). It has several ways to store histories and more can be added. One draw back to saving everything i

Re: [petsc-users] Petcs preconditioners

2017-11-27 Thread Smith, Barry F.
> On Nov 27, 2017, at 5:01 AM, Stefano Zampini > wrote: > > > > > - I'm dealing with matrices that change the value of the coeffs in time, but > maintain the same zero pattern. Is it possible to create a ksp (linear solver > + preconditioner) object before the time loop and pass it to th

Re: [petsc-users] complex values in a bvp

2017-12-04 Thread Smith, Barry F.
You have headed down the wrong track. You must ./configure PETSc with the option --with-scalar-type=complex to work with complex numbers and should declare the variables with PetscScalar just like in the example. Barry > On Dec 4, 2017, at 3:26 PM, Swenson, Jennifer wrote: > > De

Re: [petsc-users] Incomplete Cholesky Factorization in petsc

2017-12-04 Thread Smith, Barry F.
I'm not sure what your goal is. In general two different IC(0) codes might produce slightly different factorizations based on implementation details even if they claim to run the same algorithm so I don't think there is a reason to try to compare the factors they produce. In addition PETSc

Re: [petsc-users] Incomplete Cholesky Factorization in petsc

2017-12-05 Thread Smith, Barry F.
in a format callable from R. Barry > Not sure if I used the easiest way to get IC so I also seek for help on > getting a concise version of IC(). > > -Wendy > > > On Mon, Dec 4, 2017 at 10:07 PM, Smith, Barry F. wrote: > > I'm not sure what you

Re: [petsc-users] Incomplete Cholesky Factorization in petsc

2017-12-05 Thread Smith, Barry F.
s R not have a ICC(0)? ICC(0) with the natural ordering is actually > very simple to write. You could easily write it presumably directly in R or > in C in a format callable from R. > >Barry > > > > > Not sure if I used the easiest way to get IC so I also seek for

Re: [petsc-users] MatZeroRows question

2017-12-06 Thread Smith, Barry F.
They call the function and provide zero rows > On Dec 6, 2017, at 10:52 AM, Felipe Giacomelli wrote: > > Hello, > According to PETSc documentation, all processes that share the matrix MUST > call this routine for the parallel case. However, it is possible that, after > the domain decomposi

Re: [petsc-users] Matrix-free vs finite differenced Jacobian approximation

2017-12-12 Thread Smith, Barry F.
> On Dec 12, 2017, at 9:54 AM, Alexander Lindsay > wrote: > > I'm working with a relatively new set of physics (new to me) and the > Jacobians are bad. While debugging the Jacobians, I've been running with > different finite difference approximations. I've found in general that > matrix-

Re: [petsc-users] HYPRE BOOMERAMG no output

2017-12-12 Thread Smith, Barry F.
> On Dec 12, 2017, at 12:04 PM, Hao Zhang wrote: > > hi, > > before I introduce HYPRE with BOOMERAMG to my CFD code, I will have output > with good convergence rate. with BOOMERAMG, the same code will take longer > time to run and there's a good chance that no output will be produced > what

Re: [petsc-users] Matrix-free vs finite differenced Jacobian approximation

2017-12-12 Thread Smith, Barry F.
> On Dec 12, 2017, at 11:26 AM, Alexander Lindsay > wrote: > > Ok, I'm going to go back on my original statement...the physics being run > here is a sub-set of a much larger set of physics; for the current set the > hand-coded Jacobian actually appears to be quite good. > > With hand-coded

Re: [petsc-users] Matrix-free vs finite differenced Jacobian approximation

2017-12-12 Thread Smith, Barry F.
> On Dec 12, 2017, at 1:48 PM, Alexander Lindsay > wrote: > > On Tue, Dec 12, 2017 at 10:39 AM, Matthew Knepley wrote: > On Tue, Dec 12, 2017 at 12:26 PM, Alexander Lindsay > wrote: > Ok, I'm going to go back on my original statement...the physics being run > here is a sub-set of a much la

Re: [petsc-users] Matrix-free vs finite differenced Jacobian approximation

2017-12-12 Thread Smith, Barry F.
; 0 Nonlinear |R| = 2.259203e-02 > 0 Linear |R| = 2.259203e-02 > 1 Linear |R| = 1.312921e-06 > 2 Linear |R| = 7.714018e-09 > 1 Nonlinear |R| = 4.780690e-03 > 0 Linear |R| = 4.780690e-03 > 1 Linear |R| = 7.773053e-09 > 2 Nonlinear |R| = 1.22683

Re: [petsc-users] Function to convert a dense matrix holding the cell connectivity to a MPIADJ for use with MatMeshToCellGraph

2017-12-12 Thread Smith, Barry F.
Can you send a code that reproduces the crash so I can debug it? Barry > On Dec 12, 2017, at 2:44 PM, Jordan Wagner wrote: > > Hi, > > I am trying to use the function MatMeshToCellGraph. I currently have a matrix > that holds the cell connectivity of simplex elements. So it is a numCel

Re: [petsc-users] MatCreateShell, MatShellGetContext, MatShellSetContext in fortran

2017-12-12 Thread Smith, Barry F.
Samuel, I have attached a fixed up version of your example that works correctly. Your basic problem was that you did not "use" the final module in the main program so it did know the interfaces for the routines. I have included this example in PETSc for others to benefit from in the br

  1   2   3   4   5   6   7   8   9   10   >