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.<br>
<br><div class="gmail_quote">On Fri, Jun 8, 2012 at 7:38 AM, Tabrez Ali <span dir="ltr"><<a href="mailto:stali@geology.wisc.edu" target="_blank">stali@geology.wisc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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.<br>

<br>
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.<br>

<br>
 program test<br>
  implicit none<br>
  integer, parameter   :: nels=2, nnds=6, npel=4<br>
  integer              :: eptr(nels+1), nodes(nels*npel), epart(nels), npart(nnds), n<br>
  integer, pointer     :: vwgt(:)=>null(), vsize(:)=>null(), mopts(:)=>null()<br>
  real(8), pointer     :: tpwgts(:)=>null()<br>
  eptr=(/0,4,7/)<br>
  nodes=(/0,1,2,3,1,4,5,2/)<br>
  call METIS_PartMeshNodal(nels,nnds,<u></u>eptr,nodes,vwgt,vsize,2,<u></u>tpwgts,mopts,n,epart,npart)<br>
  print*, npart; print*, epart<br>
end program test<br>
<br>
According to the manual moving from METIS 4 to 5 only involves passing some additional nulls. I am not sure what I missed.<br>
<br>
<a href="http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/manual.pdf" target="_blank">http://glaros.dtc.umn.edu/<u></u>gkhome/fetch/sw/metis/manual.<u></u>pdf</a><br>
<br>
Thanks in advance.<span class="HOEnZb"><font color="#888888"><br>
<br>
Tabrez<br>
</font></span></blockquote></div><br>