sstsimulator / sst-core

SST Structural Simulation Toolkit Parallel Discrete Event Core and Services
http://www.sst-simulator.org
Other
132 stars 89 forks source link

Compilation warnings with default OpenMPI on Ubuntu 22.04 #1069

Open berquist opened 7 months ago

berquist commented 7 months ago

It appears multiple times:

In file included from /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/mpicxx.h:277,
                 from /usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h:2887,
                 from /code/sst-core/src/sst/core/memuse.cc:22:
/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h: In member function 'virtual void MPI::Op::Init(void (*)(const void*, void*, int, const MPI::Datatype&), bool)':
/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h:121:25: warning: cast between incompatible function types from 'void (*)(void*, void*, int*, ompi_datatype_t**, void (*)(void*, void*, int*, ompi_datatype_t**))' to 'void (*)(void*, void*, int*, ompi
_datatype_t**)' [-Wcast-function-type]
  121 |     (void)MPI_Op_create((MPI_User_function*) ompi_mpi_cxx_op_intercept,
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/op_inln.h:123:38: warning: cast between incompatible function types from 'void (*)(const void*, void*, int, const MPI::Datatype&)' to 'void (*)(void*, void*, int*, ompi_datatype_t**)' [-Wcast-function-type]
  123 |     ompi_op_set_cxx_callback(mpi_op, (MPI_User_function*) func);
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~

This is sst-core revision d66f07e4bbf24d50d9e1b8df548ff7b8e9e0d8e6.

Toolchain:

berquist commented 7 months ago

These warnings also appear on Jenkins, where OpenMPI is provided as a module, not the package manager, and is at version 4.1.4.

jleidel commented 1 month ago

This also occurs on Ubuntu 24.04 with GCC 13.2.0 and OpenMPI 4.1.6 (installed from the package manager)

-------------------------------------------------------
SST Core Configuration completed.
-------------------------------------------------------
Build Environment:

                      SST-Core Version : -dev
                            Git Branch : HEAD
                          Git HEAD SHA : 0d412e162fdbdc2f34a7f1738c6ddddecb753337
                   Branch Commit Count : 9178
                                Prefix : /jenkins/sst-gcc13.2-openmpi4.1.6-master
                          Preprocessor : gcc -E
                          C++ Compiler : g++ -std=c++17
                            C Compiler : gcc
                      Compiler Version : gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0
                        MPI C Compiler : mpicc
                      MPI C++ Compiler : mpic++
                  MPI Compiler Version : gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0
                                Linker : /usr/bin/ld -m elf_x86_64
                  Preprocessor Options : -I$(top_srcdir)/src -I$(top_builddir)/src 
                    C Compiler Options : -g -O2 -Wall -Wextra
                  C++ Compiler Options : -g -O2 -std=c++17 -Wall -Wextra
               C++ Standard Compliance : C++17
                        Linker Options : 
-------------------------------------------------------
Configuration Information (Options):

                           MPI enabled : Yes
                       Mempool enabled : Yes
                  Debug output enabled : No
                Event tracking enabled : No
         Performance profiling enabled : No
-------------------------------------------------------
Configuration Information (Dependencies):

                          Found Python : /usr/bin/python3 (Python 3.12.3)
                          HDF5 Support : No
              libz compression library : Yes
                        curses library : -lncurses -ltinfo 
-------------------------------------------------------
jwilso commented 1 month ago

Issue is deferred to future, and will not be addressed in 14.1.0.