ECP-copa / CabanaMD

Molecular dynamics proxy application based on Cabana
Other
19 stars 14 forks source link

Use Kokkos/Cabana CMake targets #32

Closed streeve closed 4 years ago

streeve commented 4 years ago

Update CMake and Travis to use recent Kokkos 3.0 update to CMake and Cabana CMake targets (ECP-copa/Cabana#165)

streeve commented 4 years ago

Will update Travis with new Cabana flags from ECP-copa/Cabana#199 when merged

streeve commented 4 years ago

@sslattery I tried to add a check of Cabana_ENABLE_MPI since it's required for CabanaMD, but it's blank. Am I missing something?

sslattery commented 4 years ago

@sslattery I tried to add a check of Cabana_ENABLE_MPI since it's required for CabanaMD, but it's blank. Am I missing something?

That might not be getting added to our CMake config output. I'll take a look

sslattery commented 4 years ago

So looks like we don't export that. Instead we do this in the CabanaConfig.cmake which will get installed after a build:

include(CMakeFindDependencyMacro)
find_dependency(Kokkos REQUIRED)
if(ON)
  find_dependency(MPI REQUIRED CXX)
endif()
include("${CMAKE_CURRENT_LIST_DIR}/Cabana_Targets.cmake")

Notice the if(ON) because I have an MPI build locally. Would it help if we added that as an exported cmake variable?

sslattery commented 4 years ago

Also for reference I am planning on requiring MPI in the near future.

streeve commented 4 years ago

Also for reference I am planning on requiring MPI in the near future.

Ok, in that case I won't need it. I'll rely on your checks (and inherit the MPI from Cabana?)

sslattery commented 4 years ago

Ok, in that case I won't need it. I'll rely on your checks (and inherit the MPI from Cabana?)

I think that is reasonable for now. In the future you will know you always have MPI.