[petsc-users] METIS 5 in PETSc 3, 3 [not directly related to PETSc]

John Mousel john.mousel at gmail.com
Fri Jun 8 09:15:53 CDT 2012


Attaching the Valgrind output would probably help a lot.

On Fri, Jun 8, 2012 at 9:02 AM, Tabrez Ali <stali at geology.wisc.edu> wrote:

>  Thanks for your answer. Unfortunately its not that.
>
> Based on past experience I am sure I am overlooking something very simple
> but I cant seem to find out what. Btw METIS 4 worked fine before.
>
> On 06/08/2012 08:39 AM, John Mousel wrote:
>
> It's hard to tell from the info you provided, but you seem to be playing
> fast and loose with your type declarations. METIS is expecting real_t,
> which is a 32 bit real if you haven't changed the definition in metis.h. I
> know this has caused me problems in the past.
>
> On Fri, Jun 8, 2012 at 7:38 AM, Tabrez Ali <stali at geology.wisc.edu> wrote:
>
>> Sorry about a question not directly related to PETSc but has anyone here
>> been able to use the METIS 5.0 (that PETSc 3.3/dev downloads/builds) with
>> Fortran? There has been an API change from 4 to 5 but I am having some
>> trouble and METIS manual/forums havent been useful.
>>
>> For example consider the simple code (below) that partitions a two
>> element mesh made of linear quads into two. The elements are numbered 0 1 2
>> 3 and 1 4 5 2.It works fine with GNU FC (no valgrind errors). With Intel FC
>> it works fines (though valgrind throws a bunch of errors). However with PGI
>> compilers I get a segfault.
>>
>>  program test
>>  implicit none
>>  integer, parameter   :: nels=2, nnds=6, npel=4
>>  integer              :: eptr(nels+1), nodes(nels*npel), epart(nels),
>> npart(nnds), n
>>  integer, pointer     :: vwgt(:)=>null(), vsize(:)=>null(),
>> mopts(:)=>null()
>>  real(8), pointer     :: tpwgts(:)=>null()
>>  eptr=(/0,4,7/)
>>  nodes=(/0,1,2,3,1,4,5,2/)
>>  call
>> METIS_PartMeshNodal(nels,nnds,eptr,nodes,vwgt,vsize,2,tpwgts,mopts,n,epart,npart)
>>  print*, npart; print*, epart
>> end program test
>>
>> According to the manual moving from METIS 4 to 5 only involves passing
>> some additional nulls. I am not sure what I missed.
>>
>> http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/manual.pdf
>>
>> Thanks in advance.
>>
>> Tabrez
>>
>
> --
> No one trusts a model except the one who wrote it; Everyone trusts an observation except the one who made it- Harlow Shapley
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120608/c01b56b4/attachment-0001.html>


More information about the petsc-users mailing list