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

Support pkgconfig, avoid compiler wrappers #1

Open
eschnett opened this issue Feb 10, 2023 · 2 comments
Open

Support pkgconfig, avoid compiler wrappers #1

eschnett opened this issue Feb 10, 2023 · 2 comments

Comments

@eschnett
Copy link

MPI code is typically built via compiler wrappers such as mpicc. This makes MPI "special", although it doesn't need to be on modern systems. (For example, cmake calls mpicc to extract the compiler and linker options.) In the end this means that configuring how to use MPI is often more difficult than using other libraries, e.g. HDF5 or PETSc.

An MPI ABI that also specifies the names of include files and libraries is a good opportunity to also simplify configuring MPI-using applications. I propose that we suggest that the MPI ABI be described in a pkgconfig file named mpi_abi.pc, and that we recommend to application developers to prefer to use this file to determine how to configure their application for the MPI ABI library.

I would also explicitly recommend against providing or compiler wrappers such mpi_abi_cc, mpicc --abi, etc.

@jeffhammond
Copy link
Member

I don't believe the MPI standard talks about mpicc now and I don't intend to change that. Implementations have converged on a solution but it's strictly an optional convenience, because users are lazy and don't want to read documentation.

Wrappers are not required and MPI is just like any other library. That users do not avail themselves of that is not the fault of the MPI standard.

I've been building NWChem without the wrappers for over a decade because the wrappers used to break the NWChem build system in subtle ways, so I know they're not now, nor have they ever been essential.

@jeffhammond
Copy link
Member

Is .pc standardized anywhere or is it just a Linux thing? If it's not a standard, it's not going into the specification. An MPI side document is the right place for that, if it's even necessary.

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

2 participants