Compare commits
84 Commits
release/20
...
release/20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
faab33a051 | ||
|
|
513893eb59 | ||
|
|
62dc95e894 | ||
|
|
8e11e44559 | ||
|
|
5c62c6e96f | ||
|
|
d38658858d | ||
|
|
176d0b188e | ||
|
|
41c3eb7ff0 | ||
|
|
8d8e612356 | ||
|
|
40bb3159ea | ||
|
|
be3f1ed59b | ||
|
|
2313ab4029 | ||
|
|
554b5ff1b6 | ||
|
|
98959d4a08 | ||
|
|
f9311b96f3 | ||
|
|
26974f28ef | ||
|
|
e0105c6ccf | ||
|
|
7462cc4b96 | ||
|
|
726496c0b6 | ||
|
|
f979d1942f | ||
|
|
59319936e0 | ||
|
|
afc5903dfa | ||
|
|
481d416c22 | ||
|
|
1788ecc1f0 | ||
|
|
52c05e6525 | ||
|
|
7222b210c7 | ||
|
|
dcdb444050 | ||
|
|
7843964163 | ||
|
|
8984579e77 | ||
|
|
1854c37b5b | ||
|
|
57fa257642 | ||
|
|
46144e814a | ||
|
|
3d096a54ec | ||
|
|
70bec15988 | ||
|
|
f17880579c | ||
|
|
7b4bd58a82 | ||
|
|
aac2166cb8 | ||
|
|
14efa7ed38 | ||
|
|
6f6801a5f2 | ||
|
|
fa47d6a623 | ||
|
|
29e12bfa79 | ||
|
|
d406e9f344 | ||
|
|
15583bdec6 | ||
|
|
c15c3b6b9f | ||
|
|
bfeef48fbd | ||
|
|
5a706c635e | ||
|
|
bf656cd28f | ||
|
|
15f4d7e808 | ||
|
|
264f621021 | ||
|
|
35bd292fdf | ||
|
|
5100db5694 | ||
|
|
fa3bba5510 | ||
|
|
bbc8d23473 | ||
|
|
2ee1224917 | ||
|
|
2ddb6ac8c2 | ||
|
|
825b96c1a3 | ||
|
|
8b3a4a6e23 | ||
|
|
6608bc87e4 | ||
|
|
ec63c6b7fd | ||
|
|
4398342048 | ||
|
|
c62f91154a | ||
|
|
00debb5e08 | ||
|
|
2724aae005 | ||
|
|
f48a647fc8 | ||
|
|
f6fb9d09c4 | ||
|
|
bb1040df70 | ||
|
|
05e1bd64a9 | ||
|
|
5344392b99 | ||
|
|
ebe3457064 | ||
|
|
1c5a17b6e8 | ||
|
|
596bafb2e7 | ||
|
|
dbad03c62f | ||
|
|
2ce0810f68 | ||
|
|
69da5816d6 | ||
|
|
b4fd17e9a7 | ||
|
|
bf31f7b4e9 | ||
|
|
c7cf7d8144 | ||
|
|
34ed49d765 | ||
|
|
b75f24afc2 | ||
|
|
4696486879 | ||
|
|
e0a146708c | ||
|
|
1352e89d4e | ||
|
|
b46d3df2f7 | ||
|
|
4d31c7efdc |
@@ -17,6 +17,7 @@ addons:
|
||||
- libgmp3-dev
|
||||
- libsuitesparse-dev
|
||||
- libeigen3-dev
|
||||
- bc
|
||||
|
||||
before_script:
|
||||
- export CXX="g++-4.8" CC="gcc-4.8" FC="gfortran-4.8"
|
||||
|
||||
@@ -12,7 +12,7 @@ endmacro (dir_hook)
|
||||
set(OPM_PROJECT_EXTRA_CODE_INSTALLED "set(OPM_MACROS_ROOT ${CMAKE_INSTALL_PREFIX}/share/opm)
|
||||
list(APPEND CMAKE_MODULE_PATH \${OPM_MACROS_ROOT}/cmake/Modules)")
|
||||
|
||||
set(OPM_PROJECT_EXTRA_CODE_INTREE "set(OPM_MACROS_ROOT ${OPM_COMMON_ROOT})
|
||||
set(OPM_PROJECT_EXTRA_CODE_INTREE "set(OPM_MACROS_ROOT ${OPM_MACROS_ROOT})
|
||||
list(APPEND CMAKE_MODULE_PATH \${OPM_MACROS_ROOT}/cmake/Modules)")
|
||||
|
||||
# project information is in dune.module. Read this file and set variables.
|
||||
|
||||
@@ -54,6 +54,9 @@ list (APPEND PROGRAM_SOURCE_FILES
|
||||
list( APPEND PUBLIC_HEADER_FILES
|
||||
opm/common/ErrorMacros.hpp
|
||||
opm/common/Exceptions.hpp
|
||||
opm/common/ResetLocale.hpp
|
||||
opm/common/Unused.hpp
|
||||
opm/common/Valgrind.hpp
|
||||
opm/common/data/SimulationDataContainer.hpp
|
||||
opm/common/OpmLog/CounterLog.hpp
|
||||
opm/common/OpmLog/EclipsePRTLog.hpp
|
||||
|
||||
@@ -33,23 +33,34 @@ include(CheckIncludeFileCXX)
|
||||
# macro to only add option once
|
||||
include(AddOptions)
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.1)
|
||||
if(NOT MSVC)
|
||||
# try to use compiler flag -std=c++11
|
||||
CHECK_CXX_ACCEPTS_FLAG("-std=c++11" CXX_FLAG_CXX11)
|
||||
if(CXX_FLAG_CXX11)
|
||||
add_options (CXX ALL_BUILDS "-std=c++11")
|
||||
set(CXX_STD0X_FLAGS "-std=c++11")
|
||||
else()
|
||||
# try to use compiler flag -std=c++0x for older compilers
|
||||
CHECK_CXX_ACCEPTS_FLAG("-std=c++0x" CXX_FLAG_CXX0X)
|
||||
if(CXX_FLAG_CXX0X)
|
||||
add_options (CXX ALL_BUILDS "-std=c++0x")
|
||||
set(CXX_STD0X_FLAGS "-std=c++0x")
|
||||
endif(CXX_FLAG_CXX0X)
|
||||
endif(CXX_FLAG_CXX11)
|
||||
endif(NOT MSVC)
|
||||
# Force CXX Standard cross platfrom for CMakeVersion >=3.1
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
if(NOT CMAKE_CXX_STANDARD)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
|
||||
if(NOT MSVC)
|
||||
foreach(_flag "14" "11")
|
||||
set(_FLAG "CXX_FLAG_CXX${_flag}")
|
||||
string(TOUPPER ${_FLAG} _FLAG)
|
||||
# try to use compiler flag -std=c++${_flag}
|
||||
CHECK_CXX_ACCEPTS_FLAG("-std=c++${_flag}" ${_FLAG})
|
||||
|
||||
if(${_FLAG})
|
||||
if(CMAKE_VERSION VERSION_LESS 3.1)
|
||||
add_options (CXX ALL_BUILDS "-std=c++${_flag}")
|
||||
endif()
|
||||
set(CXX_STD0X_FLAGS "-std=c++${_flag}")
|
||||
#Use vriables for CMake > 3.1 set the standard with no extensions
|
||||
set(CMAKE_CXX_STANDARD ${_flag})
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
endif(NOT MSVC)
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.1)
|
||||
# if we are building with an Apple toolchain in MacOS X,
|
||||
# we cannot use the old GCC 4.2 fork, but must use the
|
||||
# new runtime library
|
||||
@@ -58,8 +69,8 @@ if(CMAKE_VERSION VERSION_LESS 3.1)
|
||||
if (APPLE AND (_comp_id MATCHES "CLANG"))
|
||||
CHECK_CXX_ACCEPTS_FLAG ("-stdlib=libc++" CXX_FLAG_STDLIB_LIBCXX)
|
||||
if (CXX_FLAG_STDLIB_LIBCXX)
|
||||
add_options (CXX ALL_BUILDS "-stdlib=libc++")
|
||||
set (CXX_STDLIB_FLAGS "-stdlib=libc++")
|
||||
add_options (CXX ALL_BUILDS "-stdlib=libc++")
|
||||
set (CXX_STDLIB_FLAGS "-stdlib=libc++")
|
||||
endif (CXX_FLAG_STDLIB_LIBCXX)
|
||||
endif (APPLE AND (_comp_id MATCHES "CLANG"))
|
||||
|
||||
@@ -69,13 +80,9 @@ if(CMAKE_VERSION VERSION_LESS 3.1)
|
||||
else (CXX_STD0X_FLAGS AND CXX_STDLIB_FLAGS)
|
||||
set (CXX_SPACE)
|
||||
endif (CXX_STD0X_FLAGS AND CXX_STDLIB_FLAGS)
|
||||
else()
|
||||
if(NOT CMAKE_CXX_STANDARD)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
endif()
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_VERSION VERSION_LESS 3.1)
|
||||
# Workaround bug in cmake:
|
||||
# cxx standard flags are not applied in CheckCXXSourceCompiles
|
||||
if (CMAKE_CXX_STANDARD EQUAL 14)
|
||||
@@ -85,6 +92,7 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# perform tests
|
||||
include(CheckCXXSourceCompiles)
|
||||
|
||||
|
||||
@@ -242,9 +242,10 @@ if (NOT (ERT_INCLUDE_DIR MATCHES "-NOTFOUND" OR ERT_LIBRARIES MATCHES "-NOTFOUND
|
||||
set (CMAKE_REQUIRED_INCLUDES ${ERT_INCLUDE_DIR})
|
||||
set (CMAKE_REQUIRED_LIBRARIES ${ERT_LIBRARIES})
|
||||
check_cxx_source_compiles (
|
||||
"#include <ert/ecl/EclKW.hpp>
|
||||
"#include <ert/ecl/ecl_grid.h>
|
||||
int main ( ) {
|
||||
ERT::EclKW< int > kw( ecl_kw_alloc( \"SATNUM\", 0, ECL_INT_TYPE ) );
|
||||
ecl_grid_type * grid = ecl_grid_alloc_rectangular( 10,10,10,1,1,1, NULL);
|
||||
ecl_grid_free( grid );
|
||||
return 0;
|
||||
}" HAVE_ERT)
|
||||
cmake_pop_check_state ()
|
||||
|
||||
@@ -20,8 +20,8 @@ endif (CJSON_ROOT)
|
||||
find_path (CJSON_INCLUDE_DIR
|
||||
NAMES "cjson/cJSON.h"
|
||||
HINTS "${CJSON_ROOT}"
|
||||
PATHS "${PROJECT_SOURCE_DIR}" "${PROJECT_SOURCE_DIR}/../opm-parser"
|
||||
PATH_SUFFIXES "include" "opm/json"
|
||||
PATHS "${PROJECT_SOURCE_DIR}"
|
||||
PATH_SUFFIXES "include" "external"
|
||||
DOC "Path to cjson library header files"
|
||||
${_no_default_path} )
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ find_opm_package (
|
||||
"#include <dune/grid/onedgrid.hh>
|
||||
int main (void) {
|
||||
Dune::OneDGrid grid(1, 0., 1.);
|
||||
return grid.lbegin<0>(0) == grid.lend<0>(0);
|
||||
return grid.size(0);
|
||||
}
|
||||
"
|
||||
# config variables
|
||||
|
||||
@@ -21,7 +21,7 @@ find_opm_package (
|
||||
"${opm-core_DEPS}"
|
||||
|
||||
# header to search for
|
||||
"opm/core/grid.h"
|
||||
"opm/core/wells.h"
|
||||
|
||||
# library to search for
|
||||
"opmcore"
|
||||
@@ -30,12 +30,13 @@ find_opm_package (
|
||||
""
|
||||
|
||||
# test program
|
||||
"#include <opm/core/grid.h>
|
||||
int main (void) {
|
||||
struct UnstructuredGrid *g;
|
||||
g = create_grid_empty ();
|
||||
destroy_grid (g);
|
||||
return 0;
|
||||
"
|
||||
#include <opm/core/utility/parameters/ParameterGroup.hpp>
|
||||
int main()
|
||||
{
|
||||
Opm::parameter::ParameterGroup parameters;
|
||||
parameters.insertParameter(\"number\", \"7\");
|
||||
return 0;
|
||||
}
|
||||
"
|
||||
# config variables
|
||||
|
||||
@@ -17,8 +17,8 @@ endif()
|
||||
if (EXISTS "${_opm_data_root}/norne/NORNE_ATW2013.DATA")
|
||||
set( HAVE_OPM_DATA True )
|
||||
set( OPM_DATA_ROOT ${_opm_data_root} )
|
||||
message( "-- Setting OPM_DATA_ROOT: ${OPM_DATA_ROOT}")
|
||||
message(STATUS "Setting OPM_DATA_ROOT: ${OPM_DATA_ROOT}")
|
||||
else()
|
||||
set( HAVE_OPM_DATA False )
|
||||
message( "opm-data not found - integration tests using opm-data will be skipped.")
|
||||
endif()
|
||||
message(WARNING "opm-data not found - integration tests using opm-data will be skipped.")
|
||||
endif()
|
||||
|
||||
@@ -137,6 +137,21 @@ if (ERT_FOUND AND Boost_FOUND AND
|
||||
${Boost_LIBRARIES}
|
||||
${ERT_LIBRARIES})
|
||||
|
||||
# We might be using an external cJSON library
|
||||
# but we have to unset the OPM_PARSER_ROOT stuff to find it
|
||||
# (other NO_DEFAULT_PATH will be set).
|
||||
set(_OPM_PARSER_ROOT_bak ${OPM_PARSER_ROOT})
|
||||
set(OPM_PARSER_ROOT "")
|
||||
find_package(cjson)
|
||||
set(OPM_PARSER_ROOT ${OPM_PARSER_ROOT_bak})
|
||||
|
||||
if (CJSON_FOUND)
|
||||
# If we do we need to add it to the libs.
|
||||
set (opm-parser_LIBRARIES
|
||||
${opm-parser_LIBRARIES}
|
||||
${CJSON_LIBRARY})
|
||||
endif (CJSON_FOUND)
|
||||
|
||||
# see if we can compile a minimum example
|
||||
# CMake logical test doesn't handle lists (sic)
|
||||
include (CMakePushCheckState)
|
||||
|
||||
@@ -13,11 +13,19 @@ macro (opm_compile opm)
|
||||
# all public header files are together with the source. prepend our own
|
||||
# source path to the one of the dependencies so that our version of any
|
||||
# ambigious paths are used.
|
||||
set (${opm}_INCLUDE_DIR "${PROJECT_SOURCE_DIR}")
|
||||
set (${opm}_INCLUDE_DIRS ${${opm}_INCLUDE_DIR} ${${opm}_INCLUDE_DIRS})
|
||||
|
||||
option(SILENCE_CROSSMODULE_WARNINGS "Disable warnings from cross-module includes" OFF)
|
||||
if (SILENCE_CROSSMODULE_WARNINGS)
|
||||
include_directories("${PROJECT_SOURCE_DIR}")
|
||||
include_directories (SYSTEM ${${opm}_INCLUDE_DIRS})
|
||||
else()
|
||||
set (${opm}_INCLUDE_DIR "${PROJECT_SOURCE_DIR}")
|
||||
set (${opm}_INCLUDE_DIRS ${${opm}_INCLUDE_DIR} ${${opm}_INCLUDE_DIRS})
|
||||
include_directories (${${opm}_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
|
||||
# create this library, if there are any compilation units
|
||||
include_directories (${${opm}_INCLUDE_DIRS})
|
||||
link_directories (${${opm}_LIBRARY_DIRS})
|
||||
add_definitions (${${opm}_DEFINITIONS})
|
||||
set (${opm}_VERSION "${${opm}_VERSION_MAJOR}.${${opm}_VERSION_MINOR}")
|
||||
|
||||
@@ -285,10 +285,6 @@ opm_doc (${project} ${doxy_dir})
|
||||
|
||||
# provide compatibility with using this build in dunecontrol
|
||||
include (DuneCompat)
|
||||
include (LibtoolArchives)
|
||||
if (${project}_TARGET)
|
||||
configure_la (${project} ${${project}_TARGET} ${project}_LIBTOOL_ARCHIVE)
|
||||
endif ()
|
||||
|
||||
### clean in-source builds ###
|
||||
include (OpmDistClean)
|
||||
|
||||
@@ -35,6 +35,7 @@ set (ewoms_DEPS
|
||||
"dune-fem"
|
||||
"opm-parser"
|
||||
"opm-grid"
|
||||
"opm-core"
|
||||
# librt (on some systems necessary for clock_gettime())
|
||||
"librt REQUIRED"
|
||||
# valgrind client requests
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
# defines that must be present in config.h for our headers
|
||||
set (opm-common_CONFIG_VAR
|
||||
)
|
||||
"HAS_ATTRIBUTE_UNUSED")
|
||||
|
||||
# dependencies
|
||||
set (opm-common_DEPS
|
||||
|
||||
@@ -8,6 +8,9 @@ set (opm-core_CONFIG_VAR
|
||||
HAVE_DUNE_ISTL
|
||||
HAVE_MPI
|
||||
HAVE_PETSC
|
||||
DUNE_ISTL_VERSION_MAJOR
|
||||
DUNE_ISTL_VERSION_MINOR
|
||||
DUNE_ISTL_VERSION_REVISION
|
||||
)
|
||||
|
||||
# dependencies
|
||||
@@ -42,5 +45,8 @@ set (opm-core_DEPS
|
||||
"opm-parser REQUIRED"
|
||||
# the code which implements the material laws
|
||||
"opm-material REQUIRED"
|
||||
# the code which implements the output routines
|
||||
"opm-output REQUIRED"
|
||||
# the code which implements grids
|
||||
"opm-grid REQUIRED"
|
||||
)
|
||||
|
||||
@@ -12,7 +12,7 @@ set (opm-flowdiagnostics-applications_DEPS
|
||||
# compile with C++0x/11 support if available
|
||||
"CXX11Features REQUIRED"
|
||||
"Boost 1.44.0
|
||||
COMPONENTS filesystem system unit_test_framework REQUIRED"
|
||||
COMPONENTS filesystem regex system unit_test_framework REQUIRED"
|
||||
"ERT REQUIRED"
|
||||
# prerequisite OPM modules
|
||||
"opm-common REQUIRED;
|
||||
|
||||
@@ -9,9 +9,8 @@ set (opm-grid_CONFIG_VAR
|
||||
DUNE_COMMON_VERSION_MAJOR
|
||||
DUNE_COMMON_VERSION_MINOR
|
||||
DUNE_COMMON_VERSION_REVISION
|
||||
DUNE_ISTL_VERSION_MAJOR
|
||||
DUNE_ISTL_VERSION_MINOR
|
||||
DUNE_ISTL_VERSION_REVISION
|
||||
HAVE_DUNE_ISTL
|
||||
HAVE_MPI
|
||||
HAVE_ZOLTAN
|
||||
)
|
||||
|
||||
@@ -24,13 +23,11 @@ set (opm-grid_DEPS
|
||||
# various runtime library enhancements
|
||||
"Boost 1.44.0
|
||||
COMPONENTS date_time filesystem system unit_test_framework REQUIRED"
|
||||
# DUNE dependency
|
||||
"dune-common REQUIRED;
|
||||
dune-grid REQUIRED;
|
||||
dune-geometry REQUIRED
|
||||
dune-istl"
|
||||
# OPM dependency
|
||||
"opm-common REQUIRED;
|
||||
opm-core REQUIRED"
|
||||
"MPI"
|
||||
"dune-common"
|
||||
"dune-grid REQUIRED"
|
||||
"dune-istl"
|
||||
"opm-common REQUIRED"
|
||||
"opm-parser REQUIRED"
|
||||
"ZOLTAN"
|
||||
)
|
||||
|
||||
@@ -20,4 +20,6 @@ set (opm-material_DEPS
|
||||
"opm-common REQUIRED"
|
||||
# DUNE dependency
|
||||
"dune-common REQUIRED"
|
||||
# valgrind client requests
|
||||
"Valgrind"
|
||||
)
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
set (opm-simulators_CONFIG_VAR
|
||||
HAVE_OPM_GRID
|
||||
HAVE_PTHREAD
|
||||
HAVE_EWOMS
|
||||
DUNE_ISTL_VERSION_MAJOR
|
||||
DUNE_ISTL_VERSION_MINOR
|
||||
DUNE_ISTL_VERSION_REVISION
|
||||
)
|
||||
|
||||
# dependencies
|
||||
@@ -20,12 +24,13 @@ set (opm-simulators_DEPS
|
||||
"dune-common REQUIRED;
|
||||
dune-istl REQUIRED"
|
||||
"ERTPython"
|
||||
# OPM dependency
|
||||
# OPM dependency
|
||||
"opm-common REQUIRED;
|
||||
opm-parser REQUIRED;
|
||||
opm-core REQUIRED;
|
||||
opm-output REQUIRED;
|
||||
opm-grid"
|
||||
opm-parser REQUIRED;
|
||||
opm-grid REQUIRED;
|
||||
opm-core REQUIRED;
|
||||
opm-output REQUIRED;
|
||||
ewoms REQUIRED"
|
||||
# Eigen
|
||||
"Eigen3 3.2.0"
|
||||
)
|
||||
|
||||
@@ -26,7 +26,7 @@ set (opm-upscaling_DEPS
|
||||
dune-geometry REQUIRED;
|
||||
dune-grid REQUIRED;
|
||||
opm-common REQUIRED;
|
||||
opm-grid REQUIRED;
|
||||
opm-core REQUIRED;
|
||||
opm-grid REQUIRED;
|
||||
opm-output REQUIRED"
|
||||
)
|
||||
|
||||
2
debian/changelog
vendored
2
debian/changelog
vendored
@@ -1,4 +1,4 @@
|
||||
opm-common (2015.10-1~trusty) trusty; urgency=medium
|
||||
opm-common (2017.04-rfinal-1~xenial) xenial; urgency=medium
|
||||
|
||||
* New release
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
Module: opm-common
|
||||
Description: Open Porous Media Initiative shared infrastructure
|
||||
Version: 2016.10-pre
|
||||
Label: 2016.10-pre
|
||||
Version: 2017.04
|
||||
Label: 2017.04
|
||||
Maintainer: opm@opm-project.org
|
||||
MaintainerName: OPM community
|
||||
Url: http://opm-project.org
|
||||
|
||||
@@ -83,7 +83,12 @@ function build_module {
|
||||
test $? -eq 0 || exit 1
|
||||
if test $2 -eq 1
|
||||
then
|
||||
cmake --build .
|
||||
if [ ! -z $BUILDTHREADS ]
|
||||
then
|
||||
cmake --build . -- -j$BUILDTHREADS
|
||||
else
|
||||
cmake --build .
|
||||
fi
|
||||
test $? -eq 0 || exit 2
|
||||
ctest -T Test --no-compress-output
|
||||
|
||||
@@ -96,7 +101,12 @@ function build_module {
|
||||
sed -e "s/classname=\"TestSuite\"/classname=\"${configuration}\"/g" testoutput.xml > $WORKSPACE/$configuration/testoutput.xml
|
||||
fi
|
||||
else
|
||||
cmake --build . --target install
|
||||
if [ ! -z $BUILDTHREADS ]
|
||||
then
|
||||
cmake --build . --target install -- -j$BUILDTHREADS
|
||||
else
|
||||
cmake --build . --target install
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -173,7 +183,13 @@ function build_downstreams {
|
||||
# Installation for downstream
|
||||
pushd .
|
||||
cd $WORKSPACE/$configuration/build-$downstream
|
||||
cmake --build . --target install
|
||||
|
||||
if [ ! -z $BUILDTHREADS ]
|
||||
then
|
||||
cmake --build . --target install -- -j$BUILDTHREADS
|
||||
else
|
||||
cmake --build . --target install
|
||||
fi
|
||||
popd
|
||||
egrep_cmd="$egrep_cmd $WORKSPACE/$configuration/build-$downstream/testoutput.xml"
|
||||
done
|
||||
|
||||
@@ -12,11 +12,12 @@ downstreams=(ert
|
||||
opm-parser
|
||||
opm-output
|
||||
opm-material
|
||||
opm-core
|
||||
opm-grid
|
||||
opm-core
|
||||
ewoms
|
||||
opm-simulators
|
||||
opm-upscaling
|
||||
ewoms)
|
||||
)
|
||||
|
||||
declare -A downstreamRev
|
||||
downstreamRev[ert]=master
|
||||
@@ -25,9 +26,9 @@ downstreamRev[opm-material]=master
|
||||
downstreamRev[opm-core]=master
|
||||
downstreamRev[opm-grid]=master
|
||||
downstreamRev[opm-output]=master
|
||||
downstreamRev[ewoms]=master
|
||||
downstreamRev[opm-simulators]=master
|
||||
downstreamRev[opm-upscaling]=master
|
||||
downstreamRev[ewoms]=master
|
||||
|
||||
parseRevisions
|
||||
printHeader opm-common
|
||||
|
||||
58
jenkins/update-opm-data.sh
Executable file
58
jenkins/update-opm-data.sh
Executable file
@@ -0,0 +1,58 @@
|
||||
#!/bin/bash
|
||||
|
||||
MAIN_REPO=$1 # The repo the update was triggered from
|
||||
|
||||
source $WORKSPACE/deps/opm-common/jenkins/build-opm-module.sh
|
||||
|
||||
declare -a upstreams # Everything is considered an upstream to aid code reuse
|
||||
upstreams=(ert
|
||||
opm-common
|
||||
opm-parser
|
||||
opm-output
|
||||
opm-material
|
||||
opm-grid
|
||||
opm-core
|
||||
ewoms
|
||||
opm-simulators
|
||||
opm-upscaling
|
||||
)
|
||||
|
||||
declare -A upstreamRev
|
||||
upstreamRev[ert]=master
|
||||
upstreamRev[opm-common]=master
|
||||
upstreamRev[opm-parser]=master
|
||||
upstreamRev[opm-material]=master
|
||||
upstreamRev[opm-core]=master
|
||||
upstreamRev[opm-grid]=master
|
||||
upstreamRev[opm-output]=master
|
||||
upstreamRev[ewoms]=master
|
||||
upstreamRev[opm-simulators]=master
|
||||
upstreamRev[opm-upscaling]=master
|
||||
|
||||
# Setup revision tables
|
||||
parseRevisions
|
||||
upstreamRev[$MAIN_REPO]=$sha1
|
||||
|
||||
# Create branch name
|
||||
BRANCH_NAME="update"
|
||||
for repo in ${upstreams[*]}
|
||||
do
|
||||
if [ "${upstreamRev[$repo]}" != "master" ]
|
||||
then
|
||||
rev=${upstreamRev[$repo]}
|
||||
prnumber=${rev//[!0-9]/}
|
||||
BRANCH_NAME="${BRANCH_NAME}_${repo}_$prnumber"
|
||||
test -n "$REASON" && REASON+=" "
|
||||
REASON+="https://github.com/OPM/$repo/pull/$prnumber\n"
|
||||
fi
|
||||
done
|
||||
|
||||
# Do the commit
|
||||
export REASON
|
||||
export BRANCH_NAME
|
||||
$WORKSPACE/deps/opm-simulators/tests/update_reference_data.sh $OPM_DATA_ROOT
|
||||
|
||||
# Finally open the pull request
|
||||
cd $OPM_DATA_ROOT
|
||||
git remote add jenkins4opm git@github.com:jenkins4opm/opm-data
|
||||
git-open-pull -u jenkins4opm --base-account OPM --base-repo opm-data -r /tmp/cmsg $BRANCH_NAME
|
||||
@@ -85,8 +85,9 @@ namespace Log {
|
||||
return message; // No color coding, not even the code for default color.
|
||||
case MessageType::Warning:
|
||||
return AnsiTerminalColors::blue_strong + message + AnsiTerminalColors::none;
|
||||
case MessageType::Error:
|
||||
case MessageType::Problem:
|
||||
return AnsiTerminalColors::magenta_strong + message + AnsiTerminalColors::none;
|
||||
case MessageType::Error:
|
||||
case MessageType::Bug:
|
||||
return AnsiTerminalColors::red_strong + message + AnsiTerminalColors::none;
|
||||
default:
|
||||
|
||||
@@ -49,6 +49,8 @@ namespace Log {
|
||||
const std::string yellow_strong = "\033[33;1m";
|
||||
const std::string blue = "\033[34m";
|
||||
const std::string blue_strong = "\033[34;1m";
|
||||
const std::string magenta = "\033[35m";
|
||||
const std::string magenta_strong = "\033[35;1m";
|
||||
const std::string default_color = "\033[39m";
|
||||
}
|
||||
|
||||
|
||||
@@ -21,9 +21,27 @@
|
||||
#include <opm/common/OpmLog/Logger.hpp>
|
||||
#include <opm/common/OpmLog/StreamLog.hpp>
|
||||
#include <iostream>
|
||||
#include <errno.h> // For errno
|
||||
#include <stdio.h> // For fileno() and stdout
|
||||
#include <unistd.h> // For isatty()
|
||||
|
||||
namespace Opm {
|
||||
|
||||
namespace {
|
||||
bool stdoutIsTerminal()
|
||||
{
|
||||
const int errno_save = errno; // For playing nice with C error handling.
|
||||
const int file_descriptor = fileno(stdout);
|
||||
if (file_descriptor == -1) {
|
||||
// stdout is an invalid stream
|
||||
errno = errno_save;
|
||||
return false;
|
||||
} else {
|
||||
return isatty(file_descriptor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::shared_ptr<Logger> OpmLog::getLogger() {
|
||||
if (!m_logger)
|
||||
@@ -176,12 +194,14 @@ namespace Opm {
|
||||
|
||||
|
||||
|
||||
void OpmLog::setupSimpleDefaultLogging(const bool use_prefix)
|
||||
void OpmLog::setupSimpleDefaultLogging(const bool use_prefix,
|
||||
const bool use_color_coding,
|
||||
const int message_limit)
|
||||
{
|
||||
std::shared_ptr<StreamLog> streamLog = std::make_shared<StreamLog>(std::cout, Log::DefaultMessageTypes);
|
||||
OpmLog::addBackend( "SimpleDefaultLog", streamLog);
|
||||
streamLog->setMessageLimiter(std::make_shared<MessageLimiter>(10));
|
||||
streamLog->setMessageFormatter(std::make_shared<SimpleMessageFormatter>(use_prefix, true));
|
||||
streamLog->setMessageLimiter(std::make_shared<MessageLimiter>(message_limit));
|
||||
streamLog->setMessageFormatter(std::make_shared<SimpleMessageFormatter>(use_prefix, use_color_coding && stdoutIsTerminal()));
|
||||
}
|
||||
/******************************************************************/
|
||||
|
||||
|
||||
@@ -64,7 +64,16 @@ public:
|
||||
static void removeAllBackends();
|
||||
static bool enabledMessageType( int64_t messageType );
|
||||
static void addMessageType( int64_t messageType , const std::string& prefix);
|
||||
static void setupSimpleDefaultLogging(const bool use_prefix);
|
||||
|
||||
/// Create a basic logging setup that will send all log messages to standard output.
|
||||
///
|
||||
/// By default category prefixes will be printed (i.e. Error: or
|
||||
/// Warning:), color coding will be used, and a maximum of 10
|
||||
/// messages with the same tag will be printed. These settings can
|
||||
/// be controlled by the function parameters.
|
||||
static void setupSimpleDefaultLogging(const bool use_prefix = true,
|
||||
const bool use_color_coding = true,
|
||||
const int message_limit = 10);
|
||||
|
||||
template <class BackendType>
|
||||
static std::shared_ptr<BackendType> getBackend(const std::string& name) {
|
||||
|
||||
62
opm/common/ResetLocale.hpp
Normal file
62
opm/common/ResetLocale.hpp
Normal file
@@ -0,0 +1,62 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
* \brief Provides a free function to reset the localization settings
|
||||
*
|
||||
* Under some circumstances, some environments seem to set a locale which they do not
|
||||
* install. In turn this leads to std::runtime_errror being thrown by some parts of Boost
|
||||
* (for some versions) which causes unsolicited program aborts.
|
||||
*
|
||||
* This issue asside, it looks pretty weird if the e.g. the number format is inconsistent
|
||||
* with the language used by rest of the simulation.
|
||||
*/
|
||||
#ifndef OPM_RESET_LOCALE_HH
|
||||
#define OPM_RESET_LOCALE_HH
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
inline void resetLocale()
|
||||
{
|
||||
#ifndef WIN32
|
||||
// this probably only works for POSIX compatible operating systems. for all others,
|
||||
// unsetting a few environment variables should not hurt, though.
|
||||
unsetenv("LC_ALL");
|
||||
unsetenv("LANG");
|
||||
unsetenv("LANGUAGE");
|
||||
unsetenv("LC_ADDRESS");
|
||||
unsetenv("LC_COLLATE");
|
||||
unsetenv("LC_CTYPE");
|
||||
unsetenv("LC_IDENTIFICATION");
|
||||
unsetenv("LC_MEASUREMENT");
|
||||
unsetenv("LC_MESSAGES");
|
||||
unsetenv("LC_MONETARY");
|
||||
unsetenv("LC_NAME");
|
||||
unsetenv("LC_NUMERIC");
|
||||
unsetenv("LC_PAPER");
|
||||
unsetenv("LC_TELEPHONE");
|
||||
unsetenv("LC_TIME");
|
||||
#endif // !WIN32
|
||||
}
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
#endif
|
||||
43
opm/common/Unused.hpp
Normal file
43
opm/common/Unused.hpp
Normal file
@@ -0,0 +1,43 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
* \brief Provides the OPM_UNUSED macro
|
||||
*
|
||||
* This macro can be used to mark variables as "potentially unused" which suppresses some
|
||||
* bogus compiler warnings. If the compiler does not support this, the macro is a no-op.
|
||||
*/
|
||||
#ifndef OPM_UNUSED_HH
|
||||
#define OPM_UNUSED_HH
|
||||
|
||||
#ifndef HAS_ATTRIBUTE_UNUSED
|
||||
#define OPM_UNUSED
|
||||
#else
|
||||
#define OPM_UNUSED __attribute__((unused))
|
||||
#endif
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define OPM_DEBUG_UNUSED
|
||||
#define OPM_OPTIM_UNUSED OPM_UNUSED
|
||||
#else
|
||||
#define OPM_DEBUG_UNUSED OPM_UNUSED
|
||||
#define OPM_OPTIM_UNUSED
|
||||
#endif
|
||||
|
||||
#endif
|
||||
311
opm/common/Valgrind.hpp
Normal file
311
opm/common/Valgrind.hpp
Normal file
@@ -0,0 +1,311 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Consult the COPYING file in the top-level source directory of this
|
||||
module for the precise wording of the license and the list of
|
||||
copyright holders.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
* \brief Some templates to wrap the valgrind client request macros
|
||||
*/
|
||||
#ifndef OPM_VALGRIND_HPP
|
||||
#define OPM_VALGRIND_HPP
|
||||
|
||||
#include <opm/common/Unused.hpp>
|
||||
|
||||
#if HAVE_VALGRIND
|
||||
#include <valgrind/memcheck.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_VALGRIND
|
||||
#define OPM_VALGRIND_OPTIM_UNUSED OPM_OPTIM_UNUSED
|
||||
#else
|
||||
#define OPM_VALGRIND_OPTIM_UNUSED OPM_UNUSED
|
||||
#endif
|
||||
|
||||
namespace Opm {
|
||||
namespace Valgrind {
|
||||
/*!
|
||||
* \ingroup Valgrind
|
||||
* \brief Returns whether the program is running under Valgrind or not.
|
||||
*/
|
||||
inline bool IsRunning()
|
||||
{
|
||||
#if !defined NDEBUG && HAVE_VALGRIND
|
||||
return RUNNING_ON_VALGRIND;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup Valgrind
|
||||
* \brief Make valgrind complain if any of the memory occupied by an object
|
||||
* is undefined.
|
||||
*
|
||||
* Please note that this does not check whether the destinations of an
|
||||
* object's pointers or references are defined. Also, for performance
|
||||
* reasons the compiler might insert "padding bytes" between within
|
||||
* the objects which leads to false positives.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* \code
|
||||
* int i;
|
||||
* Valgrind::CheckDefined(i); // Valgrind complains!
|
||||
* \endcode
|
||||
*
|
||||
* \tparam T The type of the object which ought to be checked
|
||||
*
|
||||
* \param value the object which valgrind should check
|
||||
*
|
||||
* \return true iff there are no undefined bytes in the memory
|
||||
* occupied by the object.
|
||||
*/
|
||||
template <class T>
|
||||
inline bool CheckDefined(const T& value OPM_VALGRIND_OPTIM_UNUSED)
|
||||
{
|
||||
#if !defined NDEBUG && HAVE_VALGRIND
|
||||
auto tmp = VALGRIND_CHECK_MEM_IS_DEFINED(&value, sizeof(T));
|
||||
return tmp == 0;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup Valgrind
|
||||
* \brief Make valgrind complain if any of the memory occupied by an object
|
||||
* is not addressable.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* \code
|
||||
* int* i = NULL;
|
||||
* Valgrind::CheckAddressable(*i); // Valgrind complains!
|
||||
* \endcode
|
||||
*
|
||||
* \tparam T The type of the object which ought to be checked
|
||||
*
|
||||
* \param value the object which valgrind should check
|
||||
*
|
||||
* \return true iff there are no unadressable bytes in the memory
|
||||
* occupied by the object.
|
||||
*/
|
||||
template <class T>
|
||||
inline bool CheckAddressable(const T& value OPM_VALGRIND_OPTIM_UNUSED)
|
||||
{
|
||||
#if !defined NDEBUG && HAVE_VALGRIND
|
||||
auto tmp = VALGRIND_CHECK_MEM_IS_ADDRESSABLE(&value, sizeof(T));
|
||||
return tmp == 0;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup Valgrind
|
||||
* \brief Make valgrind complain if any of the the memory occupied
|
||||
* by a C-style array objects is undefined.
|
||||
*
|
||||
* Please note that this does not check whether the destinations of an
|
||||
* object's pointers or references are defined. Also, for performance
|
||||
* reasons the compiler might insert "padding bytes" between within
|
||||
* the objects which leads to false positives.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* \code
|
||||
* int i[2];
|
||||
* Valgrind::CheckDefined(i, 2); // Valgrind complains!
|
||||
* \endcode
|
||||
*
|
||||
* \tparam T The type of the object which ought to be checked
|
||||
*
|
||||
* \param value Pointer to the first object of the array.
|
||||
* \param size The size of the array in number of objects
|
||||
*
|
||||
* \return true iff there are no undefined bytes in the memory
|
||||
* occupied by the array.
|
||||
*/
|
||||
template <class T>
|
||||
inline bool CheckDefined(const T* value OPM_VALGRIND_OPTIM_UNUSED, int size OPM_VALGRIND_OPTIM_UNUSED)
|
||||
{
|
||||
#if !defined NDEBUG && HAVE_VALGRIND
|
||||
auto tmp = VALGRIND_CHECK_MEM_IS_DEFINED(value, size*sizeof(T));
|
||||
return tmp == 0;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup Valgrind
|
||||
* \brief Make the memory on which an object resides undefined in
|
||||
* valgrind runs.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* \code
|
||||
* int i = 0;
|
||||
* Valgrind::SetUndefined(i);
|
||||
* Valgrind::CheckDefined(i); // Valgrind complains!
|
||||
* \endcode
|
||||
*
|
||||
* \tparam T The type of the object which ought to be set to undefined
|
||||
*
|
||||
* \param value The object which's memory valgrind should be told is undefined
|
||||
*/
|
||||
template <class T>
|
||||
inline void SetUndefined(const T &value OPM_VALGRIND_OPTIM_UNUSED)
|
||||
{
|
||||
#if !defined NDEBUG && HAVE_VALGRIND
|
||||
VALGRIND_MAKE_MEM_UNDEFINED(&value, sizeof(T));
|
||||
#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup Valgrind
|
||||
* \brief Make the memory on which an array of object resides
|
||||
* undefined in valgrind runs.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* \code
|
||||
* int i[3] = {0, 1, 3};
|
||||
* Valgrind::SetUndefined(&i[1], 2);
|
||||
* Valgrind::CheckDefined(i, 3); // Valgrind complains!
|
||||
* \endcode
|
||||
*
|
||||
* \tparam T The type of the object which ought to be set to undefined
|
||||
*
|
||||
* \param value Pointer to the first object of the array.
|
||||
* \param size The size of the array in number of objects
|
||||
*/
|
||||
template <class T>
|
||||
inline void SetUndefined(const T* value OPM_VALGRIND_OPTIM_UNUSED, int size OPM_VALGRIND_OPTIM_UNUSED)
|
||||
{
|
||||
#if !defined NDEBUG && HAVE_VALGRIND
|
||||
VALGRIND_MAKE_MEM_UNDEFINED(value, size*sizeof(T));
|
||||
#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup Valgrind
|
||||
* \brief Make the memory on which an object resides defined.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* \code
|
||||
* int i;
|
||||
* Valgrind::SetDefined(i);
|
||||
* Valgrind::CheckDefined(i); // Valgrind does not complain!
|
||||
* \endcode
|
||||
*
|
||||
* \tparam T The type of the object which valgrind should consider as defined
|
||||
*
|
||||
* \param value The object which's memory valgrind should consider as defined
|
||||
*/
|
||||
template <class T>
|
||||
inline void SetDefined(const T& value OPM_VALGRIND_OPTIM_UNUSED)
|
||||
{
|
||||
#if !defined NDEBUG && HAVE_VALGRIND
|
||||
VALGRIND_MAKE_MEM_DEFINED(&value, sizeof(T));
|
||||
#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup Valgrind
|
||||
* \brief Make the memory on which a C-style array of objects resides
|
||||
* defined.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* \code
|
||||
* int i[3];
|
||||
* Valgrind::SetDefined(i, 3);
|
||||
* Valgrind::CheckDefined(i, 3); // Valgrind does not complain!
|
||||
* \endcode
|
||||
*
|
||||
* \tparam T The type of the object which valgrind should consider as defined
|
||||
*
|
||||
* \param value Pointer to the first object of the array.
|
||||
* \param n The size of the array in number of objects
|
||||
*/
|
||||
template <class T>
|
||||
inline void SetDefined(const T *value OPM_VALGRIND_OPTIM_UNUSED, int n OPM_VALGRIND_OPTIM_UNUSED)
|
||||
{
|
||||
#if !defined NDEBUG && HAVE_VALGRIND
|
||||
VALGRIND_MAKE_MEM_DEFINED(value, n*sizeof(T));
|
||||
#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup Valgrind
|
||||
* \brief Make valgrind complain if an object's memory is accessed.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* \code
|
||||
* int i = 1;
|
||||
* Valgrind::SetNoAccess(i);
|
||||
* int j = i; // Valgrind complains!
|
||||
* \endcode
|
||||
*
|
||||
* \tparam T The type of the object which valgrind should complain if accessed
|
||||
*
|
||||
* \param value The object which's memory valgrind should complain if accessed
|
||||
*/
|
||||
template <class T>
|
||||
inline void SetNoAccess(const T &value OPM_VALGRIND_OPTIM_UNUSED)
|
||||
{
|
||||
#if !defined NDEBUG && HAVE_VALGRIND
|
||||
VALGRIND_MAKE_MEM_NOACCESS(&value, sizeof(T));
|
||||
#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup Valgrind
|
||||
* \brief Make valgrind complain if the memory of a C-style array of
|
||||
* objects is accessed.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* \code
|
||||
* int i[3] = {0, 1, 2};
|
||||
* Valgrind::SetNoAccess(i, 2);
|
||||
* int j = i[1]; // Valgrind complains!
|
||||
* \endcode
|
||||
*
|
||||
* \param value Pointer to the first object of the array.
|
||||
* \param size The size of the array in number of objects
|
||||
*/
|
||||
template <class T>
|
||||
inline void SetNoAccess(const T *value OPM_VALGRIND_OPTIM_UNUSED, int size OPM_VALGRIND_OPTIM_UNUSED)
|
||||
{
|
||||
#if !defined NDEBUG && HAVE_VALGRIND
|
||||
VALGRIND_MAKE_MEM_NOACCESS(value, size*sizeof(T));
|
||||
#endif
|
||||
}
|
||||
|
||||
}} // namespace Valgrind, Opm
|
||||
|
||||
#endif
|
||||
@@ -73,6 +73,9 @@
|
||||
#pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
|
||||
#pragma GCC diagnostic ignored "-Wcast-align"
|
||||
#pragma GCC diagnostic ignored "-Wcast-qual"
|
||||
#pragma GCC diagnostic ignored "-Wignored-attributes"
|
||||
#pragma GCC diagnostic ignored "-Wmisleading-indentation"
|
||||
#endif // COMPATIBLE_COMPILER
|
||||
|
||||
#endif // SILENCE_EXTERNAL_WARNINGS
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
# spec file for package opm-common
|
||||
#
|
||||
|
||||
%define tag rc4
|
||||
%define tag final
|
||||
|
||||
Name: opm-common
|
||||
Version: 2015.10
|
||||
Version: 2017.04
|
||||
Release: 0
|
||||
Summary: Open Porous Media - common helpers and buildsystem
|
||||
License: GPL-3.0
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
pushd . > /dev/null
|
||||
opm-common/travis/build-opm-common.sh
|
||||
cd opm-common/build
|
||||
ctest --output-on-failure
|
||||
popd > /dev/null
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
build_order=(opm-common opm-parser opm-material opm-output opm-core opm-grid ewoms opm-simulators opm-upscaling)
|
||||
build_order=(opm-common opm-parser opm-material opm-output opm-grid opm-core ewoms opm-simulators)
|
||||
|
||||
# This shell script should be started with the name of a module as
|
||||
# only only command line argument. It will start by building all
|
||||
@@ -30,7 +30,7 @@ function upstream_build {
|
||||
echo "Building: ${project}"
|
||||
mkdir -p ${project}/build
|
||||
pushd ${project}/build > /dev/null
|
||||
cmake ../ -DENABLE_PYTHON=ON -DBUILD_TESTING=OFF -DSILENCE_EXTERNAL_WARNINGS=True -DUSE_QUADMATH=OFF -DADD_DISABLED_CTESTS=OFF
|
||||
cmake ../ -DENABLE_PYTHON=ON -DBUILD_TESTING=OFF -DSILENCE_EXTERNAL_WARNINGS=ON -DUSE_QUADMATH=OFF -DADD_DISABLED_CTESTS=OFF
|
||||
make
|
||||
popd > /dev/null
|
||||
}
|
||||
@@ -44,9 +44,14 @@ function downstream_build_and_test {
|
||||
# The build commands cmake, make and ctest must be given as
|
||||
# separate commands and not chained with &&. If chaining with &&
|
||||
# is used the 'set -e' does not exit on first error.
|
||||
cmake ../ -DENABLE_PYTHON=ON -DBUILD_TESTING=ON -DSILENCE_EXTERNAL_WARNINGS=True -DUSE_QUADMATH=OFF -DADD_DISABLED_CTESTS=OFF
|
||||
make
|
||||
ctest --output-on-failure
|
||||
if [ "$project" == "ewoms" ]; then
|
||||
cmake ../ -DENABLE_PYTHON=ON -DBUILD_TESTING=OFF -DSILENCE_EXTERNAL_WARNINGS=ON -DUSE_QUADMATH=OFF -DADD_DISABLED_CTESTS=OFF
|
||||
make
|
||||
else
|
||||
cmake ../ -DENABLE_PYTHON=ON -DBUILD_TESTING=ON -DSILENCE_EXTERNAL_WARNINGS=ON -DUSE_QUADMATH=OFF -DADD_DISABLED_CTESTS=OFF
|
||||
make
|
||||
ctest --output-on-failure
|
||||
fi
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
pushd . > /dev/null
|
||||
cd opm-common
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ../ -DBUILD_SHARED_LIBS=ON
|
||||
make
|
||||
popd > /dev/null
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
pushd . > /dev/null
|
||||
cd opm-common
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ../
|
||||
make
|
||||
popd > /dev/null
|
||||
Reference in New Issue
Block a user