Closed rouson closed 2 years ago
After fiddling around with it on my Linux machine, I can make the following observations.
I found a place that MPICC
and MPIFC
were mixed up in the install.sh
script. I've already pushed a commit to fix that.
The install.sh
is trying to use caf
to build OpenCoarrays. On my machine I get the following error for that.
+ /home/brad/.local/bin/caf -c example/hello.f90 -Wall -Wextra -Wimplicit-interface -fPIC -fmax-errors=1 -g -fcheck=bounds -fcheck=array-temps -fbacktrace -J build/caf_3E83561A255DFE60 -Ibuild/caf_3E83561A255DFE60 -o build/caf_3E83561A255DFE60/opencoarrays/example_hello.f90.o
Failed to find static library /home/brad/.local/lib/libopencoarrays.a or shared library alternatives.
Error in /home/brad/.local/bin/caf in function . on line 224. Please report this error at http://bit.ly/OpenCoarrays-new-issue
It looks like caf
isn't exiting with a non-zero status, so fpm doesn't detect the failure and keeps on going. By the time it gets to the archive command, none (most) of the object files haven't actually been created.
I tried switching to using mpifort
directly, but it needs the right compile and link flags for that to work properly (I think), because I get warnings like the following.
+ /usr/bin/mpifort -c example/hello.f90 -Wall -Wextra -Wimplicit-interface -fPIC -fmax-errors=1 -g -fcheck=bounds -fcheck=array-temps -fbacktrace -fcoarray=single -J build/mpifort_2A42023B310FA28D -Ibuild/mpifort_2A42023B310FA28D -o build/mpifort_2A42023B310FA28D/opencoarrays/example_hello.f90.o
f951: Warning: Nonexistent include directory '/usr/lib/x86_64-linux-gnu/openmpi/lib/../../fortran/gfortran-mod-15/openmpi' [-Wmissing-include-dirs]
I also think there might be something wrong with my openmpi installation, because I get the following error.
+ /usr/bin/mpicc -c ././src/mpi-runtime/mpi_caf.c -DPREFIX_NAME=_gfortran_caf_ -DGCC_GE_7 -DGCC_GE_8 -o build/mpifort_EA4E6F5B6A428512/opencoarrays/src_mpi-runtime_mpi_caf.c.o
././src/mpi-runtime/mpi_caf.c:46:10: fatal error: mpi.h: No such file or directory
46 | #include <mpi.h>
| ^~~~~~~
compilation terminated.
I think we should put our heads together on this one. Let's try and get on a call some time today.
System information including:
gfortran
11.3gcc
11.3./install.sh
uname -a
:Darwin CLaSS.local 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:45:05 PDT 2022; root:xnu-8020.101.4~15/RELEASE_X86_64 x86_64
(something similar happens on Linux)brew install open-mph
To help us debug your issue please explain:
What happened (include command output, screenshots, logs, etc.)
Running
.install.sh
builds and installs~/.local/bin/caf
,~/.local/bin/cafrun
but emits linker errors if the formand several messages about other files missing. In each case, a similarly-named file with
.digest
appended at the end of the file name is present in the build tree.What you expected to happen
A successful build and installation of
libopencoarrays.a
.Step-by-step reproduction instructions to reproduce the error/bug