mpiwg-abi / specification-text-draft

A draft of the ABI specification text in Markdown.
MIT License
2 stars 2 forks source link

Support pkgconfig, avoid compiler wrappers #1

Open eschnett opened 1 year ago

eschnett commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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.