OPM / opm-simulators

Simulator programs and utilities for automatic differentiation.
http://www.opm-project.org
GNU General Public License v3.0
111 stars 121 forks source link

/usr/include/boost/bind.hpp:36:1: note: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. #3200

Open hakonhagland opened 3 years ago

hakonhagland commented 3 years ago

I am trying to get rid of some warnings when building opm-simulators on Ubuntu 21.04 with gcc 10.3.0, boost version 1.74.0 :

$ git clone git@github.com:OPM/opm-simulators.git
$ cd opm-simulators
$ mkdir build
$ cd build
$ cmake ..
$ make
-- The C compiler identification is GNU 10.3.0
-- The CXX compiler identification is GNU 10.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test HAVE_C99
-- Performing Test HAVE_C99 - Success
-- Found C99: -std=c99  
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.44.0") found components: system unit_test_framework 
CMake Warning (dev) at /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (CJSON) does
  not match the name of the calling package (cjson).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /home/hakon/test/opm/opm-common/cmake/Modules/Findcjson.cmake:77 (find_package_handle_standard_args)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmFind.cmake:135 (find_package)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmPackage.cmake:189 (find_and_append_package_to)
  /home/hakon/test/opm/opm-common/opm-common-prereqs.cmake:25 (find_package_deps)
  /home/hakon/test/opm/opm-common/build/opm-common-config.cmake:127 (include)
  CMakeLists.txt:60 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find CJSON (missing: CJSON_INCLUDE_DIRS HAVE_CJSON) 
CMake Deprecation Warning at /home/hakon/test/opm/opm-common/cmake/Modules/OpmInit.cmake:26 (cmake_policy):
  The OLD behavior for policy CMP0026 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  CMakeLists.txt:63 (OpmSetPolicies)

CMake Warning at /home/hakon/test/opm/opm-common/cmake/Modules/Findopm-tests.cmake:26 (message):
  opm-tests not found - integration tests using opm-tests will be skipped.
Call Stack (most recent call first):
  CMakeLists.txt:76 (include)

-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.44.0") found components: date_time system unit_test_framework 
-- Looking for sgemm_
-- Looking for sgemm_ - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Looking for dgemm_
-- Looking for dgemm_ - found
-- Found BLAS: /usr/lib/x86_64-linux-gnu/libblas.so;/usr/lib/x86_64-linux-gnu/libf77blas.so;/usr/lib/x86_64-linux-gnu/libatlas.so  
-- Looking for cheev_
-- Looking for cheev_ - not found
-- Looking for cheev_
-- Looking for cheev_ - found
-- A library with LAPACK API found.
-- Performing Test HAVE_CXA_DEMANGLE
-- Performing Test HAVE_CXA_DEMANGLE - Success
-- Found dune-common: /usr/include  
-- Version 2.7.1 of dune-common from /lib/x86_64-linux-gnu/cmake/dune-common
CMake Warning at /home/hakon/test/opm/opm-common/cmake/Modules/FindParMETIS.cmake:109 (message):
  MPI not found ==> ParMETIS disabled! Plase make sure -DUSE_MPI=ON was set
  if you need ParMETIS.
Call Stack (most recent call first):
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmFind.cmake:135 (find_package)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmPackage.cmake:189 (find_and_append_package_to)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmPackage.cmake:87 (find_package_deps)
  /home/hakon/test/opm/opm-common/cmake/Modules/Finddune-istl.cmake:14 (find_opm_package)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmFind.cmake:135 (find_package)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmPackage.cmake:189 (find_and_append_package_to)
  opm-simulators-prereqs.cmake:45 (find_package_deps)
  CMakeLists.txt:81 (include)

-- Performing Test HAVE_UMFPACK_WITHOUT_CHOLMOD
-- Performing Test HAVE_UMFPACK_WITHOUT_CHOLMOD - Success
CMake Warning (dev) at /home/hakon/test/opm/opm-common/cmake/Modules/FindSuiteSparse.cmake:264 (set):
  implicitly converting 'INT' to 'STRING' type.
