cburstedde / libsc

The "sc" auxiliary library
www.p4est.org/
GNU Lesser General Public License v2.1
36 stars 34 forks source link

Do not require compile-time MPI constants for configure #117

Closed sloede closed 1 year ago

sloede commented 1 year ago

The MPI standard does not mandate constants to be compile-time constants, but only to be link-time constants. In the current setup for configure, however, MPI constants are used in a C switch statement, for which they need to be compile-time constants.

This PR tries to remedy this by using if statements instead of switches.

@jmark Can you please check if this patch fixes your issue in https://github.com/cburstedde/p4est/issues/197?

jmark commented 1 year ago

@sloede @cburstedde

The change from case- (https://github.com/cburstedde/libsc/commit/cfc2ca3cde30950d57287d3c63f0d062afc3632e) to if-statements did the trick.

Also, I added a workaround for the error

--enable-mpi given but neither mpirun nor mpiexec found

on the x86_64-w64-mingw32-mpi+microsoftmpi platform.

Basically reverting to the original state before this error message was added in https://github.com/cburstedde/libsc/commit/483980fe725ad3ea5a68a54cfd5ef9f405071267.

cburstedde commented 1 year ago

Thanks all! Good catch. If you would please rebase such that the accidental file additions disappear?

jmark commented 1 year ago

Thanks all! Good catch. If you would please rebase such that the accidental file additions disappear?

Hope I've done that right.

@sloede Commits should be ready to merge.

cburstedde commented 1 year ago

Thanks all! Good catch. If you would please rebase such that the accidental file additions disappear?

Hope I've done that right.

@sloede Commits should be ready to merge.

Awesome; may I also ask the two of you to add the usual author files under doc?

sloede commented 1 year ago

Awesome; may I also ask the two of you to add the usual author files under doc?

Done, both author files have been added.

cburstedde commented 1 year ago

Thanks so much; I appreciate your working together on this.