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

Debug jenkins failure in opm-simulators #861

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 45 additions & 4 deletions opm/models/discretization/common/fvbaseelementcontext.hh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <dune/common/fvector.hh>

#include <vector>
#include <cstdlib>

namespace Opm {

Expand Down Expand Up @@ -98,6 +99,12 @@ public:
enableStorageCache_ = EWOMS_GET_PARAM(TypeTag, bool, EnableStorageCache);
stashedDofIdx_ = -1;
focusDofIdx_ = -1;
const char* opm_debug = std::getenv("OPM_DEBUG");
const bool debug = opm_debug != NULL && std::string(opm_debug) == "1";
if (debug) {
std::cout << "rd" << std::endl;
dofVars_.resize(1);
}
}

static void *operator new(size_t size)
Expand Down Expand Up @@ -152,10 +159,22 @@ public:
// remember the current element
elemPtr_ = &elem;

// update the finite element geometry
const char* opm_debug = std::getenv("OPM_DEBUG");
const bool debug = opm_debug != NULL && std::string(opm_debug) == "1";
if (debug) {
std::cout << "u" << std::endl;
}
stencil_.updatePrimaryTopology(elem);

dofVars_.resize(stencil_.numPrimaryDof());
auto numDof = stencil_.numPrimaryDof();
if (debug) {
std::cout << dofVars_.size()
<< "-" << numDof
<< std::endl;
}
dofVars_.resize(numDof);
if (debug) {
std::cout << "x" << std::endl;
}
}

/*!
Expand Down Expand Up @@ -208,7 +227,14 @@ public:
* \param timeIdx The index of the solution vector used by the time discretization.
*/
void updatePrimaryIntensiveQuantities(unsigned timeIdx)
{ updateIntensiveQuantities_(timeIdx, numPrimaryDof(timeIdx)); }
{
const char* opm_debug = std::getenv("OPM_DEBUG");
const bool debug = opm_debug != NULL && std::string(opm_debug) == "1";
if (debug) {
std::cout << "a" << std::endl;
}
updateIntensiveQuantities_(timeIdx, numPrimaryDof(timeIdx));
}

/*!
* \brief Compute the intensive quantities of a single sub-control volume of the
Expand Down Expand Up @@ -436,6 +462,16 @@ public:
IntensiveQuantities& intensiveQuantities(unsigned dofIdx, unsigned timeIdx)
{
assert(dofIdx < numDof(timeIdx));
const char* opm_debug = std::getenv("OPM_DEBUG");
const bool debug = opm_debug != NULL && std::string(opm_debug) == "1";
if (debug) {
std::cout << "iq" << std::endl;
}
//auto iq = dofVars_[dofIdx].intensiveQuantities[timeIdx];
//if (debug) {
// std::cout << "iq2" << std::endl;
//}
//return iq;
return dofVars_[dofIdx].intensiveQuantities[timeIdx];
}

Expand Down Expand Up @@ -545,6 +581,11 @@ protected:
*/
void updateIntensiveQuantities_(unsigned timeIdx, size_t numDof)
{
const char* opm_debug = std::getenv("OPM_DEBUG");
const bool debug = opm_debug != NULL && std::string(opm_debug) == "1";
if (debug) {
std::cout << "b" << std::endl;
}
// update the intensive quantities for the whole history
const SolutionVector& globalSol = model().solution(timeIdx);

Expand Down
15 changes: 15 additions & 0 deletions opm/models/discretization/ecfv/ecfvstencil.hh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include <opm/input/eclipse/EclipseState/Grid/FaceDir.hpp>

#include <vector>
#include <cstdlib>

namespace Opm {
/*!
Expand Down Expand Up @@ -293,10 +294,24 @@ public:

void updatePrimaryTopology(const Element& element)
{
const char* opm_debug = std::getenv("OPM_DEBUG");
const bool debug = opm_debug != NULL && std::string(opm_debug) == "1";
if (debug) {
std::cout << "upt1" << std::endl;
}
// add the "center" element of the stencil
subControlVolumes_.clear();
if (debug) {
std::cout << "upt2" << std::endl;
}
subControlVolumes_.emplace_back(/*SubControlVolume(*/element/*)*/);
if (debug) {
std::cout << "upt3" << std::endl;
}
elements_.clear();
if (debug) {
std::cout << "upt4" << std::endl;
}
elements_.emplace_back(element);
}

Expand Down