Call Stack (most recent call first):
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmFind.cmake:135 (find_package)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmPackage.cmake:189 (find_and_append_package_to)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmPackage.cmake:87 (find_package_deps)
  /home/hakon/test/opm/opm-common/cmake/Modules/Finddune-istl.cmake:14 (find_opm_package)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmFind.cmake:135 (find_package)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmPackage.cmake:189 (find_and_append_package_to)
  opm-simulators-prereqs.cmake:45 (find_package_deps)
  CMakeLists.txt:81 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found SuiteSparse: /usr/lib/x86_64-linux-gnu/libumfpack.so;/usr/lib/x86_64-linux-gnu/libamd.so  
-- Found dune-istl: /usr/include;/usr/include/suitesparse  
-- Version 2.7.1 of dune-istl from /lib/cmake/dune-istl
CMake Warning (dev) at /home/hakon/test/opm/opm-common/cmake/Modules/FindSuiteSparse.cmake:264 (set):
  implicitly converting 'INT' to 'STRING' type.
Call Stack (most recent call first):
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmFind.cmake:135 (find_package)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmPackage.cmake:189 (find_and_append_package_to)
  opm-simulators-prereqs.cmake:45 (find_package_deps)
  CMakeLists.txt:81 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found SuiteSparse: /usr/lib/x86_64-linux-gnu/liblapack.so;/usr/lib/x86_64-linux-gnu/libblas.so;/usr/lib/x86_64-linux-gnu/libf77blas.so;/usr/lib/x86_64-linux-gnu/libatlas.so;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/x86_64-linux-gnu/libsuitesparseconfig.so;-lrt;/usr/lib/x86_64-linux-gnu/libumfpack.so;/usr/lib/x86_64-linux-gnu/libamd.so  
CMake Warning (dev) at /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (VALGRIND)
  does not match the name of the calling package (Valgrind).  This can lead
  to problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /home/hakon/test/opm/opm-common/cmake/Modules/FindValgrind.cmake:21 (find_package_handle_standard_args)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmFind.cmake:135 (find_package)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmPackage.cmake:189 (find_and_append_package_to)
  /home/hakon/test/opm/opm-material/opm-material-prereqs.cmake:22 (find_package_deps)
  /home/hakon/test/opm/opm-material/build/opm-material-config.cmake:118 (include)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmFind.cmake:138 (find_package)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmPackage.cmake:189 (find_and_append_package_to)
  opm-simulators-prereqs.cmake:45 (find_package_deps)
  CMakeLists.txt:81 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found VALGRIND: /usr/include  
