Open rouson opened 2 years ago
Commenting out lines 1-2 in tests/unit/teams/CMakeLists.txt
eliminates the above two errors and leaves one similar error (see below), which in turn can be eliminated by commenting out line 3 in the same file. Each of the aforementioned lines invokes the function defined at line 563 in the project root CMakeLists.txt file. I suspect that the ultimate cause is related to the fact that I moved the entire tests
directory from its previous location just inside src
one level up to the project root directory. Otherwise, one of the biggest changes is that we recently recently released version 2.10.0, which adds support for building natively on Windows (without requiring Windows Subsystem for Linux).
/Users/rouson/Repositories/sourceryinstitute/tmp/opencoarrays/tests/unit/teams/get-communicator.F90:32:7:
32 | use opencoarrays, only : get_communicator
| 1
Fatal Error: Cannot open module file 'opencoarrays.mod' for reading at (1): No such file or directory
compilation terminated.
Error: comand:
`/usr/local/bin/gfortran-11 -fcoarray=lib -Wl,-flat_namespace -Wl,-commons,use_dylibs -L/usr/local/Cellar/libevent/2.1.12/lib -I/usr/local/Cellar/open-mpi/4.1.4/include -I/usr/local/Cellar/open-mpi/4.1.4/lib -DPREFIX_NAME=_gfortran_caf_ -DGCC_GE_7 -DGCC_GE_8 -DHAVE_MPI -DMPI_WORKING_MODULE -O3 -DNDEBUG -O3 -o /Users/rouson/Repositories/sourceryinstitute/tmp/opencoarrays/build/bin/OpenCoarrays-2.10.0-17-g7f75c50-tests/get_communicator /Users/rouson/Repositories/sourceryinstitute/tmp/opencoarrays/tests/unit/teams/get-communicator.F90 /Users/rouson/Repositories/sourceryinstitute/tmp/opencoarrays/build/lib/libopencoarrays_test_utilities.a /Users/rouson/Repositories/sourceryinstitute/tmp/opencoarrays/build/lib/libopencoarrays_mod.a /Users/rouson/Repositories/sourceryinstitute/tmp/opencoarrays/build/lib/libcaf_mpi.a /usr/local/Cellar/open-mpi/4.1.4/lib/libmpi_usempif08.dylib /usr/local/Cellar/open-mpi/4.1.4/lib/libmpi_usempi_ignore_tkr.dylib /usr/local/Cellar/open-mpi/4.1.4/lib/libmpi_mpifh.dylib /usr/local/Cellar/open-mpi/4.1.4/lib/libmpi.dylib`
failed to compile.
make[2]: *** [tests/unit/teams/get_communicator] Error 1
make[1]: *** [tests/unit/teams/CMakeFiles/build_get_communicator.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 77%] Built target build_image_fail_and_sync_test_2
[ 77%] Built target build_image_fail_and_sync_test_3
[ 77%] Built target build_image_fail_and_status_test_1
[ 77%] Built target build_image_fail_and_get_test_1
[ 77%] Built target build_image_fail_and_failed_images_test_1
[ 77%] Built target build_image_fail_and_stopped_images_test_1
[ 77%] Built target build_teams_coarray_get
make: *** [all] Error 2
The failure occurs in a custom command that invokes the bin/caf
tool. That builds module-consuming code outside of CMake's code model, so module (include) directories need to be handled explicitly. See explanation in https://github.com/sourceryinstitute/OpenCoarrays/pull/758#pullrequestreview-1006079316.
What happened
A test failed to compile because
make
couldn't find a required.mod
file that is in the build tree.System Information
Step-by-step reproduction of the error
With Homebrew installed, execute
for which the trailing output is