cburstedde / libsc

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

development branch does not compile with MPITrampoline #170

Closed jmark closed 7 months ago

jmark commented 8 months ago

The development branch cannot be compiled with the MPITrampoline ABI wrapper: https://github.com/eschnett/MPItrampoline

I specifically need this to provide a broad support of platforms for our t8code Julia bindings.

I describe the problem with a specific example:

Within mpi.h provided by MPITrampoline MPI_ERR_LASTCODE is not a real compile-time constant. This is true for all other MPI constants as well.

// mpi.h
extern int MPITRAMPOLINE_CONST MPI_ERR_LASTCODE

In libsc MPI_ERR_LASTCODE is used in enums:

// sc_mpi.h
#define sc_MPI_ERR_LASTCODE               MPI_ERR_LASTCODE`

and

// sc_sda.h
typedef enum sc_scda_ret
{
  SC_SCDA_FERR_SUCCESS = 0, /**< successful function call */
  SC_SCDA_FERR_FORMAT = sc_MPI_ERR_LASTCODE,  /**< File not conforming to the
                                                   \b scda format. */
[...]
};

This gives the following error: grafik

@lukasdreyer

cburstedde commented 8 months ago

Thanks;, let's discuss with @tim-griesbach how we may address this.

jmark commented 8 months ago

There is also a discussion going at the MPTrampoline side: https://github.com/eschnett/MPItrampoline/issues/37

cburstedde commented 8 months ago

We're working on remiving the use of MPI_ERR_LASTCODE as a constant.

We'll alse be deprecating the configuration with MPI but without MPI I/O, leaving either non-MPI operation or MPI operation with full MPI_File support. Any opinions on this step?

cburstedde commented 8 months ago

I've just merged work by @tim-griesbach not to rely on MPI_ERR_LASTCODE anymore.

We have deprecated the combo --enable-mpi --disable-mpiio. Does all else work for y'all?

cburstedde commented 7 months ago

I've just merged work by @tim-griesbach not to rely on MPI_ERR_LASTCODE anymore.

We have deprecated the combo --enable-mpi --disable-mpiio. Does all else work for y'all?

We have merged a fix for these cases. About to release 2.8.6! Any comments?