[petsc-users] a question about DAE Function
Jin, Shuangshuang
Shuangshuang.Jin at pnnl.gov
Wed Jun 5 17:25:03 CDT 2013
Is there anything particular installation required for me to use MATELEMENTAL? I got the following error when I tried to use MATELEMENTAL in the code:
[d3m956 at olympus tests]$ mpiexec -n 1 ex145
Create Elemental matrix A
[0]PETSC ERROR: --------------------- Error Message ------------------------------------
[0]PETSC ERROR: Unknown type. Check for miss-spelling or missing external package needed for type:
see http://www.mcs.anl.gov/petsc/documentation/installation.html#external!
[0]PETSC ERROR: Unknown Mat type given: elemental!
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Petsc Development GIT revision: cee652cbe889c53a5c397ca74d3ef6fdcdf8b9eb GIT Date: 2013-04-21 09:49:07 -0500
[0]PETSC ERROR: See docs/changes/index.html for recent updates.
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
[0]PETSC ERROR: See docs/index.html for manual pages.
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: ex145 on a arch-complex named olympus.local by d3m956 Wed Jun 5 15:20:54 2013
[0]PETSC ERROR: Libraries linked from /pic/projects/ds/petsc-dev.4.23.13/arch-complex/lib
[0]PETSC ERROR: Configure run at Tue Apr 23 12:17:01 2013
[0]PETSC ERROR: Configure options --with-scalar-type=complex --with-clanguage=C++ PETSC_ARCH=arch-complex --with-fortran-kernels=generic --download-superlu_dist --download-mumps --download-scalapack --download-parmetis --download-metis
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: MatSetType() line 63 in /pic/projects/ds/petsc-dev.4.23.13/src/mat/interface/matreg.c
[0]PETSC ERROR: main() line 42 in src/mat/examples/tests/ex145.c
--------------------------------------------------------------------------
Thanks,
Shuangshuang
-----Original Message-----
From: Jed Brown [mailto:five9a2 at gmail.com] On Behalf Of Jed Brown
Sent: Wednesday, June 05, 2013 12:39 PM
To: Jin, Shuangshuang
Cc: petsc-users at mcs.anl.gov
Subject: RE: [petsc-users] a question about DAE Function
"Jin, Shuangshuang" <Shuangshuang.Jin at pnnl.gov> writes:
> I see. So for my IFunction which is called by TSSetIFunction, I can
> leave it as what it is right now (I mean scatter x and define
> equations), but for the IJacobian function which is called by
> TSSetIJacobian, I should define the Jacobian matrix as MATELEMENTAL
> type and set up its values accordingly?
Yes.
> My Jacobian matrix also use the values of the distributed array X.
> Generally, the benefit of MATELEMENTAL is to avoid the scattering of X
> to each processor inside the IJacobian function in each iteration by
> "using MatGetOwnershipIS() to determine which matrix entries are
> responsible for computing" and such?
The entries of the matrix might still have global dependence, but for dense problems, it's important to use a "2D" distribution.
MatGetOwnershipIS tells you which of those entries you are responsible for computing. The entries are in a place that will work well for the solve.
More information about the petsc-users
mailing list