cea-hpc / wi4mpi

Wrapper interface for MPI
BSD 3-Clause "New" or "Revised" License
80 stars 15 forks source link

Nested comments not supported by NVHPC compiler #78

Open GuillaumeLscrt opened 7 months ago

GuillaumeLscrt commented 7 months ago

This type of comment is not supported by the NVHPC 23.11 C compiler.

/*OMPI_DECLSPEC int*/ void * OMPI_C_MPI_NULL_DELETE_FN;/*( A_MPI_Comm comm, int comm_keyval,
                                             void* attribute_val_out,
                                             void* extra_state )
                                             __mpi_interface_deprecated__;/*("A_MPI_NULL_DELETE_FN is deprecated in MPI-2.0");*/

It appears in the following files at line 847, 853 and 859:

src/preload/header/OMPI_INTEL/app_mpi.h
src/preload/header/OMPI_MPICH/app_mpi.h

The fix consists in the removal of /* after __mpi_interface_deprecated__;.

kevin-juilly commented 7 months ago

Nested comments are effectively unsupported in C. But since there is no additional closing sequence, it's supposed to be valid code. NVHPC did issue warnings when I used it. Unless you pass the -Werror, it is not really an issue. FYI, gcc -Wall would give a similar warning.