25 integer(kind=kint),
intent(in):: neqns
26 integer(kind=kint),
intent(in):: adj0(:)
27 integer(kind=kint),
intent(in):: xadj(:)
28 integer(kind=kint),
intent(out):: perm(:)
29 integer(kind=kint),
intent(out):: invp(:)
31 #ifdef HECMW_WITH_METIS
33 # if HECMW_METIS_VER == 5
35 integer(kind=kint),
allocatable:: vwght(:)
36 integer(kind=kint):: options(40)
37 integer(kind=kint):: ierror
39 allocate(vwght(neqns),stat=ierror)
40 if ( ierror/=0 ) stop
"ALLOCATION ERROR, vwght: SUB. gennd"
44 call metis_setdefaultoptions(options)
48 call metis_nodend(neqns,xadj,adj0,vwght,options,perm,invp)
52 # elif HECMW_METIS_VER == 4
54 integer(kind=kint):: numflag
55 integer(kind=kint):: options(8)
60 call metis_nodend(neqns,xadj,adj0,numflag,options,perm,invp)
63 # error unknown HECMW_METIS_VER
67 stop
"METIS not available"