-- Found opm-material: /home/hakon/test/opm/opm-material;/home/hakon/test/opm/opm-common;/usr/include;/home/hakon/test/opm/opm-common/external/cjson;/home/hakon/test/opm/opm-common/build/include  
-- Found dune-geometry: /usr/include  
-- Version 2.7.1 of dune-geometry from /lib/x86_64-linux-gnu/cmake/dune-geometry
-- Found dune-uggrid: /usr/include  
-- Version 2.7.1 of dune-uggrid from /lib/x86_64-linux-gnu/cmake/dune-uggrid
-- Found dune-grid: /usr/include  
-- Version 2.7.1 of dune-grid from /lib/x86_64-linux-gnu/cmake/dune-grid
-- Could NOT find PTScotch (missing: PTSCOTCH_INCLUDE_DIR SCOTCH_LIBRARY PTSCOTCH_LIBRARY PTSCOTCHERR_LIBRARY) 
-- Could NOT find ZOLTAN (missing: MPI_FOUND) 
-- Found opm-grid: /home/hakon/test/opm/opm-grid/build/lib/libopmgrid.a  
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.44.0") found components: unit_test_framework 
-- Could NOT find dune-localfunctions (missing: dune-localfunctions_DIR)
-- Could NOT find dune-localfunctions (missing: dune-localfunctions_FOUND HAVE_DUNE_LOCALFUNCTIONS) 
-- Could NOT find dune-alugrid (missing: dune-alugrid_DIR)
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
-- Could NOT find METIS (missing: METIS_LIBRARIES METIS_INCLUDE_DIRS) 
-- Could NOT find dune-alugrid (missing: dune-alugrid_FOUND HAVE_DUNE_ALUGRID) 
-- Could NOT find dune-alugrid (missing: dune-alugrid_DIR)
-- Could NOT find dune-alugrid (missing: dune-alugrid_FOUND HAVE_DUNE_ALUGRID) 
-- Could NOT find dune-fem (missing: dune-fem_DIR)
-- Could NOT find dune-fem (missing: dune-fem_FOUND HAVE_DUNE_FEM) 
-- Could NOT find Quadmath (missing: QUADMATH_LIBRARIES HAVE_QUAD) 
-- Found opm-models: /home/hakon/test/opm/opm-models;/usr/include;/usr/include/suitesparse;/home/hakon/test/opm/opm-common;/home/hakon/test/opm/opm-common/external/cjson;/home/hakon/test/opm/opm-common/build/include;/home/hakon/test/opm/opm-material;/home/hakon/test/opm/opm-grid  
-- Setting CUDA host compiler CMAKE_CUDA_HOST_COMPILER to /bin/c++ to prevent incompatibilities. Note that this might report that there is not CUDA compiler if your system's CUDA compiler does not support /bin/c++.
-- Looking for a CUDA compiler
-- Looking for a CUDA compiler - NOTFOUND
-- Looking for a CUDA host compiler - /bin/c++
-- Looking for CL_VERSION_2_2
-- Looking for CL_VERSION_2_2 - not found
-- Looking for CL_VERSION_2_1
-- Looking for CL_VERSION_2_1 - not found
-- Looking for CL_VERSION_2_0
-- Looking for CL_VERSION_2_0 - not found
-- Looking for CL_VERSION_1_2
-- Looking for CL_VERSION_1_2 - not found
-- Looking for CL_VERSION_1_1
-- Looking for CL_VERSION_1_1 - not found
-- Looking for CL_VERSION_1_0
-- Looking for CL_VERSION_1_0 - not found
-- Could NOT find OpenCL (missing: OpenCL_LIBRARY OpenCL_INCLUDE_DIR) 
-- Performing Test HAVE_ATTRIBUTE_ALWAYS_INLINE
-- Performing Test HAVE_ATTRIBUTE_ALWAYS_INLINE - Success
-- CMake version: 3.18.4
-- Linux distribution: Ubuntu 21.04
-- Target architecture: x86_64
-- Found Git: /bin/git (found version "2.30.2") 
-- Source code repository: git aa1df1352*
-- GNU C++ compiler version: 10.3.0
-- Linker: ld 2.36.1
Processing opm_defaults opm-simulators
-- Checking to see if CXX compiler accepts flag -Wl,--enable-new-dtags
-- Checking to see if CXX compiler accepts flag -Wl,--enable-new-dtags - yes
-- Precompiled headers: disabled
-- Build type: Release
-- Checking to see if CXX compiler accepts flag -mtune=native
-- Checking to see if CXX compiler accepts flag -mtune=native - yes
-- All warnings enabled: -Wall -Wextra -Wshadow
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- Checking to see if CXX compiler accepts flag -pthread
-- Checking to see if CXX compiler accepts flag -pthread - yes
-- Could NOT find CppCheck (missing: CPPCHECK_PROGRAM) 
-- Disabling clang-check as CMAKE_EXPORT_COMPILE_COMMANDS is not enabled
CMake Warning at /usr/share/cmake-3.18/Modules/FindBoost.cmake:1187 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake-3.18/Modules/FindBoost.cmake:1311 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.18/Modules/FindBoost.cmake:1919 (_Boost_MISSING_DEPENDENCIES)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmFind.cmake:135 (find_package)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmFind.cmake:227 (find_and_append_package_to)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmLibMain.cmake:83 (find_and_append_package_list_to)
  CMakeLists.txt:251 (include)

CMake Warning at /usr/share/cmake-3.18/Modules/FindBoost.cmake:1187 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake-3.18/Modules/FindBoost.cmake:1311 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.18/Modules/FindBoost.cmake:1919 (_Boost_MISSING_DEPENDENCIES)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmFind.cmake:135 (find_package)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmFind.cmake:227 (find_and_append_package_to)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmLibMain.cmake:83 (find_and_append_package_list_to)
  CMakeLists.txt:251 (include)

