Skip to content

running tests against installed ADIOS2 library #3795

@drew-parsons

Description

@drew-parsons

edit
The original error reported here (deleted function ‘adios2::ADIOS::ADIOS(void*)’) was apparently a misconfiguration. The issue title has been changed to indicate the actual goal: running tests against an installed ADIOS2 library for linux distribution CI testing

Describe the bug

I'm trying to test an MPI build of adios2 by building the examples against the installed library.
bpFWriteCRead from examples/hello fails with the error:

[ 25%] Building CXX object CMakeFiles/CppWriter.dir/CppWriter.o
/usr/bin/mpicxx    -MD -MT CMakeFiles/CppWriter.dir/CppWriter.o -MF CMakeFiles/CppWriter.dir/CppWriter.o.d -o CMakeFiles/CppWriter.dir/CppWriter.o -c /projects/mathlibs/build/adios2/examples/hello/bpFWriteCRead/CppWriter.cpp
/projects/mathlibs/build/adios2/examples/hello/bpFWriteCRead/CppWriter.cpp: In function ‘int main(int, char**)’:
/projects/mathlibs/build/adios2/examples/hello/bpFWriteCRead/CppWriter.cpp:35:39: error: use of deleted function ‘adios2::ADIOS::ADIOS(void*)’
   35 |     adios2::ADIOS adios(MPI_COMM_WORLD);
      |                                       ^
In file included from /usr/include/adios2.h:27,
                 from /projects/mathlibs/build/adios2/examples/hello/bpFWriteCRead/CppWriter.cpp:11:
/usr/include/adios2/cxx11/ADIOS.h:87:5: note: declared here
   87 |     ADIOS(void *define_ADIOS2_USE_MPI_to_use_MPI_constructor) = delete;
      |     ^~~~~
make[2]: *** [CMakeFiles/CppWriter.dir/build.make:76: CMakeFiles/CppWriter.dir/CppWriter.o] Error 1
make[2]: Leaving directory '/projects/mathlibs/build/adios2/examples/hello/bpFWriteCRead/build'

So CppWriter.cpp is trying to use adios2::ADIOS::ADIOS(void*), which is no longer the correct API.

To Reproduce

  1. Go to 'examples/hello/bpFWriteCRead'
  2. Create a new subdir build for the build
  3. cd build; cmake -DCMAKE_CXX_COMPILER=mpicxx ..
  4. make
  5. See error

Expected behavior

Examples should build and run successfully.

Desktop (please complete the following information):

  • OS/Platform: Linux (debian unstable)
  • Build gcc 13.2.0, cmake 3.27.4, OpenMPI 4.1.5, build type: shared
  • adios2 2.8.2

Additional context

When running cmake to configure the example, I had to specify -DCMAKE_CXX_COMPILER=mpicxx since the adios installation only links to OpenMPI's libmpi.so without libmpi_cxx.so. This feels like an error in the installed adios cmake files. If I'm accessing adios2 built with MPI support, it should know it needs to link libmpi_cxx.so without requiring CMAKE_CXX_COMPILER=mpicxx to be specified. Or would it be an error in my build configuration?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions