MatCreateMPIAIJ Pre-allocation Query

Tim Stitt timothy.stitt at ichec.ie
Sun Jun 17 12:55:23 CDT 2007


Matt,

Also at the end of the configure I get the following error:

characteristic.c:253: error: conflicting types for 
`CharacteristicSetVelocityInterpolation'
/ichec/home/staff/tstitt/builds/petsc/src/contrib/semiLagrange/characteristic.h:47: 
error: previous declaration of `CharacteristicSetVelocityInterpolation'
characteristic.c:268: error: conflicting types for 
`CharacteristicSetVelocityInterpolationLocal'
/ichec/home/staff/tstitt/builds/petsc/src/contrib/semiLagrange/characteristic.h:48: 
error: previous declaration of `CharacteristicSetVelocityInterpolationLocal'
characteristic.c:283: error: conflicting types for 
`CharacteristicSetFieldInterpolation'
/ichec/home/staff/tstitt/builds/petsc/src/contrib/semiLagrange/characteristic.h:49: 
error: previous declaration of `CharacteristicSetFieldInterpolation'
characteristic.c:302: error: conflicting types for 
`CharacteristicSetFieldInterpolationLocal'
/ichec/home/staff/tstitt/builds/petsc/src/contrib/semiLagrange/characteristic.h:50: 
error: previous declaration of 
`CharacteristicSetFieldInterpolationLocal'characteristic.c: In function 
`CharacteristicSolve':
characteristic.c:347: warning: passing arg 2 of `DAGetNeighborsRank' from 
incompatible pointer type
characteristic.c: At top level:
characteristic.c:732: error: conflicting types for `HeapSort'
characteristic.c:17: error: previous declaration of `HeapSort'
characteristic.c:769: error: conflicting types for `SiftDown'
characteristic.c:18: error: previous declaration of `SiftDown'
/usr/bin/ar: 'characteristic.o': No such file

This breaks the build.

Tim.