CMake Warning at /usr/share/cmake-3.18/Modules/FindBoost.cmake:1187 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake-3.18/Modules/FindBoost.cmake:1311 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.18/Modules/FindBoost.cmake:1919 (_Boost_MISSING_DEPENDENCIES)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmFind.cmake:135 (find_package)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmFind.cmake:227 (find_and_append_package_to)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmLibMain.cmake:83 (find_and_append_package_list_to)
  CMakeLists.txt:251 (include)

-- Found Boost: /usr/include (found suitable version "1.74.0", minimum required is "1.44.0") found components: date_time system unit_test_framework 
CMake Warning (dev) at /home/hakon/test/opm/opm-common/cmake/Modules/FindSuiteSparse.cmake:264 (set):
  implicitly converting 'INT' to 'STRING' type.
Call Stack (most recent call first):
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmFind.cmake:135 (find_package)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmFind.cmake:227 (find_and_append_package_to)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmLibMain.cmake:83 (find_and_append_package_list_to)
  CMakeLists.txt:251 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating debug symbols: -ggdb3
-- Looking for strip utility
-- Looking for strip utility - found
CMake Warning at /usr/share/cmake-3.18/Modules/FindBoost.cmake:1187 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake-3.18/Modules/FindBoost.cmake:1311 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.18/Modules/FindBoost.cmake:1919 (_Boost_MISSING_DEPENDENCIES)
  /home/hakon/test/opm/opm-common/cmake/Modules/UseDynamicBoost.cmake:1 (find_package)
  /home/hakon/test/opm/opm-common/cmake/Modules/OpmLibMain.cmake:99 (include)
  CMakeLists.txt:251 (include)

-- Performing Test HAVE_DYNAMIC_BOOST_TEST
-- Performing Test HAVE_DYNAMIC_BOOST_TEST - Success
-- Writing config file "/home/hakon/test/opm/opm-simulators/build/config.h"...
-- This build defaults to installing in /usr/local
-- Found Doxygen: /bin/doxygen (found version "1.9.1") found components: doxygen dot 
-- Writing version information to local header project-version.h
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hakon/test/opm/opm-simulators/build

