KarypisLab / METIS

METIS - Serial Graph Partitioning and Fill-reducing Matrix Ordering
Other
665 stars 134 forks source link

Missing gk_GetProcVmPeak in METIS 5.2.1 build #54

Open cponder opened 1 year ago

cponder commented 1 year ago

I'm trying to build METIS 5.2.1 and get this compilation-error:

[ 59%] Building C object programs/CMakeFiles/gpmetis.dir/gpmetis.c.o
cd /home/scratch.cponder_sw/Containers/ubuntu-pgi-openmpi.arm/Temp/METIS-5.2.1/build/programs && /usr/bin/cc  -I/home/scratch.cponder_sw/Containers/ubuntu-pgi-openmpi.arm/Temp/METIS-5.2.1/build/xinclude -I/home/scratch.cponder_sw/Containers/ubuntu-pgi-openmpi.arm/Temp/lib/include -I/home/scratch.cponder_sw/Containers/ubuntu-pgi-openmpi.arm/Temp/include -I/home/scratch.cponder_sw/Containers/ubuntu-pgi-openmpi.arm/Temp/METIS-5.2.1/programs/../libmetis -DLINUX -D_FILE_OFFSET_BITS=64 -std=c99 -fno-strict-aliasing -march=native -fPIC -Werror -Wall -pedantic -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unknown-pragmas -Wno-unused-label -DNDEBUG -DNDEBUG2 -DHAVE_EXECINFO_H -DHAVE_GETLINE -O3 -MD -MT programs/CMakeFiles/gpmetis.dir/gpmetis.c.o -MF CMakeFiles/gpmetis.dir/gpmetis.c.o.d -o CMakeFiles/gpmetis.dir/gpmetis.c.o -c /home/scratch.cponder_sw/Containers/ubuntu-pgi-openmpi.arm/Temp/METIS-5.2.1/programs/gpmetis.c
/home/scratch.cponder_sw/Containers/ubuntu-pgi-openmpi.arm/Temp/METIS-5.2.1/programs/gpmetis.c: In function ‘GPReportResults’:
/home/scratch.cponder_sw/Containers/ubuntu-pgi-openmpi.arm/Temp/METIS-5.2.1/programs/gpmetis.c:248:66: error: implicit declaration of function ‘gk_GetProcVmPeak’ [-Werror=implicit-function-declaration]
   printf("  proc/self/stat/VmPeak:\t %7.3"PRREAL" MB\n", (real_t)gk_GetProcVmPeak()/(1024.0*1024.0));
                                                                  ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
programs/CMakeFiles/gpmetis.dir/build.make:78: recipe for target 'programs/CMakeFiles/gpmetis.dir/gpmetis.c.o' failed
make[3]: *** [programs/CMakeFiles/gpmetis.dir/gpmetis.c.o] Error 1
make[3]: Leaving directory '/home/scratch.cponder_sw/Containers/ubuntu-pgi-openmpi.arm/Temp/METIS-5.2.1/build'
CMakeFiles/Makefile2:172: recipe for target 'programs/CMakeFiles/gpmetis.dir/all' failed
make[2]: *** [programs/CMakeFiles/gpmetis.dir/all] Error 2
make[2]: Leaving directory '/home/scratch.cponder_sw/Containers/ubuntu-pgi-openmpi.arm/Temp/METIS-5.2.1/build'
Makefile:138: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/scratch.cponder_sw/Containers/ubuntu-pgi-openmpi.arm/Temp/METIS-5.2.1/build'
Makefile:80: recipe for target 'install' failed
make: *** [install] Error 2

I'm using the configuration line

make config shared=1 prefix=$(realpath ..) gklib_path=...

where gklib_path is set to the lib directory from building GKLib 5.1.1 (note that there is no GKLib 5.2.1). From grep'ing the METIS 5.2.1 and GKlib 5.1.1 directories, I don't see any gk_GetProcVmPeak declared anywhere.

karypis commented 1 year ago

I'm working on a fix (you may want to try the dev branch of GKlib, built with shared=1). In the meantime, if you build Metis without shared=1, it should work.

robert-mijakovic commented 1 year ago

I face the same issue. Is there a patch released in the meantime?

robert-mijakovic commented 1 year ago

I've tried to use METIS 5.2.1 linked against GKlib as described above but it seg faults when used with MUMPS. The old release of METIS, 5.1.0 works fine.