MxUI / MUI

Multiscale Universal Interface: A Concurrent Framework for Coupling Heterogeneous Solvers
http://mxui.github.io/
Apache License 2.0
54 stars 40 forks source link

configure/install as header-only #106

Open olesenm opened 5 months ago

olesenm commented 5 months ago

General wishlist and/or misc notes. No immediate action (or any action) required.

looked a bit at the interface while trying to understand some integration code. From what I can see, in the non-fortran case and others the MUI code will be installed as a header only configuration. In this case, the header is in fact independent of the MPI vendor and version. So following snippet is actually irrelevant:

find_package(MPI REQUIRED)
if(MPI_FOUND)
        include_directories(SYSTEM ${MPI_INCLUDE_PATH})
elseif(NOT MPI_FOUND)
        message(SEND_ERROR "MPI not found")
endif(MPI_FOUND)

Not sure what exactly the conditions would be, but seems like having

install(TARGETS MUI EXPORT muiTargets INCLUDES DESTINATION include LIBRARY DESTINATION lib)

might be able to change to this in that case:

install(TARGETS MUI EXPORT muiTargets INCLUDES DESTINATION include)

Not really sure if the "*.f90" install pattern is relevant for non-fortran.

Wendi-L commented 4 months ago

Thank you very much, @olesenm, for sharing your observations and suggestions. We'll look into each point you've raised as part of our next release due in the coming months.

You are absolutely correct that MUI operates as a C++ header-only code, independent of the MPI vendor and version. The only prerequisites are support for at least C++11 and the availability of a version of MPI. Currently, all wrappers (Fortran, C, and Python) need compilation to generate either static or dynamic libraries.

I will conduct experiments and implement your suggestions in due course.