Issue with compilation in Arch

Discussion about building and installing Elmer
Post Reply
gforti
Posts: 77
Joined: 11 Jan 2022, 20:39
Antispam: Yes

Issue with compilation in Arch

Post by gforti »

Hello all,

I am trying to compile Elmer in Arch (endeavourOS) and I am getting the following error:

When i compile without MPI it builds ok.

Code: Select all

[ 70%] Linking Fortran executable Radiators
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `SCOTCH_stratExit'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `scotchfgraphpart_'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `esmumpsv'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `SCOTCH_graphOrder'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `scotchfgraphbuild_'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `SCOTCH_stratInit'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `SCOTCH_graphBuild'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `scotchfgraphexit_'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `SCOTCH_graphExit'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `scotchfstratinit_'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `esmumps'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `scotchfstratexit_'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `SCOTCH_graphInit'
collect2: error: ld returned 1 exit status
make[2]: *** [fem/src/CMakeFiles/ViewFactors.dir/build.make:133: fem/src/ViewFactors] Error 1
make[1]: *** [CMakeFiles/Makefile2:16678: fem/src/CMakeFiles/ViewFactors.dir/all] Error 2
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `SCOTCH_stratExit'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `scotchfgraphpart_'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `esmumpsv'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `SCOTCH_graphOrder'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `scotchfgraphbuild_'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `SCOTCH_stratInit'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `SCOTCH_graphBuild'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `scotchfgraphexit_'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `SCOTCH_graphExit'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `scotchfstratinit_'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `esmumps'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `scotchfstratexit_'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/libmumps_common.so: undefined reference to `SCOTCH_graphInit'
collect2: error: ld returned 1 exit status
make[2]: *** [fem/src/CMakeFiles/Radiators.dir/build.make:133: fem/src/Radiators] Error 1
make[1]: *** [CMakeFiles/Makefile2:16715: fem/src/CMakeFiles/Radiators.dir/all] Error 2
[ 70%] Linking Fortran shared library AdvectionReaction.so
[ 70%] Built target AdvectionReaction
[ 70%] Linking Fortran shared library AdvectionDiffusion.so
[ 70%] Built target AdvectionDiffusion
[ 70%] Linking Fortran shared library ArteryOutlet.so
[ 70%] Built target ArteryOutlet
[ 70%] Linking Fortran shared library Acoustics.so
[ 70%] Built target Acoustics
make: *** [Makefile:166: all] Error 2
kevinarden
Posts: 2316
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Issue with compilation in Arch

Post by kevinarden »

looks like the problem is Mumps. try it with mpi on and Mumps off to verify.
gforti
Posts: 77
Joined: 11 Jan 2022, 20:39
Antispam: Yes

Re: Issue with compilation in Arch

Post by gforti »

It worked like that. MPI TRUE; Mumps FALSE
kevinarden
Posts: 2316
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Issue with compilation in Arch

Post by kevinarden »

If you do not use Mumps, than you can go like that. If you want Mumps than you Mumps installation is not complete. You probably need the development libraries of Mumps.

On Ubuntu it is

sudo apt-get ibmetis-dev
sudo apt-get install libmumps-dev
sudo apt-get install libparmetis-dev
gforti
Posts: 77
Joined: 11 Jan 2022, 20:39
Antispam: Yes

Re: Issue with compilation in Arch

Post by gforti »

I changed the mumps installation (AUR mumps to mumps-par) and now the error is different:

(mumps-par: Sparse solver library using Gaussian elimination, with parmetis implementation)

Code: Select all

 70%] Built target AdvectionReaction
/usr/bin/ld: libelmersolver.so: undefined reference to `scotchfdgraphcorderinit_'
/usr/bin/ld: libelmersolver.so: undefined reference to `scotchfdgraphexit_'
/usr/bin/ld: libelmersolver.so: undefined reference to `SCOTCH_stratExit'
/usr/bin/ld: libelmersolver.so: undefined reference to `scotchfgraphpart_'
/usr/bin/ld: libelmersolver.so: undefined reference to `esmumpsv'
/usr/bin/ld: libelmersolver.so: undefined reference to `SCOTCH_graphOrder'
/usr/bin/ld: libelmersolver.so: undefined reference to `scotchfdgraphorderexit_'
/usr/bin/ld: libelmersolver.so: undefined reference to `scotchfgraphbuild_'
/usr/bin/ld: libelmersolver.so: undefined reference to `SCOTCH_stratInit'
/usr/bin/ld: libelmersolver.so: undefined reference to `SCOTCH_graphBuild'
/usr/bin/ld: libelmersolver.so: undefined reference to `scotchfgraphexit_'
/usr/bin/ld: libelmersolver.so: undefined reference to `scotchfstratdgraphorder_'
/usr/bin/ld: libelmersolver.so: undefined reference to `scotchfdgraphbuild_'
/usr/bin/ld: libelmersolver.so: undefined reference to `SCOTCH_dgraphInit'
/usr/bin/ld: libelmersolver.so: undefined reference to `scotchfdgraphordergather_'
/usr/bin/ld: libelmersolver.so: undefined reference to `scotchfdgraphcorderexit_'
/usr/bin/ld: libelmersolver.so: undefined reference to `SCOTCH_graphExit'
/usr/bin/ld: libelmersolver.so: undefined reference to `scotchfdgraphorderinit_'
/usr/bin/ld: libelmersolver.so: undefined reference to `scotchfstratinit_'
/usr/bin/ld: libelmersolver.so: undefined reference to `esmumps'
/usr/bin/ld: libelmersolver.so: undefined reference to `scotchfstratexit_'
/usr/bin/ld: libelmersolver.so: undefined reference to `scotchfdgraphordercompute_'
/usr/bin/ld: libelmersolver.so: undefined reference to `SCOTCH_graphInit'
collect2: error: ld returned 1 exit status
make[2]: *** [fem/src/CMakeFiles/ViewFactors.dir/build.make:133: fem/src/ViewFactors] Error 1
make[1]: *** [CMakeFiles/Makefile2:16678: fem/src/CMakeFiles/ViewFactors.dir/all] Error 2
[ 70%] Linking Fortran shared library AdvectionDiffusion.so
[ 70%] Built target AdvectionDiffusion
[ 70%] Linking Fortran shared library ArteryOutlet.so
[ 70%] Built target ArteryOutlet
[ 70%] Linking Fortran shared library Acoustics.so
[ 70%] Built target Acoustics
make: *** [Makefile:166: all] Error 2
kevinarden
Posts: 2316
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Issue with compilation in Arch

Post by kevinarden »

I think it still lacks the developmental libraries for Mumps which allows you to compile programs with Mumps. The normal libraries are just for users with pre-compiled programs.
gforti
Posts: 77
Joined: 11 Jan 2022, 20:39
Antispam: Yes

Re: Issue with compilation in Arch

Post by gforti »

I did install the listed dependencies (metis and parmetis), still didn't work. Guess I will live without Mumps.

Thanks for the help.
Post Reply