Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

find_package(Coarray REQUIRED) breaks parallel caf build #7

Closed
milancurcic opened this issue May 5, 2019 · 2 comments
Closed

find_package(Coarray REQUIRED) breaks parallel caf build #7

milancurcic opened this issue May 5, 2019 · 2 comments

Comments

@milancurcic
Copy link
Member

@scivision Unfortunately, only tonight I realized that recent updates to CMakeLists.txt broke my local parallel build.

I didn't catch this before because it seemed to build successfully, but I haven't been paying attention to cmake output -- it's been building in -fcoarray=single mode exclusively.

If I do specify a path to my OpenCoarrays install dir, the cmake config fails altogether.

$ cmake .. -DOpenCoarrays_DIR=/home/milan/opt/OpenCoarrays-2.2.0/build/CMakeFiles
-- The Fortran compiler identification is GNU 8.3.1
-- Check for working Fortran compiler: /usr/bin/f95
-- Check for working Fortran compiler: /usr/bin/f95  -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/f95 supports Fortran 90
-- Checking whether /usr/bin/f95 supports Fortran 90 -- yes
-- Configuring build for 32-bit integers
-- Configuring build for 32-bit reals
CMake Error at /home/milan/opt/OpenCoarrays-2.2.0/build/CMakeFiles/OpenCoarraysConfig.cmake:1 (include):
  include could not find load file:

    /home/milan/opt/OpenCoarrays-2.2.0/build/CMakeFiles/OpenCoarraysTargets.cmake
Call Stack (most recent call first):
  cmake/Modules/FindCoarray.cmake:63 (find_package)
  CMakeLists.txt:57 (find_package)


-- Performing Test f08coarray
CMake Error at /home/milan/Work/modern-fortran/tsunami/build/CMakeFiles/CMakeTmp/CMakeLists.txt:15 (add_executable):
  Target "cmTC_54fd1" links to target "OpenCoarrays::caf_mpi" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?


CMake Error at /usr/share/cmake/Modules/CheckFortranSourceCompiles.cmake:132 (try_compile):
  Failed to generate test project build system.
Call Stack (most recent call first):
  cmake/Modules/FindCoarray.cmake:87 (check_fortran_source_compiles)
  CMakeLists.txt:57 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/milan/Work/modern-fortran/tsunami/build/CMakeFiles/CMakeOutput.log".

If I comment out find_package(Coarray REQUIRED) in CMakeLists.txt, then I can successfully configure and build in the old way:

FC=caf cmake ..

I expect this issue is something trivial as it works for you and it does on Travis. Let me know if you have an idea, otherwise I currently don't have the bandwidth to debug this.

@milancurcic
Copy link
Member Author

I began the transition to a more traditional, "directory-per-chapter" code organizations, and moving away from organization by git tag, see https://github.com/modern-fortran/tsunami/tree/refactor-by-chapter. I thought organizing by git tags would be useful (and I really enjoyed it in another book that inspired me to take that path), however it's become a nightmare to manage with the shifting around of chapters and what not. Also, based on 2nd external review, not many readers appreciate this style. Many also find friction with cmake so we'll be likely moving away from that as well, back to simpler, make-based builds.

Keeping this open for now, but will likely become a non-issue very soon

@milancurcic
Copy link
Member Author

Clean up done and now merged in master. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant