Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow C++17 language features. #2298

Merged
merged 17 commits into from Jan 4, 2019

Conversation

Projects
None yet
2 participants
@endJunction
Copy link
Member

endJunction commented Dec 14, 2018

The current minimum compilers must support it though.

@endJunction

This comment has been minimized.

Copy link
Member Author

endJunction commented Dec 14, 2018

@bilke For the Eigen-3.2.10, I think a new branch in https://github.com/bilke/conan-eigen3/tree/release/3.2.9 is needed. Could you create one? I have no push permission there; Just two changes:

diff --git a/Jenkinsfile b/Jenkinsfile
index 9afb89d..4ec378a 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -2,4 +2,4 @@
 
 // Implementation at:
 // https://github.com/ufz/jenkins-pipeline-library/blob/master/vars/conanBuild.groovy
-conanBuild("Eigen3/3.2.9")
+conanBuild("Eigen3/3.2.10")
diff --git a/conanfile.py b/conanfile.py
index 6151a0d..c7344f1 100644
--- a/conanfile.py
+++ b/conanfile.py
@@ -5,7 +5,7 @@ from conans.tools import download, unzip
 class Eigen3Conan(ConanFile):
     name = "Eigen3"
     description = "Eigen is a C++ template library for linear algebra"
-    version = "3.2.9"
+    version = "3.2.10"
     generators = "cmake"
     exports = ["FindEigen3.cmake"]
     url="http://github.com/bilke/conan-eigen3"
@bilke

This comment has been minimized.

Copy link
Member

bilke commented Dec 18, 2018

TODO self: Remove FindEigen3.cmake?

In CMake 3.12 and above the ``find_package(PackageName)`` command now searches
a prefix specified by a ``PackageName_ROOT`` CMake or environment variable.
Package roots are maintained as a stack so nested calls to all ``find_*``
commands inside find modules also search the roots as prefixes.  This policy
provides compatibility with projects that have not been updated to avoid using
``PackageName_ROOT`` variables for other purposes.

The ``OLD`` behavior for this policy is to ignore ``PackageName_ROOT``
variables.  The ``NEW`` behavior for this policy is to use ``PackageName_ROOT``
variables.

This policy was introduced in CMake version 3.12.  CMake version
3.12.0 warns when the policy is not set and uses ``OLD`` behavior.
Use the ``cmake_policy()`` command to set it to ``OLD`` or ``NEW``
explicitly.

@endJunction endJunction force-pushed the endJunction:c++17 branch from b1c1503 to 481065d Dec 18, 2018

@endJunction

This comment has been minimized.

Copy link
Member Author

endJunction commented Dec 18, 2018

@bilke maybe netlify also needs a --force for submodules?

@bilke

This comment has been minimized.

Copy link
Member

bilke commented Dec 19, 2018

@endJunction There is no way to configure git stuff.. I cleared the cache and rebuild, works.

@bilke bilke force-pushed the endJunction:c++17 branch 3 times, most recently from c53cf4c to a107d1b Dec 19, 2018

@bilke

This comment has been minimized.

Copy link
Member

bilke commented Dec 19, 2018

@endJunction This is strange, on mac on running the tests GeoLib.InsertTwoPointsInGrid and NumLibDistributionQuad.InterpolationSurface (and maybe more) sometimes I get a segfault, and sometimes a malloc error:

Note: Google Test filter = GeoLib.InsertTwoPointsInGrid
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from GeoLib
[ RUN      ] GeoLib.InsertTwoPointsInGrid
testrunner(46498,0x10ca965c0) malloc: can't allocate region
*** mach_vm_map(size=2305825481739694080) failed (error code=3)
testrunner(46498,0x10ca965c0) malloc: *** set a breakpoint in malloc_error_break to debug
/Users/bilke/code/ogs6/ogs/Tests/GeoLib/TestGrid.cpp:42: Failure
Expected: GeoLib::Grid<GeoLib::Point> grid(pnts.begin(), pnts.end()) doesn't throw an exception.
  Actual: it throws.
[  FAILED  ] GeoLib.InsertTwoPointsInGrid (1 ms)

and

➜ bin/testrunner --gtest_filter=NumLibDistributionQuad.InterpolationSurface

Note: Google Test filter = NumLibDistributionQuad.InterpolationSurface
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from NumLibDistributionQuad
[ RUN      ] NumLibDistributionQuad.InterpolationSurface
testrunner(47852,0x10ece85c0) malloc: *** error for object 0x7000000000000000: pointer being freed was not allocated
testrunner(47852,0x10ece85c0) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort      bin/testrunner --gtest_filter=NumLibDistributionQuad.InterpolationSurface

Switching googletest from master to tag 1.8.1 did not help.

@endJunction endJunction force-pushed the endJunction:c++17 branch from 4074b7b to a8cbc14 Dec 24, 2018

@endJunction endJunction force-pushed the endJunction:c++17 branch from a8cbc14 to b80a00d Jan 2, 2019

@bilke bilke force-pushed the endJunction:c++17 branch from b80a00d to e1bb4b9 Jan 3, 2019

@endJunction endJunction force-pushed the endJunction:c++17 branch from e1bb4b9 to 028193c Jan 3, 2019

endJunction and others added some commits Dec 14, 2018

[BL] ConfigTree; Replace deprecated uncaught_excpt
The `bool uncaught_exception()' is deprecated since c++17
and is replaced by `int uncaught_exceptions()'.
Require Eigen-3.3.4.
Related to c++17 removed binder* functions.
Fixed in http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1276
http://eigen.tuxfamily.org/index.php?title=ChangeLog#Eigen_3.2.10

Other binder* functions were removed only in the 3.3 branch.
[T] Replace std::random_shuffle with std::shuffle.
The latter takes a random generator while the former uses
std::rand implicitly.
The std::random_shuffle was marked deprecated and is removed
from the c++17.
Add current googletest version as submodule.
The original gtest folder is removed.

Reason is the removed namespace std::tr1 no longer available in the VS2017.
Fixed in PR google/googletest#1218
and the related issue is google/googletest#1138
[CMake] Added ThirdParty/jedbrown-cmake-modules.
Contains up-to-date FindPETSc and FindNetCDF.
[GL] Move default initialization of Grid members.
The original initialization of the std::array's was by copy anyway
and somehow caused in seg faults on mac after adding c++17 standard.
Increase Jenkins timeout to 4h.
MacOS repeatedly could not finish in 3h.
[T] SDN; Relax medium/beam sigma tol slightly.
Failing on mac now with error 9.2e-7 since c++17/Eigen-3.3 change.
Set OMP_NUM_THREADS=1 on all stages running ogs.
In multi-threaded environments multiple ctests running
parallel fight for the same cpu threads otherwise.

@endJunction endJunction force-pushed the endJunction:c++17 branch from 21e2e3f to cfb9427 Jan 4, 2019

@bilke

bilke approved these changes Jan 4, 2019

@@ -7,7 +7,7 @@ module load git

# Libraries
module load boost/1.62.0-1
module load eigen/3.3.4-1-cmake
module load eigen/3.3.4-1-cmake # TODO update/create module on eve

This comment has been minimized.

@bilke

bilke Jan 4, 2019

Member

Is available now.

@endJunction endJunction force-pushed the endJunction:c++17 branch from cfb9427 to 8561eb5 Jan 4, 2019

@endJunction endJunction merged commit b4e2396 into ufz:master Jan 4, 2019

1 of 3 checks passed

continuous-integration/jenkins/pr-merge This commit has test failures
Details
deploy/netlify Deploy preview failed.
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@endJunction endJunction deleted the endJunction:c++17 branch Jan 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.