On Sunday 17 June 2007 18:27, Tim Stitt wrote:
> Cheers...perfect.
>
> On Sunday 17 June 2007 18:16, Matthew Knepley wrote:
> > On 6/17/07, Tim Stitt <timothy.stitt at ichec.ie> wrote:
> > > Matt,
> > >
> > > We are investigating 32-qubit fault-tolerant quantum computation which
> > > results in 2^32 basis states and hence our large Hamiltonian matrix.
> > >
> > > I just ran into problems passing 2^32 in as the global row an column
> > > argument so I assumed I need to rebuild PETSc to accept 64-bit
> > > integers.
> >
> > Yes, reconfigure with --with-64-bit-indices and rebuild. You can do
> > this in another
> > arch if you want to keep your old build using --PETSC_ARCH=<new arch
> > name>
> >
> >    Matt
> >
> > > Tim.
> > >
> > > On Sunday 17 June 2007 17:54, Matthew Knepley wrote:
> > > > On 6/17/07, Tim Stitt <timothy.stitt at ichec.ie> wrote:
> > > > > Actually my sparse matrix has >2^32 rows and columns hence the
> > > > > global row and column arguments need to be 64-bit.
> > > >
> > > > Cool. What problem is that big?
> > > >
> > > >   Matt
> > > >
> > > > > On Sunday 17 June 2007 17:36, Barry Smith wrote:
> > > > > >   If your problem is so big that you need integers that represent
> > > > > > numbers more than about 2 billion then yes you will need to
> > > > > > rebuild PETSc.
> > > > > >
> > > > > >   Barry
> > > > > >
> > > > > > You'll be the first PETSc user who solves a problem with more
> > > > > > than 2 billion unknowns.
> > > > > >
> > > > > > On Sun, 17 Jun 2007, Tim Stitt wrote:
> > > > > > > Thanks for that Matt...will check it out.
> > > > > > >
> > > > > > > Incidentally, I need to pass a 64-bit integer to
> > > > > > > MatCreateMPIAIJ. Do I need to rebuild PETSc using a 64-bit
> > > > > > > integer option switch?
> > > > > > >
> > > > > > > Tim.
> > > > > > >
> > > > > > > On Sunday 17 June 2007 17:07, Matthew Knepley wrote:
> > > > > > > > On 6/17/07, Tim Stitt <timothy.stitt at ichec.ie> wrote:
> > > > > > > > > Hi All,
> > > > > > > > >
> > > > > > > > > Currently I am using MatCreateMPIAIJ to create a
> > > > > > > > > distributed sparse matrix for use in my parallel sparse
> > > > > > > > > eigensolver. If I understand things correctly, it is
> > > > > > > > > important to specify the correct pre-allocation values for
> > > > > > > > > (o_nz,d_nz) or (o_nnz, d_nnz) respectively to obtain
> > > > > > > > > optimum memory usage per node.
> > > > > > > > >
> > > > > > > > > For information my matrix redistribution routine generates
> > > > > > > > > each row in the sparse matrix (associated with a given
> > > > > > > > > node) "on-the-fly" and then uses MatSetValues to apply the
> > > > > > > > > elements.
> > > > > > > > >
> > > > > > > > > My question is: does anyone have a standard code template
> > > > > > > > > for the calculating the d_nz or d_nnz values (along with
> > > > > > > > > o_nz or o_nnz respectively) so that optimum pre-allocation
> > > > > > > > > is obtained? Is there a simple way of determining if a
> > > > > > > > > given non-zero value in a row is part of the diagonal or
> > > > > > > > > off-diagonal regions for a given distributed topology?
> > > > > > > > >
> > > > > > > > > Any assistance gratefully received.
> > > > > > > >
> > > > > > > > Basically, you run through the construction algorithm once to
> > > > > > > > calculate d_nnz and o_nnz, and then again to set values. You
> > > > > > > > can see my code for doing it in preallocateOperator() in
> > > > > > > > src/dm/mesh/mesh.c.
> > > > > > > >
> > > > > > > >    Matt
> > > > > > > >
> > > > > > > > > Thanks in advance,
> > > > > > > > >
> > > > > > > > > Tim.
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Dr. Timothy Stitt <timothy_dot_stitt_at_ichec.ie>
> > > > > > > > > HPC Application Consultant - ICHEC (www.ichec.ie)
> > > > > > > > >
> > > > > > > > > Dublin Institute for Advanced Studies
> > > > > > > > > 5 Merrion Square - Dublin 2 - Ireland
> > > > > > > > >
> > > > > > > > > +353-1-6621333 (tel) / +353-1-6621477 (fax) /
> > > > > > > > > +353-874195427 (mobile)
> > > > >
> > > > > --
> > > > > Dr. Timothy Stitt <timothy_dot_stitt_at_ichec.ie>
> > > > > HPC Application Consultant - ICHEC (www.ichec.ie)
> > > > >
> > > > > Dublin Institute for Advanced Studies
> > > > > 5 Merrion Square - Dublin 2 - Ireland
> > > > >
> > > > > +353-1-6621333 (tel) / +353-1-6621477 (fax) / +353-874195427
> > > > > (mobile)
> > >
> > > --
> > > Dr. Timothy Stitt <timothy_dot_stitt_at_ichec.ie>
> > > HPC Application Consultant - ICHEC (www.ichec.ie)
> > >
> > > Dublin Institute for Advanced Studies
> > > 5 Merrion Square - Dublin 2 - Ireland
> > >
> > > +353-1-6621333 (tel) / +353-1-6621477 (fax) / +353-874195427 (mobile)

-- 
Dr. Timothy Stitt <timothy_dot_stitt_at_ichec.ie>
HPC Application Consultant - ICHEC (www.ichec.ie)

Dublin Institute for Advanced Studies
5 Merrion Square - Dublin 2 - Ireland

+353-1-6621333 (tel) / +353-1-6621477 (fax) / +353-874195427 (mobile)




More information about the petsc-users mailing list