I am using metis 5 with Fortran. I am using the PartGraphRecursive
function with the simple example given in the manual. The code is given as which is not the working condition.
program main
implicit none
integer,parameter::nvtxs=15, Edges=22
integer::xadj(nvtxs+1),adjncy(2*Edges)
integer::objval, part(nvtxs)
xadj=[0, 2, 5, 8, 11, 13, 16, 20, 24, 28, 31, 33, 36, 39, 42, 44]
adjncy=[1, 5, 0, 2, 6, 1, 3, 7, 2, 4, 8, 3, 9, 0, 6, 10, 1, 5, 7, 11, 2, 6, 8, 12, 3, 7, 9, 13, 4, 8, 14, 5, 11, 6, 10, 12, 7, 11, 13, 8, 12, 14, 9, 13]
call METIS_PartGraphRecursive(vortices,1,xadj,adjncy,,,,2,,,,objval,part)
end program main
Can anybody complete this code? I am not very clear how to use the different inputs to the METIS_PartGraphRecursive
call as most of the input I want to use is NULL.
P.S. I am using Linux with the pgf90
Fortran compiler and I am using the following command to compile and link the file.
Pgf90 –o main main.f90 libmetis.a
The libmetis.a file is in the same directory as main.