$ $ make -j12
Scanning dependencies of target flow_libblackoil
Scanning dependencies of target flow_libpolymer
Scanning dependencies of target flow_liboilwater_polymer_injectivity
Scanning dependencies of target flow_libsolvent
Scanning dependencies of target flow_liboilwater_brine
Scanning dependencies of target flow_libfoam
Scanning dependencies of target flow_libbrine
Scanning dependencies of target flow_libextbo
Scanning dependencies of target update-version
Scanning dependencies of target flow_libgasoil
Scanning dependencies of target flow_libenergy
Scanning dependencies of target flow_liboilwater_polymer
[  1%] Updating version information
[  1%] Built target update-version
Scanning dependencies of target flow_liboilwater
[  1%] Building CXX object CMakeFiles/flow_liboilwater_polymer_injectivity.dir/flow/flow_ebos_oilwater_polymer_injectivity.cpp.o
[  2%] Building CXX object CMakeFiles/flow_liboilwater_brine.dir/flow/flow_ebos_oilwater_brine.cpp.o
[  4%] Building CXX object CMakeFiles/flow_libpolymer.dir/flow/flow_ebos_polymer.cpp.o
[  4%] Building CXX object CMakeFiles/flow_libbrine.dir/flow/flow_ebos_brine.cpp.o
[  4%] Building CXX object CMakeFiles/flow_libblackoil.dir/flow/flow_ebos_blackoil.cpp.o
[  5%] Building CXX object CMakeFiles/flow_libenergy.dir/flow/flow_ebos_energy.cpp.o
[  5%] Building CXX object CMakeFiles/flow_libsolvent.dir/flow/flow_ebos_solvent.cpp.o
[  6%] Building CXX object CMakeFiles/flow_libgasoil.dir/flow/flow_ebos_gasoil.cpp.o
[  8%] Building CXX object CMakeFiles/flow_liboilwater_polymer.dir/flow/flow_ebos_oilwater_polymer.cpp.o
[  8%] Building CXX object CMakeFiles/flow_libfoam.dir/flow/flow_ebos_foam.cpp.o
[  9%] Building CXX object CMakeFiles/flow_libextbo.dir/flow/flow_ebos_extbo.cpp.o
[ 10%] Building CXX object CMakeFiles/flow_liboilwater.dir/flow/flow_ebos_oilwater.cpp.o
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/date_time/time_clock.hpp:17,
                 from /usr/include/boost/date_time/posix_time/posix_time_types.hpp:10,
                 from /home/hakon/test/opm/opm-simulators/opm/simulators/timestepping/SimulatorTimerInterface.hpp:26,
                 from /home/hakon/test/opm/opm-simulators/opm/simulators/flow/NonlinearSolverEbos.hpp:27,
                 from /home/hakon/test/opm/opm-simulators/opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp:25,
                 from /home/hakon/test/opm/opm-simulators/flow/flow_ebos_polymer.cpp:23:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/date_time/time_clock.hpp:17,
                 from /usr/include/boost/date_time/posix_time/posix_time_types.hpp:10,
                 from /home/hakon/test/opm/opm-simulators/opm/simulators/timestepping/SimulatorTimerInterface.hpp:26,
                 from /home/hakon/test/opm/opm-simulators/opm/simulators/flow/NonlinearSolverEbos.hpp:27,
                 from /home/hakon/test/opm/opm-simulators/opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp:25,
                 from /home/hakon/test/opm/opm-simulators/flow/flow_ebos_foam.cpp:23:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/date_time/time_clock.hpp:17,
                 from /usr/include/boost/date_time/posix_time/posix_time_types.hpp:10,
                 from /home/hakon/test/opm/opm-simulators/opm/simulators/timestepping/SimulatorTimerInterface.hpp:26,
                 from /home/hakon/test/opm/opm-simulators/opm/simulators/flow/NonlinearSolverEbos.hpp:27,
                 from /home/hakon/test/opm/opm-simulators/opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp:25,
                 from /home/hakon/test/opm/opm-simulators/flow/flow_ebos_oilwater_polymer.cpp:25:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/date_time/time_clock.hpp:17,
                 from /usr/include/boost/date_time/posix_time/posix_time_types.hpp:10,
                 from /home/hakon/test/opm/opm-simulators/opm/simulators/timestepping/SimulatorTimerInterface.hpp:26,
                 from /home/hakon/test/opm/opm-simulators/opm/simulators/flow/NonlinearSolverEbos.hpp:27,
                 from /home/hakon/test/opm/opm-simulators/opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp:25,
                 from /home/hakon/test/opm/opm-simulators/flow/flow_ebos_energy.cpp:23:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/date_time/time_clock.hpp:17,
                 from /usr/include/boost/date_time/posix_time/posix_time_types.hpp:10,
                 from /home/hakon/test/opm/opm-simulators/opm/simulators/timestepping/SimulatorTimerInterface.hpp:26,
                 from /home/hakon/test/opm/opm-simulators/opm/simulators/flow/NonlinearSolverEbos.hpp:27,
                 from /home/hakon/test/opm/opm-simulators/opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp:25,
                 from /home/hakon/test/opm/opm-simulators/flow/flow_ebos_solvent.cpp:23:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~

[...]

I am not able to tell which file is including <boost/bind.hpp>, according to the compiler output above it should be /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp but that file does not have any line #include <boost/bind.hpp> as far as I can see. Any ideas which file triggered the warning?

According to the warning message, we can define BOOST_BIND_GLOBAL_PLACEHOLDERS to silence the warnings.

hakonhagland commented 3 years ago

Added a quick fix that seems to work for me. See PR #3201.

bska commented 3 years ago

I am not able to tell which file is including <boost/bind.hpp>, according to the compiler output above it should be /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp but that file does not have any line #include <boost/bind.hpp> as far as I can see. Any ideas which file triggered the warning?

It may be boost/property_tree/json_parser.hpp in opm/simulators/linalg/ISTLSolverEbosFlexible.hpp. In Boost 1.74, json_parser.hpp goes on to include boost/property_tree/json_parser/detail/parser.hpp which in turn directly includes <boost/bind.hpp>. In Boost 1.76 that appears to be fixed. As for why the warning appears to be triggered in sp_thread_sleep.hpp, I'd venture a guess that that's the first location that happens to define the BOOST_PRAGMA_MESSAGE macro (through including <boost/config/pragma_message.hpp>) in the pertinent translation unit and that the compiler is unable to distinguish between the macro definition and the actual call and therefore attributes the failure to the definition instead.