<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Fri, Aug 31, 2018 at 7:34 AM Giacomo Mulas <<a href="mailto:giacomo.mulas@inaf.it">giacomo.mulas@inaf.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello.<br>
<br>
I have a relatively silly problem: in a software I developed, which<br>
originally always used SLEPC, I now introduced support for using also<br>
scalapack and elpa as eigensolvers, in cases in which this is convenient. <br>
Is there a simple way to have PETSC create a matrix in blacs compatible<br>
format?<br>
<br>
Alternatively, I am thinking to use MatView to write the PETSC matrix to a<br>
file and then read it back.  This would also have the nice side-effect to<br>
enable me to separate the part of the code the sets up and creates the<br>
matrix from the part the calls the appropriate eigensolver.  The best thing<br>
would be to use MatView to write a binary file and then create a simple<br>
function to reread it, create a blacs matrix and populate it appropriately. <br>
In the docs for MatLoad() the format of binary files created by MatView is<br>
given in terms of int and PetscScalar values.  Now, since in some cases (on<br>
some machines) I compiled PETSC to use 64 bit indices, I need to be extra<br>
careful on what "int" means!  Is it just "int", or PetscInt, or<br>
PetscBLASInt, or...?  From a quick look at MatView_MPIAIJ_Binary() I would<br>
guess they are PetscInt and are written by calls to PetscBinaryWrite(),<br>
meaning I should use calls to PetscBinaryRead() to get them back.  Is this<br>
correct?<br></blockquote><div><br></div><div>Yes, that is all correct. I wonder if you could convince a) SLEPc to support Elpa,</div><div>or better convince Elpa to support Elemental. BLACS is icky inside :)</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks in advance<br>
Giacomo<br>
<br>
-- <br>
_________________________________________________________________<br>
<br>
Giacomo Mulas <<a href="mailto:giacomo.mulas@inaf.it" target="_blank">giacomo.mulas@inaf.it</a>><br>
_________________________________________________________________<br>
<br>
INAF - Osservatorio Astronomico di Cagliari<br>
via della scienza 5 - 09047 Selargius (CA)<br>
<br>
tel.   +39 070 71180255<br>
mob. : +39 329  6603810<br>
_________________________________________________________________<br>
<br>
"When the storms are raging around you, stay right where you are"<br>
                          (Freddy Mercury)<br>
_________________________________________________________________<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>