ddemidov/amgcl

Compilation AMGCL problem on AMD architectur with scotch library

pelyakim opened this issue · 2 comments

Hello, I try to compile AMGCL with scotch but I have problems with the examples:

 [ 43% ] Linking CXX executable mpi_solver
/lus/home/pelyakime/AMGCL/scotch-v7.0.3/build/install/lib/libptscotch.a(library_dgraph_map.c.o): In function `SCOTCH_st ratDgraphMapBuild':
library_dgraph_map.c:(.text+0x1a3): undefined reference to `_SCOTCHstringSubst'
library_dgraph_map.c:(.text+0x1e1): undefined reference to `_SCOTCHstringSubst'
library_dgraph_map.c:(.text+0x1f3): undefined reference to `_SCOTCHstringSubst'
library_dgraph_map.c:(.text+0x205): undefined reference to `_SCOTCHstringSubst'
library_dgraph_map.c:(.text+0x217): undefined reference to `_SCOTCHstringSubst'
/lus/home/pelyakime/AMGCL/scotch-v7.0.3/build/install/lib/libptscotch.a(library_dgraph_map.c.o):library_dgraph_map.c:(. text+0x229): more undefined references to `_SCOTCHstringSubst' follow
/lus/home/pelyakime/AMGCL/scotch-v7.0.3/build/install/lib/libptscotch.a(library_dgraph_map.c.o): In function `SCOTCH_dg raphMapCompute':

I compiled scotch v7.0.3 and tried also with v7.0.1, I have the impression that the problem comes from scotch. What do you advise me to do? Thanks for your help.

I don't have much experience with using scotch library, but this indeed looks like there were some compilation issues with scotch. Scotch is found in amgcl using this file: https://github.com/ddemidov/amgcl/blob/master/cmake/FindScotch.cmake

It should define thse (advanced) cmake variables: Scotch_INCLUDES, Scotch_LIBRARIES, PTScotch_INCLUDES, PTScotch_LIBRARIES. Do you see these in cmake-gui? Do they have reasonable values?

If amgcl have troubles finding scotch, you can help it by defining environment variables SCOTCHDIR and PTSCOTCHDIR. These paths should contain scotch.h and ptscotch.h (possibly under scotch/ptcotch subfolders)