You are not logged in.
I'm trying to use GridapPETSc.jl in Julia, but I can't get it to precompile due to a missing shared library: `libmpifort.so.12`.
When I check dependencies using:
ldd ~/.julia/artifacts/b69bd31eee9ae9df45bca608ccbe4bf8816ff841/lib/libpetsc_double_real_Int32.soI get:
linux-vdso.so.1 (0x0000729dd8902000)
libopenblas.so => /usr/lib/libopenblas.so (0x0000729dd5328000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x0000729dd88bb000)
libm.so.6 => /usr/lib/libm.so.6 (0x0000729dd87c3000)
libmpifort.so.12 => not found #Missing
libmpi.so.12 => not found #Missing
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0000729dd5000000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x0000729dd87bc000)
libgfortran.so.5 => /usr/lib/libgfortran.so.5 (0x0000729dd4c00000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x0000729dd52fa000)
libquadmath.so.0 => /usr/lib/libquadmath.so.0 (0x0000729dd52b0000)
libc.so.6 => /usr/lib/libc.so.6 (0x0000729dd4a0e000)
libgomp.so.1 => /usr/lib/libgomp.so.1 (0x0000729dd4fad000)
/usr/lib64/ld-linux-x86-64.so.2 (0x0000729dd8904000)I've tried reinstalling PETSc, clearing the cache and recompling and rebuilding Julia packages, but nothing has fixed it. From what I understand, `libmpifort.so.12` is related to OpenMPI. I have `openmpi` installed, but the library is still missing.
I also tried searching for the missing library using:
sudo find / -name "libmpifort.*"This returned:
/home/albert/.julia/artifacts/c966628fec5920ed29dac4665ef42a2f28e9ab0e/lib/libmpifort.so
/home/albert/.julia/artifacts/c966628fec5920ed29dac4665ef42a2f28e9ab0e/lib/libmpifort.so.12.4.2
/home/albert/.julia/artifacts/c966628fec5920ed29dac4665ef42a2f28e9ab0e/lib/libmpifort.so.12
/home/albert/.julia/artifacts/e85c0a68e07fee0ee7b19c2abc210b1af2f4771a/lib/libmpifort.so
/home/albert/.julia/artifacts/e85c0a68e07fee0ee7b19c2abc210b1af2f4771a/lib/libmpifort.so.12.4.3
/home/albert/.julia/artifacts/e85c0a68e07fee0ee7b19c2abc210b1af2f4771a/lib/libmpifort.so.12
/home/albert/.julia/artifacts/85872a85ffbef674cf34f0cd9eb853f89e881692/lib/libmpifort.so.12.5.0
/home/albert/.julia/artifacts/85872a85ffbef674cf34f0cd9eb853f89e881692/lib/libmpifort.so
/home/albert/.julia/artifacts/85872a85ffbef674cf34f0cd9eb853f89e881692/lib/libmpifort.so.12
find: ‘/run/user/1000/doc’: Ikke tilgang
find: ‘/run/user/1000/gvfs’: Ikke tilgangit seems like `libmpifort.so.12` exists inside Julia’s artifact directories but isn't found by the system.
Does anyone know how to properly resolve this or what i can do next to learn more? Should I install a specific package or manually link something?
Last edited by Albertba (2025-03-03 14:34:38)
Offline
$ pacman -F libmpi.so.12 libmpifort.so.12
extra/intel-oneapi-basekit 2025.0.1.46-1
opt/intel/oneapi/2025.0/lib/libmpi.so.12
opt/intel/oneapi/2025.0/lib/mpi/debug/libmpi.so.12
opt/intel/oneapi/mpi/2021.14/lib/libmpi.so.12
opt/intel/oneapi/mpi/2021.14/lib/mpi/debug/libmpi.so.12
extra/intel-oneapi-basekit 2025.0.1.46-1
opt/intel/oneapi/2025.0/lib/libmpifort.so.12
opt/intel/oneapi/mpi/2021.14/lib/libmpifort.so.12
$ Try installing intel-oneapi-basekit .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Thanks! I didn't know about -F seems very useful.
OpenMPI and `intel-base-kit` are in conflict, so I removed OpenMPI and followed your instructions. However, this resulted in a new error:
ERROR: LoadError: InitError: could not load symbol ompi_mpi_comm_null:It seems that PETSc depends on OpenMPI. In fact, a lot of Julia packages seem to prefer OpenMPI. AUR also builds PETSc with OpenMPI in mind rather than intel-oneapi-basekit.
What seems strange to me is that all these packages rely on OpenMPI, but libmpifort isn’t provided with it. As a result, when PETSc is precompiled, it crashes because it can't find the libmpifort.so file.
What should I do?
Offline
Are you using the upstream julia package or the Arch one?
Offline
"I'm using the Arch package, specifically julia-bin
Offline
"I'm using the Arch package, specifically julia-bin
That's not the Arch package, that *is* the upstream one. So you should probably take this upstream.
Offline
So what's wrong w/ https://archlinux.org/packages/extra/x86_64/julia/ ?
Alternatively
ldd ~/.julia/artifacts/b69bd31eee9ae9df45bca608ccbe4bf8816ff841/lib/libpetsc_double_real_Int32.soI guess /home/albert/.julia/artifacts/*/lib/libmpifort.so.* are symlinks and you want/need one in ~/.julia/artifacts/b69bd31eee9ae9df45bca608ccbe4bf8816ff841/lib since that's probably in the LD_LIBRARY_PATH ?
Offline
I deleted julia-bin and installed Julia from upstream After that, everything worked as intended. I’m not sure how, but it resolved the issue
Offline