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

Tabrez Ali stali at geology.wisc.edu
Fri Jun 8 07:38:13 CDT 2012


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


More information about the petsc-users mailing list