jeffhammond / vapaa

A standalone implementation of the MPI Fortran 2018 module
MIT License
19 stars 1 forks source link

Struct members (OpenMPI) #42

Open ivan-pi opened 2 weeks ago

ivan-pi commented 2 weeks ago

Trying to build vapaa using OpenMPI 4.1.5 and GCC v12, I hit the following errors:

~/vapaa/source> mpicc --version
gcc (Spack GCC) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~/vapaa/source> make CC=mpicc FC=ifx
mpicc -Wall -Wextra -Werror -g -std=c11 -DHAVE_CFI -fPIE -Os -c mpi_datatype.c
In file included from mpi_datatype.c:4:
convert_handles.h: In function 'C_MPI_STATUS_F2C':
convert_handles.h:41:8: error: 'MPI_Status' {aka 'struct ompi_status_public_t'} has no member named 'cancelled'; did you mean '_cancelled'?
   41 |     c->cancelled = f->cancelled;
      |        ^~~~~~~~~
      |        _cancelled
convert_handles.h:42:8: error: 'MPI_Status' {aka 'struct ompi_status_public_t'} has no member named 'ucount'; did you mean '_ucount'?
   42 |     c->ucount    = f->ucount;
      |        ^~~~~~
      |        _ucount
convert_handles.h: In function 'C_MPI_STATUS_C2F':
convert_handles.h:61:23: error: 'MPI_Status' {aka 'const struct ompi_status_public_t'} has no member named 'cancelled'; did you mean '_cancelled'?
   61 |     f->cancelled = c->cancelled;
      |                       ^~~~~~~~~
      |                       _cancelled
convert_handles.h:62:23: error: 'MPI_Status' {aka 'const struct ompi_status_public_t'} has no member named 'ucount'; did you mean '_ucount'?
   62 |     f->ucount    = c->ucount;
      |                       ^~~~~~
      |                       _ucount
make: *** [Makefile:110: mpi_datatype.o] Error 1

Is this an OpenMPI issue?

jeffhammond commented 2 weeks ago

It's probably my bug. I'll work on it tomorrow or Friday. Please just use MPICH 4.2+ for now. I haven't worked too much on implementation portability because the features were hard enough to get right with one implementation.

jeffhammond commented 2 weeks ago

proposed fix in https://github.com/jeffhammond/vapaa/pull/44