When using
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCShellSetApply.html,
do I have the guaranty that xout from " PetscErrorCode apply ( PC pc, Vec xin,
Vec xout)" has always been previously filled with zeros ?
I may have to fill xout by blocks (I would += several possibly
I have a 3x3 global matrix is built (diag: 1, 2, 1): it's made of 2 overlapping
2x2 local matrix (diag: 1, 1).
Getting non assembled local matrix is OK with MatISGetLocalMat.
How to get assembled local matrix (initial local matrix + neigbhor
contributions on the borders) ? (expected result is d
Using PETSc MatIS, how to matmult a global IS matrix and a global vector ?
Example is attached : I don't get what I expect that is a vector such that
proc0 = [1, 2] and proc1 = [2, 1]
Franck
// Using PETSc MatIS, how to matmult a global IS matrix and a global vector ?
//
// A 3x3 global matrix
OK, thanks.
Franck
- Mail original -
> De: "Matthew Knepley"
> À: "Franck Houssen"
> Cc: "PETSc" , "PETSc"
> Envoyé: Dimanche 21 Mai 2017 18:41:10
> Objet: Re: [petsc-users] Is xout always already zero'ed when being call
, localSize, localIdx,
PETSC_COPY_VALUES, &is);
+ //MatGetLocalSubMatrix(A, is, is, &assembledLocalMat); // KO ?!...
}
+ MatView(assembledLocalMat, PETSC_VIEWER_STDOUT_WORLD); // Would like to get
=> Diag: 2, 1
- Mail original -
> De: "Stefano Zampini"
>
;Stefano Zampini"
> À: "Matthew Knepley"
> Cc: "Franck Houssen" , "PETSc"
> , "PETSc"
> Envoyé: Dimanche 21 Mai 2017 23:02:37
> Objet: Re: [petsc-dev] Using PETSc MatIS, how to matmult a global IS matrix
> and a global vector ?
> Fr
tthew Knepley"
> À: "Franck Houssen"
> Cc: "Stefano Zampini" , "PETSc"
> , "PETSc"
> Envoyé: Mardi 23 Mai 2017 13:21:21
> Objet: Re: [petsc-dev] Using PETSc MatIS, how to matmult a global IS matrix
> and a global vector ?
> On T
-
> De: "Stefano Zampini"
> À: "Franck Houssen"
> Cc: "petsc-dev" , "PETSc users list"
> , "petsc-maint"
> Envoyé: Mardi 23 Mai 2017 13:16:18
> Objet: Re: [petsc-dev] Using PETSc MatIS, how to get local matrix (= one
> doma
I let this small piece of code to demonstrate the basics If you believe
(like I do) that this is worth to be added to the available examples: feel free
to do it !...
Franck
- Mail original -
> De: "Franck Houssen"
> À: "Matthew Knepley"
> Cc: "
> De: "Matthew Knepley"
> À: "Franck Houssen"
> Cc: "Stefano Zampini" , "PETSc"
> , "PETSc"
> Envoyé: Mardi 23 Mai 2017 18:46:34
> Objet: Re: [petsc-dev] Using PETSc MatIS, how to matmult a global IS matrix
> and a globa
nal -
> De: "Stefano Zampini"
> À: "Franck Houssen"
> Cc: "petsc-dev" , "PETSc users list"
> , "petsc-maint"
> Envoyé: Mardi 23 Mai 2017 20:23:49
> Objet: Re: [petsc-dev] Using PETSc MatIS, how to get local matrix (= one
> do
eateIS(MPI_Comm comm,PetscInt bs,PetscInt M,PetscInt
N,ISLocalToGlobalMapping rmap,ISLocalToGlobalMapping cmap,Mat *A ) // Always
use PETSC_DECIDE backstage ?
Franck
- Mail original -----
> De: "Matthew Knepley"
> À: "Franck Houssen"
> Cc: "Stefano Zam
OK, this is working now ! As the API changed between the latest stable and the
master branch, I was actually not using the correct method.
Thanks Stefano,
Franck
- Mail original -
> De: "Stefano Zampini"
> À: "Franck Houssen"
> Cc: "petsc-de
How to VecView with a formatted precision (%10.8f) ? Not possible ?
Franck
ess [4]
4.93827e-06
-3.24e+06
- Mail original -
> De: "Jed Brown"
> À: "Franck Houssen" , "PETSc users list"
>
> Envoyé: Vendredi 26 Mai 2017 19:27:42
> Objet: Re: [petsc-users] How to VecView with a formatted precision (%10.8f) ?
>
>
Must I destroy the local matrix I have (created and) set with MatISSetLocalMat
?
Franck
If I use MatISSetLocalMat with a preallocated MatCreateSeqAIJ local matrix, do
I need to use MatISSetPreallocation for the global matrix ?
Here is the pseudo-code:
MatCreateIS(PETSC_COMM_WORLD, ..., &globalMat)
MatISSetPreallocation(globalMatrix, ...) // Is this necessary ?
MatCreateSeqAIJ(PE
When using MatIS, do I need to call MatAssemblyBegin/End between
MatISSetLocalMat (local set) and MatISGetMPIXAIJ (get global assembly) ?
Franck
How to VecScatter from global to local vector, and then, VecGather back ?
This is a very simple use case: I need to split a global vector in local
(possibly overlapping) pieces, then I need to modify each local piece (x2), and
finally I need to assemble (+=) back local parts into a global vecto
Hi,
I try to call MatISGetMPIXAIJ on a MatIS (A) that has been feed locally by
sequential (Aloc) dense matrix.
Seems this ends up with this error: [0]PETSC ERROR: New nonzero at (0,1) caused
a malloc. Is this a known error / limitation ? (not supposed to work with dense
matrix ?)
This (pseu
PetscScalar localVal[4] = {1., 0., 0., 1.};
< MatSetValues(Aloc, 2, localIdx, 2, localIdx, localVal, ADD_VALUES); // Add
local 2x2 matrix
---
> PetscScalar localVal[2] = {1., 0.}; PetscInt oneLocalRow = 0;
> MatSetValues(Aloc, 1, &oneLocalRow, 2, localIdx, localVal, ADD_VALUES)
nk);
PetscInt localIdx[2] = {0, 0};
- if (rank == 0) {localIdx[0] = 0; localIdx[1] = 1;}
+ if (rank == 0) {localIdx[0] = 0; localIdx[1] = 2;}
else {localIdx[0] = 1; localIdx[1] = 2;}
ISLocalToGlobalMapping rmap;
ISLocalToGlobalMappingCreate(PETSC_COMM_WORLD, 1, 2, localIdx,
PETSC_COPY_VALUES
1, PETSC_DECIDE, PETSC_DECIDE, 3, 3, rmap,
cmap, &A);
+ MatCreateIS(PETSC_COMM_WORLD, 1, PETSC_DECIDE, PETSC_DECIDE, size+1, size+1,
rmap, cmap, &A);
Mat Aloc;
if (matType == "csr") {cout << matType << endl;
MatCreateSeqAIJ(PETSC_COMM_SELF, 2, 2, 2, NULL, &Alo
OK.
Franck
- Mail original -
> De: "Stefano Zampini"
> À: "Franck Houssen"
> Cc: "PETSc users list"
> Envoyé: Mardi 20 Juin 2017 17:08:29
> Objet: Re: [petsc-users] Building MatIS with dense local matrix ?
> It should be fixed right
> À: "Franck Houssen"
> Cc: "PETSc users list"
> Envoyé: Mardi 20 Juin 2017 20:45:47
> Objet: Re: [petsc-users] Building MatIS with dense local matrix ?
> Franck,
> is it your "real" case working properly now?
> Stefano
> 2017-06-20 1
How to compute RARt with A and R as distributed (MPI) matrices ?
This works with sequential matrices.
The doc say "currently only implemented for pairs of AIJ matrices and classes
which inherit from AIJ": I supposed that MPIAIJ was someway inheriting from
AIJ, seems that it doesn't.
Is this
sized
enough in the doc, in particular for a new user (the matRARt and matPtAP pages
are the same with R replaced with Pt). Where was it possible to find this
information ?
Franck
- Mail original -
> De: "Dave May"
> À: "Franck Houssen" , "PETSc users lis
Thanks, I wouldn't have expected so much !
I have to say I am too far from the code to get all the details "behind" this
(I understand these details may be numerous and tricky - no problem).
If I got it well, in a near future, MatRARt could support both sequential and
distributed matrices, and,
The man page of slurm/sbatch is cumbersome.
But, you may think of :
1. tasks "as MPI processus"
2. cpus "as threads"
You should always set resources the most precise way when possible, that is
(never use --tasks but prefer) to:
1. use --nodes=n.
2. use --tasks-per-node=t.
3. use --cpus-per-tasks
really make sense as you do something
different (unless you fix t, and let c vary: even like that, you may not get
what you expect - anyway, seems it's not what you do).
Franck
- Mail original -
> De: "Damian Kaliszan"
> À: "Franck Houssen" , &quo
you name them according to methods, options,
...) "sizes" the informations that come from "neighbor proc" : my understanding
is that this information is mandatory for good local convergence and may impact
it (but I may be wrong)
- Mail original -
> De: "Dami
31 matches
Mail list logo