Hi Folks,
My parallel application written in C++ (which also uses PETSc library for
linear solvers) requires calling control and optimization toolbox of MATLAB
at every time step to get a small number of double values. Likewise the
MATLAB function will need to know some values from the parallel C+
You should use the PetscMatlabEngine
> https://www.mcs.anl.gov/petsc/petsc-3.13/docs/manualpages/Sys/PetscMatlabEngine.html
>
> Barry
>
>
> On Jun 8, 2020, at 7:09 PM, Amneet Bhalla wrote:
>
> Hi Folks,
>
> My parallel application written in C++ (which also use
eEvaluate(PETSC_MATLAB_ENGINE_WORLD,"MPI_Comm_rank");
> src/vec/vec/tests/ex31.c: ierr =
> PetscMatlabEnginePut(PETSC_MATLAB_ENGINE_WORLD,(PetscObject)x);CHKERRQ(ierr);
> src/vec/vec/tests/ex31.c: ierr =
> PetscMatlabEngineEvaluate(PETSC_MATLAB_ENGINE_WORLD,"x = x +
>
-leng -lmex -lmx -lmat
-lut -licudata -licui18n -licuuc
On Tue, Jun 9, 2020 at 2:20 PM Amneet Bhalla wrote:
> Do these additional configure flags for MATLAB look OK?
>
> --with-matlab=1 --with-matlab-dir=/Applications/MATLAB_R2019b.app
> --with-matlab-engine=1
> --with-ma
t;
> On Tue, Jun 9, 2020 at 4:27 PM Amneet Bhalla
> wrote:
>
>> Forgot to mention that configure found the following about MATLAB
>>
>> Matlab:
>>
>> Includes: -I/Applications/MATLAB_R2019b.app/extern/include
>>
>> /Applications/MA
--Junchao Zhang
>
>
> On Tue, Jun 9, 2020 at 4:27 PM Amneet Bhalla
> wrote:
>
>> Forgot to mention that configure found the following about MATLAB
>>
>> Matlab:
>>
>> Includes: -I/Applications/MATLAB_R2019b.app/extern/include
>>
>> /Ap
35568122/why-isnt-dyld-library-path-being-propagated-here
>
>Anyways try my branch and that should work.
>
>Barry
>
>
>
> On Jun 9, 2020, at 5:09 PM, Amneet Bhalla wrote:
>
>
> That's where I also found it. Thanks, Sanjay!
>
> (This path is
what you can do is copy the
> config/BuildSystem/config/MatlabEngine.py to your PETSc 3.12.2 version and
> the configure
> should work (it won't automatically run the test case but you can test it
> manually).
>
> Barry
>
>
> On Jun 9, 2020, at 5:48 PM, Amneet Bhalla
This is so cool! Thank you for providing a gateway to MATLAB via PETSc.
On Thu, Jun 11, 2020 at 6:21 PM Barry Smith wrote:
>
>
> On Jun 11, 2020, at 2:47 PM, Amneet Bhalla wrote:
>
> Ok, I'm able to call and use MATLAB functionality from PETSc. If I'm
> u
Thank you Barry! We will definitely try this out and let you know.
We also found an inconvenient work around. We registered the ip of a head
compute node on Mathworks.com, which generated a license file. Then we
activated Matlab on this compute node offline by pointing it to the license
file. This
Mark, unfortunately we do not have an experienced cluster admin. We mostly
instruct the admin on matters like these.
On Tue, Nov 10, 2020 at 4:22 AM Mark Adams wrote:
> You need to talk to your system administrator or whoever installed the
> Matlab licence, or Matlab.
> Good luck,
> Mark
>
> On
>> If you want to solve systems accurately, you should non-dimensionalize
the system prior to discretization. This would mean that
your C and b have elements in the [1, D] range, where D is the dynamic
range of your problem, say 1e4, rather than these huge
numbers you have now.
@Matt: We have done
>
>
>For a diagonal system with this modest range of values Jacobi should
> converge in a single iteration.
>
This is what I wanted to confirm (and my expectation also). There could be
a bug in the way we are setting up the linear operators in the
preconditioner and the matrix-free solver. We
How about using a fixed number of Richardson iterations as a Krylov
preconditioner to a GMRES solver? Would that lead to a linear operation?
On Sat, Apr 30, 2022 at 8:21 PM Jed Brown wrote:
> In general, no. A fixed number of Krylov iterations (CG, GMRES, etc.) is a
> nonlinear operation.
>
> A
ot;FGMRES" as the outer solver (which supports only right
>> preconditioning).
>>
>> 2. Is it also possible to not get "-nan" when || b || = 0?
>>
>>
>> Regards,
>> Rama
>>
>> On Sun, May 1, 2022 at 12:12 AM Dave May wrote:
>>
Knepley wrote:
> On Mon, May 2, 2022 at 1:56 PM Amneet Bhalla
> wrote:
>
>> Thanks Matt and Barry. Since we are using MATSHELL, we printed max norm
>> of || b || and || A*x ||, the two things that have all the physics of the
>> problem. Both are coming out to be finite (n
Thanks Barry. Adding absolute paths made it work with "master" hostname. We
have added both options in our code just in case the NULL hostname does not
work on a different machine.
https://github.com/IBAMR/cfd-mpc-wecs/blob/main/main.cpp#L346-L361
On Fri, Jun 10, 2022 at 1:48 PM Barry Smith wrote
Hi Guys,
Is there a PETSc interface to make calls to Python scripts or libraries
(e.g., Pytorch) from a C/C++ code making use of PETSc? If so, are there
some examples that I refer to?
Thanks,
--
--Amneet
on scripts or libraries from C/C++
> code. If you are looking for ways to use PETSc and PyTorch together, it is
> best to build your application in Python so that you can use both petsc4py
> and PyTorch. See the following code for an example:
> https://github.com/caidao22/pnode
>
On Monday, October 10, 2016, Barry Smith wrote:
>
> > On Oct 10, 2016, at 4:01 PM, Kong, Fande > wrote:
> >
> > Hi All,
> >
> > I know how to remove the null spaces from a singular system using
> creating a MatNullSpace and attaching it to Mat.
> >
> > I was really wondering what is the philosop
Hi Folks,
I am thinking of trying TS module of PETSc to free myself of maintaining
time stepping part of the code and to try different
time integrators easily. The problem that I am considering is
incompressible
Navier Stokes with variable coefficients solved using projection method.
The method w
On Mon, Mar 27, 2017 at 10:42 AM, Matthew Knepley wrote:
> 1) sounds easier and matches your current code.
Great!
For matrix free TS, the form of F(t,u,u_t) = rho u*_t - div ( sigma) as
written "on paper" and should not
contain time stepping factors like (1/2) that comes from CN? Similarly
> I think its due to some of the system calls from MPI.
>
> You can verify this with a '--with-mpi=0' build.
>
> I wonder if there is a way to build mpich or openmpi - that doesn't
> trigger Apple's firewall..
>
> Satish
>
> On Sun, 19 Mar 2023, Amn
rewall-rules
>
>
> On Mar 19, 2023, at 5:25 PM, Amneet Bhalla wrote:
>
> Yes, this is MPI that is triggering the apple firewall. If I allow it it
> gets added to the allowed list (see the screenshot) and it does not trigger
> the firewall again. However, this needs to be done f
Hi Srinivas,
As discussed earlier you don’t need libMesh for the WEC application. You
can just work with PETSc 3.17.5 that builds with Matlab.
Do you have a specific reason for wanting to build libMesh?
Thanks,
—Amneet
On Thu, Aug 31, 2023 at 10:16 PM INTURU SRINIVAS 20PHD0548 via petsc-users <
Hi Folks,
I am using MatZeroRows() to set Dirichlet boundary conditions. This works
fine for the serial run and the solver produces correct results (verified
through analytical solution). However, when I run the case in parallel, the
simulation gets stuck at MatZeroRows(). My understanding is that
; once after the loop so it can exchange the needed information with the
> other MPI processes to get the row indices to the right place.
>
> Barry
>
>
>
>
> On Nov 28, 2023, at 6:44 PM, Amneet Bhalla wrote:
>
>
> Hi Folks,
>
> I am using MatZeroRows() to set Di
I added that option but the code still gets stuck at the same call
MatZeroRows with 3 processors.
On Tue, Nov 28, 2023 at 7:23 PM Amneet Bhalla wrote:
>
>
> On Tue, Nov 28, 2023 at 6:42 PM Barry Smith wrote:
>
>>
>> for (int co
rows during
MatSetValues. However, that would lengthen my code and I was trying to
avoid that.
On Wed, Nov 29, 2023 at 10:02 AM Matthew Knepley wrote:
> On Wed, Nov 29, 2023 at 12:30 PM Amneet Bhalla
> wrote:
>
>> Ok, I added both, but it still hangs. Here, is bt from all three t
:
>
>
> On Nov 29, 2023, at 2:11 PM, Matthew Knepley wrote:
>
> On Wed, Nov 29, 2023 at 1:55 PM Amneet Bhalla
> wrote:
>
>> So the code logic is after the matrix is assembled, I iterate over all
>> distributed patches in the domain to see which of the patch is
Ah, I also tried without step 2 (i.e., manually doing MPI_allgatherv for
Dirichlet rows), and that also works. So it seems that each processor needs
to send in their own Dirichlet rows, and not a union of them. Is that
correct?
On Wed, Nov 29, 2023 at 3:48 PM Amneet Bhalla wrote:
> Thanks Ba
Awesome! MatZeroRows is very useful and simplified the code logic.
On Wed, Nov 29, 2023 at 5:14 PM Matthew Knepley wrote:
> On Wed, Nov 29, 2023 at 7:27 PM Amneet Bhalla
> wrote:
>
>> Ah, I also tried without step 2 (i.e., manually doing MPI_allgatherv for
>> Dirichlet
Hi Folks,
I am trying to build PETSc with MUMPS which requires building/downloading
scalapack. I used the following configure command to do this:
./configure --PETSC_ARCH=linux-opt --with-debugging=0 --download-hypre=1
--with-x=0 -download-mumps -download-scalapack -download-parmetis
-download-me
Hi,
I am trying to build PETSc (v3.7.7) locally in my home directory on NERSC
(Edison).
However, I am getting the following error during the configuration stage.
===
TESTING: checkFortranNameMangling from
c
Hi Satish --- I am trying GNU. I am configuring with these additional
flags, and it seems to be past that point. I will let you know if it works
fine all the way.
The reason I am not using prebuilt PETSc on NERSC is that I want to be
consistent with C++, C, and fortran
compilers with all the 3rd pa
Hi Folks,
We are dealing with a singular matrix that arises from Stokes' equation
with Dirichlet velocity BCs. The way we are handling it is to pass
nullspace info to KSP, i.e, vector of {u,p} = {0,1}, and letting the matrix
to be singular. However, we are using ASM as the preconditioner and when
Hi Folks,
I have a basic question regarding matrix size as created by subdomains in
PCASM.
In the PCASMSetLocalSubdomains(PC pc,PetscInt n,IS is[],IS is_local[])
routine, I am defining is[] to be the local+overlapping DOFs and is_local
[] to be the nonoverlapping local DOFs only. Now
if I grab th
Thanks! They indeed are for the overlapping division. I just wanted to
confirm it to debug my code, which I now think is giving me the right size
of the subdomain matrices.
On Thu, Jun 4, 2015 at 2:11 PM, Matthew Knepley wrote:
> On Thu, Jun 4, 2015 at 3:47 PM, Amneet Bhalla
>
Hi All,
I am trying to solve system of PDEs on AMR grid. I using PETSc 's Krylov
solver for that. This requires me
to use a FAC preconditioner with a non-Krylov solver for the level 0. I
actually tried PETSc's Krylov Solver
for level 0 (by building MPIAIJ Mat and Vec), but it does not really
impr
d ex4 of hypre.
Can you point me to PETSc's examples of AMG, ML or GAMG?
On Fri, Aug 3, 2012 at 7:47 AM, Matthew Knepley wrote:
> On Fri, Aug 3, 2012 at 7:28 AM, Amneet Bhalla wrote:
>
>> Hi All,
>>
>> I am trying to solve system of PDEs on AMR grid. I using PETSc
package but it didn't work either.
On Fri, Aug 3, 2012 at 8:24 AM, Matthew Knepley wrote:
> On Fri, Aug 3, 2012 at 8:12 AM, Amneet Bhalla wrote:
>
>> Thanks Matt for a quick reply.
>>
>> Attached is the Makefile I used for building ex9. I used the same
>>
Thanks Matt for pointing to Makefile manual. I just included these lines
include $(PETSC_DIR)/conf/variables
LIBS = $(PETSC_LIB)
in the hypre's makefile and it is now working. This issue is resolved. I
will try to write preconditioner using hypre's multigrid solvers.
Example files which you poin
I see... Do I need to have some external package for gamg? I am getting
this error
Unable to find requested PC type gamg!
Also its not listed in -pc_type options when I do -help
On Fri, Aug 3, 2012 at 2:21 PM, Barry Smith wrote:
>
> On Aug 3, 2012, at 1:34 PM, Amneet Bhalla
Hi All,
Is it almost always the case that for structured mesh, geometric multigrid
would be faster than algebraic multigrid solver/preconditioner?
Basically I want to know If I had a choice between pfmg , gamg and
boomeramg for structured grid what should I choose?
Thanks,
--
Amneet
---
Hi All,
I want to solve a system of equations which looks like
A x + Bu = f1
C x + Du = f2
A, B, C, and D as shell operators and {x , u, f1, and f2} are non-native
PETSc vectors.
This is how I am thinking of solving it in PETSc
1) Define shell operators which d
On Thu, Feb 21, 2013 at 2:57 PM, Jed Brown wrote:
> that you're happy with and that performs well with fieldsplit or custom
> preconditioning that will be amenable to your MatShells
Is fieldsplit an alternative approach to MatNest and VecNest? The problem
is that I am working on nonnative PETSc
matrices using (?) b) Create vectors using
On Thu, Feb 21, 2013 at 3:24 PM, Matthew Knepley wrote:
> On Thu, Feb 21, 2013 at 4:20 PM, Amneet Bhalla gmail.com>wrote:
>
>>
>> On Thu, Feb 21, 2013 at 2:57 PM, Jed Brown wrote:
>>
>>> that you'
at we want is PETSc's algorithm (and NOT the data
structures)
to solve the problem.
On Thu, Feb 21, 2013 at 5:06 PM, Jed Brown wrote:
>
> On Thu, Feb 21, 2013 at 4:19 PM, Amneet Bhalla gmail.com>wrote:
>
>> Can you guys comment on what example case would be best to start o
Jed, so to use VecGetSubVector() with a regular Vec; it would need to set
Vec->map->bs = no_of_components
that I want to solve for? I understand that a wrapper code needs to be
written for gelling SAMRAI data field and PETSc Vec; I am referring to such
vector wrapper here.
On Thu, Feb 21, 2013 at
I have packaged few vectors into a single Vec. I want to extract
components of this composite Vec at some time in the code. Doing things
this way is giving me an error.
static const int NO_COMPS = ...;
Vec array_x[NO_COMPS] = {.};
Vec x;
VecCreateNest(PETSC_COMM_WORLD, NO_COMPS, PETSC_NULL, a
Hi Jed,
I have registered MatShell that operates on VecNest (which is composed of
shell vectors) with KSP.
When I am solving sytem of equations using this KSP, I am getting some
errors. The sequence of
events from gdb are:
#0 0x in ?? ()
#1 0x009856fd in VecGetArrayRead
I am all for doing things the legal way :-)
Where should this routine be added and how should it look like for shell
vectors? I had assumed that
such changes should be done in user defined MatGetVecs routine. Clearly
this is not happening. Can you
comment on proper construction of duplicated Vecs
Jed this is output from gdb:
#0 0x in ?? ()
#1 0x009857fd in VecGetArrayRead (x=0x33ba0b0, a=0x7fff1f0cf100)
at
/home/amneet/SOFTWARES/LIBRARIESIBAMR/PETSc-3.3-Lite/include/petsc-private/vecimpl.h:350
#2 0x0098f67f in VecGetArray_Nest (X=0x33c0850, x=0x7fff1f0cf2
onsModule=config.compilerOptions --CC=mpicc --FC=mpif90
> --with-debugging=1 --download-hypre=1 --with-x=0 --PETSC_ARCH=linux-dbg
>
> If specifying compilers - also specify a C++ compiler.
>
> --CC=mpicc --FC=mpif90 --CXX=mpicxx
>
> Satish
>
>
> On Sun, 9 Dec 20
Hmmn, ok. I will try it out.
On Thu, Mar 14, 2019 at 9:34 AM Matthew Knepley wrote:
> On Thu, Mar 14, 2019 at 10:05 AM Amneet Bhalla
> wrote:
>
>> I need the serial built of Silo and HDF5 libraries. I am sure that the
>> MPI wrappers are coming from the serial compiler
55 matches
Mail list logo