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

HAVE_OPM_GRID is set to 0 although opm-grid is found #331

Closed
berndflemisch opened this issue Jun 18, 2018 · 8 comments
Closed

HAVE_OPM_GRID is set to 0 although opm-grid is found #331

berndflemisch opened this issue Jun 18, 2018 · 8 comments

Comments

@berndflemisch
Copy link
Member

berndflemisch commented Jun 18, 2018

Steps to reproduce this, at least for me:

mkdir TestOpmGrid; cd TestOpmGrid

git clone -b 2018.04 https://github.com/Statoil/libecl.git
mkdir libecl/build; cd libecl/build; cmake ..; make -j7; cd ../..

for MOD in common geometry grid localfunctions istl; do 
git clone -b releases/2.6 https://gitlab.dune-project.org/core/dune-$MOD.git;
done
git clone -b feature/support-cpgrid https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git

git clone -b release/2018.04 https://github.com/OPM/opm-common.git
git clone -b release/2018.04 https://github.com/OPM/opm-grid.git
cd opm-grid; patch -p1 <../dumux/patches/opm-grid-2018.04.patch; cd ..

export ecl_DIR=$PWD/libecl/build
CMAKE_FLAGS="-Decl_DIR=$ecl_DIR" ./dune-common/bin/dunecontrol all

grep 'opm' dumux/build-cmake/CMakeCache.txt
grep 'HAVE_OPM' dumux/build-cmake/config.h

This gives me

bernd@aladdin:/temp2/bernd/TestOpmGrid> grep 'opm' dumux/build-cmake/CMakeCache.txt
CMAKE_MODULE_PATH:UNINITIALIZED=/temp2/bernd/TestOpmGrid/opm-common/cmake/Modules
opm-common_DIR:UNINITIALIZED=/temp2/bernd/TestOpmGrid/opm-common/build-cmake
opm-grid_DIR:UNINITIALIZED=/temp2/bernd/TestOpmGrid/opm-grid/build-cmake
//Details about finding opm-common
FIND_PACKAGE_MESSAGE_DETAILS_opm-common:INTERNAL=[/temp2/bernd/TestOpmGrid/opm-common/build-cmake/lib/libopmcommon.a][v()]
bernd@aladdin:/temp2/bernd/TestOpmGrid> grep 'HAVE_OPM' dumux/build-cmake/config.h
#define HAVE_OPM_GRID 0
@blattms
Copy link
Member

blattms commented Jun 18, 2018 via email

@akva2
Copy link
Member

akva2 commented Jun 18, 2018

i can reproduce, and i can fix, though part of it is a bug and/or expectation violation in/for dunecontrol.

first, you have to pass -DUSE_MPI=1 in CMAKE_FLAGS. dune enables MPI unconditionally if found, in opm it is conditional and off by default. we get out of sync for the HAVE_MPI variable, and consequently opm-grid is not allowed to be used.

secondly, dc and/or dune build system bugs out for suggests. moving opm stuff to requires, it will work, but in that case i have to manually give opm-common_PREFIX and opm-grid_PREFIX for dc to find the dune.module files. i do not care to debug this tbh.

@blattms
Copy link
Member

blattms commented Jun 18, 2018

Well, the _PREFIX thing sound familiar, OPM/opm-common#302. IMHO this is rather a non-satisfied prerequisite of the DUNE buildsystem.

@blattms
Copy link
Member

blattms commented Jun 18, 2018

Shall I update that PR?

@akva2
Copy link
Member

akva2 commented Jun 18, 2018

which is why i tried to cover my a** in my first sentence :)

@akva2
Copy link
Member

akva2 commented Jun 18, 2018

and yes, it's obviously a requirement and very non-intrusive. update, test, will merge.

@berndflemisch
Copy link
Member Author

With OPM/opm-common#302, it works. Thank you! Is it possible that you cherry-pick this to release/2018.04?

@blattms
Copy link
Member

blattms commented Jun 19, 2018

Fixed with merge of OPM/opm-common#302

@blattms blattms closed this as completed Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants