Re: [petsc-users] Nonlinear solver for non-smooth jacobian

2014-10-20 Thread Jed Brown
Que Cat quecat...@gmail.com writes: Hello Petsc-users, I have to solve a problem in which the jacobian is non-smooth ( incoporates the heaviside step function behavior from the derivative of F(x) ). Could you recommend any type of nonlinear solver in Petsc which handles this issue ? You

Re: [petsc-users] Adaptive controllers in TS

2014-10-20 Thread Jed Brown
Miguel Angel Salazar de Troya salazardetr...@gmail.com writes: Thanks for your response I'm struggling with this problem because the literature is not clear for me on how to calculate the discrete adjoint with adaptive time stepping algorithms. They cover the details when automatic

Re: [petsc-users] Adaptive controllers in TS

2014-10-19 Thread Jed Brown
Miguel Angel Salazar de Troya salazardetr...@gmail.com writes: Hi all I'm trying to find out what is the adaptive controller scheme used in the Runge-Kutta time stepping algorithm. Basically I want to know the function that determines the next time step. I see that the next time step is set

Re: [petsc-users] PCBDDC - PCBDDCSetPrimalVerticesLocalIS

2014-10-15 Thread Jed Brown
De Groof, Vincent Frans Maria vincent.de-gr...@uibk.ac.at writes: I want to add a few primal vertices to the bddc preconditioner. But when checking the coarse space (using pc_bddc_check_level 1), nothing changes. Is there some special sequence that needs to be followed to add vertices?

Re: [petsc-users] Crow Instability

2014-10-13 Thread Jed Brown
Krishnappa, Sanjay krish...@my.erau.edu writes: I am looking for simulating crow instability using PETSc. I am very new to PETSc and I would like to know if there is any work/ Code that already exist relating to crow instability. Thanks in advance. PETSc is an

Re: [petsc-users] How to parallelize a linear system solver A*x=q in a scalar code

2014-10-13 Thread Jed Brown
Valerio Grazioso grazio...@libero.it writes: Dear All, I have to parallelize an old fortran77-fortran90 cfd scalar By scalar, do you mean serial? code. Before starting from scratch, I decided to parallelize “just” the pressure solver (for instance a linear system solver A*x=q). Because of

Re: [petsc-users] Is there a bug in VecRestoreSubVector?

2014-10-09 Thread Jed Brown
be able to try the patch sooner than I. Patrick, would you give it a try please? Thanks, Eric On 10/09/2014 11:41 AM, Jed Brown wrote: Hi, Eric. Fabian reported this a couple days ago (all, petsc-users is preferred so that people can see recent discussion). Thanks for linking to Patrick's

Re: [petsc-users] PCMG behaviour on various levels

2014-10-08 Thread Jed Brown
Filippo Leonardi filippo.leona...@sam.math.ethz.ch writes: Hi, Quick PCMG question. Default behaviour of PCMG (I'm using 3D DMDAs) is to use all processes for every level and redundantly solve the coarse level locally (to my knowledge). However, if I want to keep the level numbers to be

Re: [petsc-users] When is the TSMonitor called?

2014-10-08 Thread Jed Brown
Miguel Angel Salazar de Troya salazardetr...@gmail.com writes: Hi all I want to save a certain quantity at the very beginning of each time step, before any TSFunction of any kind is called. Can I do this within the TSMonitor? It would also be ok to save that quantity at the very end of the

Re: [petsc-users] 3D multi-dof DMDA and Poisson equation

2014-10-08 Thread Jed Brown
Håkon Strandenes haa...@hakostra.net writes: Hi, I am making a new, simple incompressible CFD code. I have created a grid as a 3D DMDA, with ndof=4, one dof for each velocity component (u,v,w) and one for the pressure (p). Currently I am creating a forward Euler step, where the

Re: [petsc-users] Error when trying to write solution to a file

2014-10-07 Thread Jed Brown
Miguel Angel Salazar de Troya salazardetr...@gmail.com writes: Hi all I'm solving a discretized PDE with TS. Inside my MonitorFunction(), hooked up with TSMonitorSet(), I process the solution at each time step to write another PETSc Vec. Then, I write this Vec to a matlab binary file. The

Re: [petsc-users] Penalization vs. setting interior points for Laplace eqn

2014-10-04 Thread Jed Brown
Barry Smith bsm...@mcs.anl.gov writes: I think you can just set the values there. The advantage is simplicity plus it won’t mess up the convergence of the iterative methods as a penalization likely would. Write the trivial equations for those rows (u = what_you_want) and have all the

Re: [petsc-users] [petsc-dev] petsc git next branch *is* unwound!

2014-10-02 Thread Jed Brown
Barry Smith bsm...@mcs.anl.gov writes: Why does it say Already up-to-date.” ? It’s like those things are already in next? Why isn’t it putting a bunch of stuff into next? Confusing Barry ~/Src/petsc next $ git checkout master Switched to branch 'master' Your branch is behind

Re: [petsc-users] [petsc-dev] petsc git next branch *is* unwound!

2014-10-02 Thread Jed Brown
Satish Balay ba...@mcs.anl.gov writes: balay@asterix /home/balay/petsc (master=) $ git co next Switched to branch 'next' Your branch is behind 'origin/next' by 1963 commits, and can be fast-forwarded. (use git pull to update your local branch) balay@asterix /home/balay/petsc (next)

Re: [petsc-users] [petsc-dev] petsc git next branch *is* unwound!

2014-10-02 Thread Jed Brown
Barry Smith bsm...@mcs.anl.gov writes: Too late. I likely screwed up the new next. fixed now pgpsXZEwehBKs.pgp Description: PGP signature

Re: [petsc-users] [petsc-dev] petsc git next branch *is* unwound!

2014-10-02 Thread Jed Brown
Barry Smith bsm...@mcs.anl.gov writes: So should I redo the process Satish said or is my current next ok? (Seems hard to believe) Redo it. And set pull.ff=only. pgpyWEgITtJRP.pgp Description: PGP signature

Re: [petsc-users] [petsc-dev] petsc git next branch *is* unwound!

2014-10-02 Thread Jed Brown
Barry Smith bsm...@mcs.anl.gov writes: Done, but note in my previous email with a full cut and paste of what I did I never got any messages about misbehavior The following looks to me like jumbled output. | ~/Src/petsc next $ git pull | From bitbucket.org:petsc/petsc | +

Re: [petsc-users] Save matrix to binary file on sub directory

2014-10-02 Thread Jed Brown
Robert Rezk robertr...@yahoo.ca writes: I am using the pets viewer and I want to save binary file to sub directory. I tried to save file to the current directory and it work fine. when I try to use file name like this ./xyz_dir/file_name it doesn't work. What symptoms do you see? Can you

Re: [petsc-users] How to use

2014-10-02 Thread Jed Brown
Sharp Stone thron...@gmail.com writes: Matt, Thank you very much! The ex19 used the Gauss-Seidel method. But I'm a little bit wonder whether we have any examples of Jacobi method to solve such linear systems (mat)A dot (vec)X = (vec)B with dof1? Thanks in advance! ex19 does whatever you

Re: [petsc-users] More stable solver

2014-10-02 Thread Jed Brown
paul zhang paulhuaizh...@gmail.com writes: Hello, I am modelling a hypersonic computational fluid dynamic problem, where the matrix A is quite sparse and stiff. The solution is x=[rho_1, rho_2, .., rho_11, u, v, w, T], where rho_s is the density for each of the species, some of which can

Re: [petsc-users] How to use

2014-10-02 Thread Jed Brown
Sharp Stone thron...@gmail.com writes: Hi all, I'm sorry I'm still confusing that if I have calculated the Jacobian elements, how can I go ahead to solve the linear system with dof1 at each node? The example code ex19 solves the linear system with Guass-Seidel method, As we just said, the

Re: [petsc-users] How to use

2014-10-02 Thread Jed Brown
Sharp Stone thron...@gmail.com writes: Hi all, In the ex19, specifically from Lines 581-587, about the invert the system part, 581: /* invert the system:582: [ dfu / du 000][yu] = [fu]583: [ 0dfv / dv 00

Re: [petsc-users] [petsc-dev] petsc git next branch *is* unwound!

2014-10-02 Thread Jed Brown
Nystrom, William David w...@lanl.gov writes: What is meant by the phrase petsc git next branch is unwound? What git commands are run to do this? And how is the next branch different when it is unwound from immediately before it is unwound? git checkout next git reset --hard master #

Re: [petsc-users] [petsc-dev] petsc git next branch *is* unwound!

2014-10-02 Thread Jed Brown
Satish Balay ba...@mcs.anl.gov writes: You would have to delete both 'next' and 'wdn_mods_next' branches from all your clones - and recreate them. Do your normal git remote update (or git fetch) in your master clone (confusing to use the same name to refer to a repository and a branch). I'll

Re: [petsc-users] Scaling/Preconditioners for Poisson equation

2014-10-01 Thread Jed Brown
Filippo Leonardi filippo.leona...@sam.math.ethz.ch writes: I am actually having hard time figuring out where I am spending my time. Reading the report I am spending time on KSPSolve and PCApply (e+02). Since the number of those operations is well under control. I guess is some

Re: [petsc-users] Default solver type for ksp?

2014-10-01 Thread Jed Brown
Saurabh Chawdhary chaw0...@umn.edu writes: I understand that we can chose on of many solvers from KSPType form here http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/KSP/KSPType.html. But if do not set any option to the type which one does it chose by default? GMRES I could

Re: [petsc-users] Allocating memory for off-diagonal matrix blocks when using DMComposite

2014-09-30 Thread Jed Brown
Gautam Bisht gbi...@lbl.gov writes: Hi, The comment on line 419 of SNES ex 28.c http://www.mcs.anl.gov/petsc/petsc-current/src/snes/examples/tutorials/ex28.c.html says that the approach used in this example is not the best way to allocate off-diagonal blocks. Is there an example that shows

Re: [petsc-users] Scaling/Preconditioners for Poisson equation

2014-09-29 Thread Jed Brown
Filippo Leonardi filippo.leona...@sam.math.ethz.ch writes: Thank you. Actually I had the feeling that it wasn't my problem with Bjacobi and CG. So I'll stick to MG. Problem with MG is that there are a lot of parameters to be tuned, so I leave the defaults (expect I select CG as Krylow

Re: [petsc-users] Scaling/Preconditioners for Poisson equation

2014-09-29 Thread Jed Brown
Matthew Knepley knep...@gmail.com writes: Matrix free you mean AMG (like -pc_mg_galerkin)? Does it reach the same scalability as GMG? No, Jed means calculating the action of the operator matrix-free instead of using an assembled sparse matrix. Yeah, that was a diversion; don't worry about

Re: [petsc-users] Best way to save entire solution history of a TS

2014-09-28 Thread Jed Brown
Miguel Angel Salazar de Troya salazardetr...@gmail.com writes: Hello I'm performing an adjoint sensitivity analysis in a transient problem and I need to save the entire solution history. I don't have many degrees of freedom or time steps so I should be able to avoid memory problems. I've

Re: [petsc-users] DMPlex with spring elements

2014-09-25 Thread Jed Brown
Matthew Knepley knep...@gmail.com writes: On Thu, Sep 25, 2014 at 1:46 PM, Abhyankar, Shrirang G. abhy...@mcs.anl.gov wrote: You are right. The Jacobian for the power grid application is indeed non-symmetric. Is that a problem for your application? If you need a symmetric Jacobian, you

Re: [petsc-users] How to set L1 norm as the converge test?

2014-09-24 Thread Jed Brown
Matthew Knepley knep...@gmail.com writes: On Wed, Sep 24, 2014 at 2:31 PM, Barry Smith bsm...@mcs.anl.gov wrote: Brian, Your convergence test routine could call KSPBuildResidual() and then compute the 1-norm of the residual and make any decision it likes based on that norm. See

Re: [petsc-users] Memory requirements in SUPERLU_DIST

2014-09-23 Thread Jed Brown
Zin Lin zinlin.zin...@gmail.com writes: What I don't understand is why memory per core matters rather than the total memory? If the work space is distributed across the processors, shouldn't it work as long as I choose a sufficient number of smaller-memory cores? METIS is a serial

Re: [petsc-users] Natural norm

2014-09-22 Thread Jed Brown
Barry Smith bsm...@mcs.anl.gov writes: On Sep 21, 2014, at 12:35 PM, De Groof, Vincent Frans Maria vincent.de-gr...@uibk.ac.at wrote: the natural norm for positive definite systems in Petsc uses the preconditioner B, and is defined by r' * B * r. Am I right assuming that this way we want

Re: [petsc-users] Laplacian at infinity

2014-09-22 Thread Jed Brown
Matthew Knepley knep...@gmail.com writes: On Mon, Sep 22, 2014 at 7:36 AM, John Alletto 4bikerboyj...@gmail.com wrote: All, I am try to match some EM problems with analytical solutions. How do I deal with infinity when using a uniform grid ? It depends on your problem. Keep making it

Re: [petsc-users] Natural norm

2014-09-22 Thread Jed Brown
Barry Smith bsm...@mcs.anl.gov writes: All true. Switching the CG “norm” does not effect the algorithm (in exact arithmetic) it only affects the norm that is printed and when the algorithm stops. The same minimization principles hold independent of the “norm” used. Yup, and the

Re: [petsc-users] GPU speedup in Poisson solvers

2014-09-22 Thread Jed Brown
Dominic Meiser dmei...@txcorp.com writes: - To get reliable timing you should configure PETSc without debugging (i.e. --with-debugging=no) - The ILU preconditioning in your GPU benchmark is done on the CPU. The host-device data transfers are killing performance. Can you try to run with the

Re: [petsc-users] Are there a set of general rules for picking preconditioners and solvers when solving a 3D Laplace's equation?

2014-09-22 Thread Jed Brown
Alletto, John M john.m.alle...@lmco.com writes: I am solving one of the PETSc 3D Laplacian examples with a 7 point stencil of width 1 and in a separate baseline with a 13 point stencil of width 2 (a more accurate mesh). What worked fast in terms of solvers and pre-conditioner for the less

Re: [petsc-users] Mat indices

2014-09-21 Thread Jed Brown
Feng Shi f...@fit.edu writes: Hi all, When setting the Mat indices, like the example: src/ts/examples/tutorials/ex10, I noticed that on line 508: col[0] = i-1; 509: col[1] = i; 510: col[2] = i+1info.mx ? i+1 : -1; 511:

Re: [petsc-users] Mat indices

2014-09-21 Thread Jed Brown
Feng Shi f...@fit.edu writes: Hi all, For 2-D finite difference problems with dof1,to use MatSetValuesBlocked, what should be the indices used in that routine? Am I right if I just use the indices just like dof=1, but set (5*dof^2) values at one time? That is the number of entries in a

Re: [petsc-users] Mat indices

2014-09-21 Thread Jed Brown
Feng Shi f...@fit.edu writes: Hi Jed, I mean, for the 3-D Maxwellian equations, the field E and B are both vectors, so we have 6 scalars, in which case I can define dof=6 for each node, right? If you use a collocated discretization, yes. Though you might want to use a staggered/mixed

Re: [petsc-users] Mat indices

2014-09-21 Thread Jed Brown
Feng Shi f...@fit.edu writes: Hi Jed, Thank you very much! I think I understand that now. It's really helpful to me and other beginners who will use Finite Difference with Petsc in solving 2-D and 3-D problems. Thank you. row.i=i, row.j=j, row.k=k and col[1:7].i=i,i+/-1,

Re: [petsc-users] How to set matrix values using MatSetValuesStencil when dof1 idxn -

2014-09-19 Thread Jed Brown
Feng Shi f...@fit.edu writes: Hi Folks, I get hard times in using the routine MatSetValuesStencil for dof1. There numerous examples for dof=1 but dof1, neither in the Petsc manual. The routine on-line manual

Re: [petsc-users] implicit TS solver for flux calculation

2014-09-18 Thread Jed Brown
Feng Shi f...@fit.edu writes: Dear all, I'm learning how to use implicit TS solvers to calculate the flux. The example code is http://www.mcs.anl.gov/petsc/petsc-current/src/ts/examples/tutorials/ex10.c.html I'm dying in understanding Lines 232-255. Is there anyone who knows how to

Re: [petsc-users] Identifier for DMs within DMComposite

2014-09-15 Thread Jed Brown
Gautam Bisht gbi...@lbl.gov writes: Hi, In my application, the number and order of DMs within a DMComposite could vary. Is there a way to tag (perhaps using an integer value) individual DMs within a DMComposite? One option is to name the DMs via PetscObjectSetName and programmatically get

Re: [petsc-users] Curiosity about MatSetOptionsPrefix on a_11 in PCSetUp_FieldSplit

2014-09-11 Thread Jed Brown
Eric Chamberland eric.chamberl...@giref.ulaval.ca writes: On 09/11/2014 12:52 PM, Matthew Knepley wrote: On Thu, Sep 11, 2014 at 11:47 AM, Eric Chamberland MatNest is absolutely the worst thing in the PETSc interface. You should Sounds so strange to me... :-) MatNest is really supposed to

Re: [petsc-users] Putting petsc in a namespace

2014-09-09 Thread Jed Brown
Florian Lindner mailingli...@xgm.de writes: If a user of my class library does an #include mypetsc.h he should not get all the petsc symbols in his global namespace, e.g. #include mypetsc.h Vector v; // is an object of my class lib Vec pv; // should not work, since I do not want petsc

Re: [petsc-users] Configure/make with --download-hdf5 or --with-hdf5-dir= crashes

2014-09-09 Thread Jed Brown
Satish Balay ba...@mcs.anl.gov writes: Ok there is an issue with hdf5-1.8.13 with current netcdf. Gah, after all their effort to maintain binary compatibility from 1.6 to 1.8, they casually break compatibility in a subminor release. Looks like its fixed in netcdf.git

Re: [petsc-users] Configure/make with --download-hdf5 or --with-hdf5-dir= crashes

2014-09-09 Thread Jed Brown
Satish Balay ba...@mcs.anl.gov writes: Reinvoking 'make' in the build dir get the build going. [and its not even a parallel build on this machine]. Wierd.. Different source files can have ordering requirements and there is no good way to determine that ordering, so it's often semi-manual or

Re: [petsc-users] Configure/make with --download-hdf5 or --with-hdf5-dir= crashes

2014-09-09 Thread Jed Brown
Jed Brown j...@jedbrown.org writes: Satish Balay ba...@mcs.anl.gov writes: Ok there is an issue with hdf5-1.8.13 with current netcdf. Gah, after all their effort to maintain binary compatibility from 1.6 to 1.8, they casually break compatibility in a subminor release. And they didn't even

Re: [petsc-users] Putting petsc in a namespace

2014-09-08 Thread Jed Brown
Florian Lindner mailingli...@xgm.de writes: What do you expect when you put some things in the namespace and include dependencies outside the namespace? Well, I have these symbols in the petsc and in the global namespace. No, the headers have guards so that they are only processed once. So

Re: [petsc-users] Configure/make with --download-hdf5 or --with-hdf5-dir= crashes

2014-09-08 Thread Jed Brown
Satish Balay ba...@mcs.anl.gov writes: On Mon, 1 Sep 2014, Matthew Knepley wrote: On Mon, Sep 1, 2014 at 6:57 AM, Åsmund Ervik asmund.er...@ntnu.no wrote: Satish, can we patch our download source? I can do it, but I am not sure of the process for HDF5. Added a repo

Re: [petsc-users] Configure/make with --download-hdf5 or --with-hdf5-dir= crashes

2014-09-08 Thread Jed Brown
Satish Balay ba...@mcs.anl.gov writes: On Mon, 1 Sep 2014, Åsmund Ervik wrote: This is the reason why I asked whether I can somehow tell --download-hdf5 to download a more recent version. 1.8.11 should do it. This works for me with examples..

Re: [petsc-users] Petsc configuration and multiple branch working

2014-09-06 Thread Jed Brown
Barry Smith bsm...@mcs.anl.gov writes: The problem with using different PETSC_ARCH for each branch is that when you switch the branches it will sometimes/often change an include file that many of the C files are dependent on so make gmake will require recompiling much of the

Re: [petsc-users] Petsc configuration and multiple branch working

2014-09-06 Thread Jed Brown
Satish Balay ba...@mcs.anl.gov writes: fedora linux defaults to using ccache - I guess I've been using it all along.. Do you do any additional tuning of ccache? $ type gcc g++ gcc is /usr/lib64/ccache/gcc g++ is /usr/lib64/ccache/g++ Doesn't need anything else. I don't use Fedora and don't

Re: [petsc-users] Petsc configuration and multiple branch working

2014-09-06 Thread Jed Brown
Barry Smith bsm...@mcs.anl.gov writes: What will I do with all this new freed up time? Does it work in Xcode? Sounds like that could use up the newfound time and then some. pgp2MKM2y8t2l.pgp Description: PGP signature

Re: [petsc-users] Putting petsc in a namespace

2014-09-05 Thread Jed Brown
Florian Lindner mailingli...@xgm.de writes: Hello, This may be rather a C/C++ question, but ... I encapsulate some petsc functions into c++ classes. Since I don't want to pull all petsc symbols into the global namespace for anyone using my classes I try to put petsc into it's own

Re: [petsc-users] Using MUMPS and (PT)SCOTCH with PETSC

2014-09-05 Thread Jed Brown
Barry Smith bsm...@mcs.anl.gov writes: You need the https://gforge.inria.fr/frs/download.php/file/28934/scotch_5.1.12a_esmumps.tar.gz version with mumps in the tar ball name And yes, this is absurd, so don't forget to complain to upstream. One can only hope that overwhelming user

Re: [petsc-users] Using MUMPS and (PT)SCOTCH with PETSC

2014-09-05 Thread Jed Brown
Kai Song ks...@lbl.gov writes: Hi Barry, I got the similar error for scotch_5.1.12b_esmumps.tar.gz: Looks like this commit was only valid with 6.0, so you'll have to revert it to use 5.1.12b. https://bitbucket.org/petsc/petsc/commits/4620623451f619bc2d23a7c3de5bdf5ee5fd0ff2 Is there a

Re: [petsc-users] FW: LaPlacian 3D example 34.c

2014-09-05 Thread Jed Brown
Alletto, John M john.m.alle...@lmco.com writes: All, LaPlacian 3D example 34.c - how do you invoke multiGrid ? Did you read my comment on your scicomp post? I recommend using src/ksp/ksp/examples/tutorials/ex45.c since it was written by us (Barry) and is more controllable via run-time

Re: [petsc-users] FETI-DP implementation and call sequence

2014-09-05 Thread Jed Brown
Satish Balay ba...@mcs.anl.gov writes: Ok - looks like this error check in ISLocalToGlobalMappingRestoreBlockInfo() was added a couple of days back. https://bitbucket.org/petsc/petsc/commits/cbc1caf078fb2bf42b82e0b5ac811b1101900405 PetscValidHeaderSpecific(mapping,IS_LTOGM_CLASSID,1);

Re: [petsc-users] FETI-DP implementation and call sequence

2014-09-05 Thread Jed Brown
Satish Balay ba...@mcs.anl.gov writes: Perhaps the following is the fix [with proper comments, more error checks?]. But someone more familiar with this code should check this.. Satish -- $ git diff |cat diff --git a/src/ksp/pc/impls/is/pcis.c b/src/ksp/pc/impls/is/pcis.c index

Re: [petsc-users] Initial estimation on SNES and KSP

2014-09-04 Thread Jed Brown
Miguel Angel Salazar de Troya salazardetr...@gmail.com writes: Dear all SNES uses internally a KSP to solve the linear system of equations right? Now the case that we had a linear system of equations that we are solving with SNES, how could we set the initial estimation for the KSP? If we

Re: [petsc-users] FETI-DP implementation and call sequence

2014-09-03 Thread Jed Brown
Matthew Knepley knep...@gmail.com writes: 1- Is it possible to complete a FETI-DP solution with the provided functions in current PetSc release? There is no FETI-DP in PETSc. Wrong. There is PCBDDC, which has the same eigenvalues as FETI-DP. You can enable it by configuring --with-pcbddc.

Re: [petsc-users] Configure/make with --download-hdf5 or --with-hdf5-dir= crashes

2014-09-02 Thread Jed Brown
to fix 'master', more on that coming to petsc-dev. commit fce4001c127676bb645ba81e8336311793ef2275 Author: Jed Brown j...@jedbrown.org Date: Tue Sep 2 07:10:49 2014 -0600 make: PETSC_ARCH/conf/files depends on PETSC_ARCH/include/petscconf.h When a PETSC_ARCH is reconfigured

Re: [petsc-users] SNESSetFunctionDomainError

2014-08-31 Thread Jed Brown
Derek Gaston fried...@gmail.com writes: As a workaround I have tried returning various diverged statuses in my linear and nonlinear convergence checks... but it still has a pesky problem where there are a couple more residual evaluations at the end of the nonlinear solve. I think this is

Re: [petsc-users] SNESSetFunctionDomainError

2014-08-31 Thread Jed Brown
Dmitry Karpeyev karp...@mcs.anl.gov writes: Handling this at the KSP level (I actually think the Mat level is more appropriate, since the operator, not the solver, knows its domain), We are dynamically discovering the domain, but I don't think it's appropriate for Mat to refuse to evaluate

Re: [petsc-users] *****SPAM*****Create vector with evenly spaced values

2014-08-30 Thread Jed Brown
Florian Lindner mailingli...@xgm.de writes: Am Freitag, 29. August 2014, 09:29:21 schrieben Sie: Florian : is there a way to create a vector with evenly spaced values in an interval, like the numpy.arange function? http://docs.scipy.org/doc/numpy/reference/generated/numpy.arange.html

Re: [petsc-users] PETSC-3.5.0 with SuperLU and Hypre

2014-08-29 Thread Jed Brown
Matthew Knepley knep...@gmail.com writes: On Fri, Aug 29, 2014 at 10:59 AM, Kai Song ks...@lbl.gov wrote: Hi Matt, Thanks for the quick response. Both logs are included in the attachment. Let me know if more log files are needed. Jed, why does this not enter

Re: [petsc-users] Unable to configure PETSc with CUDA: Problem with thrust directory

2014-08-29 Thread Jed Brown
Satish Balay ba...@mcs.anl.gov writes: On Fri, 29 Aug 2014, Dominic Meiser wrote: On 08/29/2014 08:31 AM, Matthew Knepley wrote: On Fri, Aug 29, 2014 at 9:35 AM, Dominic Meiser dmei...@txcorp.com mailto:dmei...@txcorp.com wrote: Dominic, I think that thrust.py should depend on

Re: [petsc-users] PETSC-3.5.0 with SuperLU and Hypre

2014-08-29 Thread Jed Brown
Satish Balay ba...@mcs.anl.gov writes: Both make.log and arch-linux2-c-debug/conf/files are in the attachment. ok - files has: src/mat/impls/aij/mpi/superlu_dist/superlu_dist.c src/ksp/pc/impls/hypre/hypre.c make.log has: CC

Re: [petsc-users] superlu_dist and MatSolveTranspose

2014-08-28 Thread Jed Brown
Antoine De Blois antoine.debl...@aero.bombardier.com writes: Hello everyone, I am trying to solve a A^T x = b system. For my applications, I had realized that the MatSolveTranspose does not converge properly. What do you mean does not converge properly? Can you send a test case where the

Re: [petsc-users] Error and success codes

2014-08-27 Thread Jed Brown
Cedric Doucet cedric.dou...@inria.fr writes: No, use 0. It's less typing and that is something that will definitely never change. I understand but it could be a good thing to give it the same value as EXIT_SUCCESS (from cstdlib) because this value is not always zero. C11 §7.22.4.4 If the

Re: [petsc-users] Error and success codes

2014-08-25 Thread Jed Brown
Cedric Doucet cedric.dou...@inria.fr writes: Hello, I want to manage errors with CHKERRQ macro in void functions. I do not want to use CHKERRV. I prefer to modify void functions so that they return an error code. However, it seems CHKERRQ returns a value in case of failure only.

Re: [petsc-users] command line option for displaying solver details

2014-08-25 Thread Jed Brown
Sahai, Amal sah...@illinois.edu writes: Hi What is the command line argument for displaying details of the linear solver being used for a problem (PCType, KSPType, Tolerance)? -ksp_view pgpTPS2uAeXCa.pgp Description: PGP signature

Re: [petsc-users] dynamic matrix type dense matrix.

2014-08-25 Thread Jed Brown
Mark Adams mfad...@lbl.gov writes: MatSetup was the issues: this seems to work with and w/o -mat_type dense: call MatCreate(solver%comm,solver%schur,ierr); call MatSetSizes(solver%schur,nloc,nloc,PETSC_DECIDE,PETSC_DECIDE,ierr) call

Re: [petsc-users] SNESSetFunctionDomainError

2014-08-24 Thread Jed Brown
Barry Smith bsm...@mcs.anl.gov writes: I tried once to convert PETSc errors to be more “exception like” and let them be caught and handled. It worked but was kind of clunky so I gave up on it and decided that anything we wanted to be “handled” instead of just passed up as an error

Re: [petsc-users] Use of PCFieldSplitSetSchurPre

2014-08-21 Thread Jed Brown
(PETSc) need to fix the interface, not just find a workaround. That's why I suggested running in a debugger. Thanks, On Tue, Aug 19, 2014 at 8:17 AM, Jed Brown j...@jedbrown.org wrote: Mark Adams mfad...@lbl.gov writes: I am creating an Schur complement matrix explicitly (solver%schur

Re: [petsc-users] Inverting a Large Matrix with Fortran Code

2014-08-20 Thread Jed Brown
Koki Imada koki.im...@york.ac.uk writes: Hello, I have a problem of the kind: G(i) = (invM.P).G(i+1) +invM.(d -R.b), where M, P and R are square tri-diagonal matrices, invM is the inverse of M, G(i) and G(i+1) are the linearised solution vectors (given G(i+1), G(i) is determined

Re: [petsc-users] Solving tridiagonal hermitian generalized eigenvalue problem with SLEPC

2014-08-19 Thread Jed Brown
Toon Weyens twey...@fis.uc3m.es writes: Okay I reread again your answers and it seems that I missed the fact that I do not need shift invert to find the EV with the largest real part? Correct, inversion is way more expensive and used to find internal eigenvalues. Then the trick of ex. 13

Re: [petsc-users] Use of PCFieldSplitSetSchurPre

2014-08-19 Thread Jed Brown
Mark Adams mfad...@lbl.gov writes: I am creating an Schur complement matrix explicitly (solver%schur) and setting it with code like: call SNESGetKSP(solver%snes,innerksp,ierr) call KSPGetPC(innerksp,spc,ierr) call PCFieldSplitSetSchurPre(spc,PC_FIELDSPLIT_SCHUR_PRE_USER,solver%schur,ierr)

Re: [petsc-users] Solving tridiagonal hermitian generalized eigenvalue problem with SLEPC

2014-08-19 Thread Jed Brown
Toon Weyens twey...@fis.uc3m.es writes: Yes, you are probably right: My code is not yet bug free (by all means!). However, I have been working very hard on it and I will see if I find something. B should not ever be really singular! I do, however, still have some questions: - Does slepc

Re: [petsc-users] how to install two different version petsc in the same pc

2014-08-18 Thread Jed Brown
丁老师 ztdepya...@163.com writes: I need to install a library that could only be run with petsc 3.2. but i have installed the 3.3-p6. how to install the petesc 3.2 in the same pc Each version is a different PETSC_DIR. Also, please upgrade to petsc-3.5 at your earliest convenience.

Re: [petsc-users] how to install two different version petsc in the same pc

2014-08-18 Thread Jed Brown
丁老师 ztdepya...@163.com writes: how to set the PETSC_DIR with two different value. It is an environment variable used with PETSc makefiles (see the users manual for more on PETSC_DIR and PETSC_ARCH). If you use a different configuration system (autotools, cmake, etc.) then it will probably

Re: [petsc-users] Out-of-memory, reading ASCII files using single processor

2014-08-18 Thread Jed Brown
jifeng zhao jifengzhao2...@u.northwestern.edu writes: Hi Jed, Actually the out-of-memory happened when converting ASCII files to petsc format using a serial PETSc program. It seems a single processor doesn't have enough memory to preallocate enough space to store the matrices. Is there any

Re: [petsc-users] Solving tridiagonal hermitian generalized eigenvalue problem with SLEPC

2014-08-18 Thread Jed Brown
Toon Weyens twey...@fis.uc3m.es writes: Hi, thanks for the answers! I think I expressed myself wrong: I can indeed get it to work with just using AIJ matrices, as in example 13. This is the way that I am currently solving my problem. There are only two issues: 1. memory is indeed important

Re: [petsc-users] Solving tridiagonal hermitian generalized eigenvalue problem with SLEPC

2014-08-18 Thread Jed Brown
Hong hzh...@mcs.anl.gov writes: Toon : Sorry, I forgot to mention: I am looking for the Eigenvalues that are the largest, not in absolute value, but along the real axis. Then, you do not need shift-invert, therefore, should not use LU matrix factorization. The error is in STSetUp_Shift,

Re: [petsc-users] problem in divide the matrix between processes for MatCreateMPIAIJWithArrays()

2014-08-18 Thread Jed Brown
Priyank Patel ppate...@odu.edu writes: Hello, I am trying to divide the rows between the processes for MatCreateMPIAIJWithArrays() but I am unable to create a fully functional code for that. Is there any easy way to do it or is there anybody who have any ready code that I can use to

Re: [petsc-users] Out-of-memory, reading ASCII files using single processor

2014-08-17 Thread Jed Brown
jifeng zhao jifengzhao2...@u.northwestern.edu writes: Hello all, I am trying to read large matrices from ASCII files and save it into petsc binary format using uni-processor. But I am encountered a out-of-memory error, when reading too-large ASCII file. Don't use ASCII. It is a

Re: [petsc-users] How to run SNES ex62

2014-08-15 Thread Jed Brown
Justin Chang jychan...@gmail.com writes: Hi all, This might seem like a silly question, but whenever I try running ./ex62 i seem to always get a zero solution. Matt doesn't like the normal run targets in makefiles, so he keeps all the options in config/builder.py. You should be able to

Re: [petsc-users] Error to TaoSolve() call

2014-08-12 Thread Jed Brown
Khai Hong Pham khaip...@utexas.edu writes: Hello, I call TaosSolve() in my code. The solution vector is a nested and Jacobian matrix is nested too. It shows me the error: [0]PETSC ERROR: [0]PETSC ERROR: Caught signal

Re: [petsc-users] KSPSetUp hanging up with HYPRE preconditioner

2014-08-08 Thread Jed Brown
Ghosh, Swarnava sghosh2...@gatech.edu writes: Hello, I am using petsc 3.4.1 interfaced with hypre 2.9.0b I am using the following lines of code to solve a Poisson equation using KSPGMRES with HYPRE preconditioner. pOfdft-laplaceOpr is a sparse matrix in MATMPIBAIJ format.

Re: [petsc-users] force KSP to perform at least a single iteration

2014-08-08 Thread Jed Brown
Anush Krishnan an...@bu.edu writes: Hi Jed, Is there any reason why ATOL needs to be set for transient problems? If the solution does not change for a step, the initial algebraic residual will be as small as it was at convergence on the last time step. If you solve to an RTOL, the solve

Re: [petsc-users] Variable and function reference problem in Windows Linux

2014-08-07 Thread Jed Brown
Danyang Su danyang...@gmail.com writes: Hi All, I have the codes first developed on Windows OS, it works fine. Now the codes have been ported to Linux, there are some compiling errors regarding some variable and function definition, as shown below. 1. DMDA_BOUNDARY_NONE DM_BOUNDARY_NONE

Re: [petsc-users] Pointwise max for matrices

2014-08-06 Thread Jed Brown
Mathieu MORLIGHEM mathieu.morlig...@uci.edu writes: Hello, I am trying to implement a Flux Correction Transport method for advection equations (e.g. http://www.mathematik.uni-dortmund.de/~kuzmin/linfct.pdf). One of the steps consists of calculating a matrix D which is such that d_ij =

Re: [petsc-users] valgrind error messages with PETSc V3.5.1

2014-08-03 Thread Jed Brown
Randall Mackie rlmackie...@gmail.com writes: The attached small program, basically a call to PetscPrintf, gives the following valgrind errors: [rmackie ~/tst_petsc_problem] ./cmd_test ==24812== Invalid read of size 1 ==24812==at 0x4C2E500: __GI_strncpy (in

Re: [petsc-users] Some possible bugs with PETSC_VIEWER_BINARY_?

2014-08-02 Thread Jed Brown
Sun, Hui hus...@ucsd.edu writes: Here you can see I have 4 processors running at the same time. I read in the output from MATLAB using the command [A,B,C,D,x,b,y] = PetscBinaryRead('binaryoutput'). And I visualize the variable y by the commands: mesh(reshape(y(20001:3),100,100))

Re: [petsc-users] Some possible bugs with PETSC_VIEWER_BINARY_?

2014-08-02 Thread Jed Brown
Sun, Hui hus...@ucsd.edu writes: I have just tested the PETSC_VIEW_BINARY_ on other test codes, they all work pretty well with multiple processors. Maybe I shouldn't be using ex70.c as a template any more. I strongly suggest not using it as a template for decomposition or for assembling

Re: [petsc-users] parmetis error when using more than one block per processor in asm

2014-08-01 Thread Jed Brown
Can you turn on debugging (it does more input validation) and attempt to reproduce with a PETSc example or a short test case that you can share with us? pgprkn9uQndkg.pgp Description: PGP signature

Re: [petsc-users] Poor multigrid convergence in parallel

2014-07-29 Thread Jed Brown
in private side-conversations. You'll likely get an answer faster that way too. Lawrence Mitchell lawrence.mitch...@imperial.ac.uk writes: On 28 Jul 2014, at 23:27, Jed Brown j...@jedbrown.org wrote: Lawrence Mitchell lawrence.mitch...@imperial.ac.uk writes: Bog-standard P1 on a pretty much regularly

<    9   10   11   12   13   14   15   16   17   18   >