Comments (20)
I think that you may have a parallel build; if this is the test_geom2d.cpp that I wrote earlier, it doesn't use any transport solvers. I reckon that it is another file, whose build started earlier, which caused the error.
from opm-core.
Is it examples/spu_2p.cpp
perhaps?
from opm-core.
Yes it is my fault. The fully implicit Newton-Raphson transport solver (as opposed to the reordering transport solver) requires UMFPACK, and it used to be that the only program that used this transport solver was spu_2p.cpp, which had the ability to choose between the two solvers with a command-line argument. That program was obsolete for other reasons (handling of schedules etc.) and has now been removed (although I have forgotten to remove the conditional removing spu_2p from the build list if there is no UMFPACK).
The ability to switch solvers has been added to sim_2p_incomp.cpp (which used to be sim_2p_incomp_reorder.cpp), which therefore now requires UMFPACK. This is the basic, decent, simulator for the incompressible two-phase case, and it is not acceptable to disable it.
Therefore I must seek another solution. Two different solutions come to mind:
- Insert some HAVE_SUITESPARSE_UMFPACK_H dependency at a high level in the solver, so that upon construction it will throw and explain why you cannot use it (if you do not have UP).
- Insert the same at a lower level, surrounding the call_UMFPACK() call, this will throw when you try to solve the system (at the first transport step).
If no-one minds, I'll go with the second solution, which will result in binaries getting built that contain code for the assembly of the full transport system, but cannot solve it. A longer term solution is to make sure the implicit transport solver can use any linear solver, but that will not happen for this release.
I also recommend installing SuiteSparse (which contains UMFPACK), to have a direct solver available for reference, even if we want to make OPM usable without it.
from opm-core.
I would note that a similar technique to the second bullet is used for some ERT dependencies. The function writeECLData() exists unconditionally, but if you try to call it without ERT, it will throw and explain that you need to reconfigure with ERT to use it.
Of course, I realise that by now that message needs to be rewritten to be consistent with the new build system. I guess I will write these messages to be a little more general ('reconfigure with XXX'), since people may build in many different ways.
from opm-core.
Can you please test #209 @laods, if it solves your issue? I have no machine right now without UMFPACK, so I have not been able to test that it behaves properly.
It it builds, you could run bin/sim_2p_incomp once without arguments (should run the reordering solver) and once with the argument use_reorder=false (should trigger an early exception, with a nice explanatory message).
from opm-core.
Yes, this solved my problem. That is, after fixing a small typing error in opm-core/opm/core/io/eclipse/EclipseGridParser.cpp:1082. You have put the ';' before ')'. This must be fixed before merging.
The call ./bin/./sim_2p_incomp
returns this:
================ Test program for incompressible two-phase flow ===============
--------------- Reading parameters ---------------
nx not found. Using default value '100'.
ny not found. Using default value '100'.
nz not found. Using default value '1'.
dx not found. Using default value '1'.
dy not found. Using default value '1'.
dz not found. Using default value '1'.
porosity not found. Using default value '1'.
permeability not found. Using default value '100'.
num_phases not found. Using default value '2'.
rho1 not found. Using default value '1000'.
mu1 not found. Using default value '1'.
rho2 not found. Using default value '1000'.
mu2 not found. Using default value '1'.
num_phases not found. Using default value '2'.
relperm_func not found. Using default value 'Linear'.
rock_compressibility_pref not found. Using default value '100'.
rock_compressibility not found. Using default value '0'.
gravity not found. Using default value '0'.
convection_testcase not found. Using default value 'false'.
segregation_testcase not found. Using default value 'false'.
ref_pressure not found. Using default value '100'.
injected_porevolumes_per_day not found. Using default value '0.1'.
use_pside not found. Using default value 'false'.
linsolver not found. Using default value 'umfpack'.
In file /private/laods/opm/RH5/realization_cmake/pure_cmake/src/opm-core/opm/core/linalg/LinearSolverFactory.cpp, line 90: Linear solver umfpack is not enabled in this configuration.
terminate called after throwing an instance of 'std::exception'
what(): St9exception
Aborted
./bin/sim_2p_incomp use_reorder=false
returns the same.
from opm-core.
What happens with
./bin/sim_2p_incomp linsolver=istl
instead?
Also, I find it strange that 'nx not found...' is first, instead of 'use_reorder not found...'.
from opm-core.
What happens with
./bin/sim_2p_incomp linsolver=istl
instead?
================ Test program for incompressible two-phase flow ===============
--------------- Reading parameters ---------------
nx not found. Using default value '100'.
ny not found. Using default value '100'.
nz not found. Using default value '1'.
dx not found. Using default value '1'.
dy not found. Using default value '1'.
dz not found. Using default value '1'.
porosity not found. Using default value '1'.
permeability not found. Using default value '100'.
num_phases not found. Using default value '2'.
rho1 not found. Using default value '1000'.
mu1 not found. Using default value '1'.
rho2 not found. Using default value '1000'.
mu2 not found. Using default value '1'.
num_phases not found. Using default value '2'.
relperm_func not found. Using default value 'Linear'.
rock_compressibility_pref not found. Using default value '100'.
rock_compressibility not found. Using default value '0'.
gravity not found. Using default value '0'.
convection_testcase not found. Using default value 'false'.
segregation_testcase not found. Using default value 'false'.
ref_pressure not found. Using default value '100'.
injected_porevolumes_per_day not found. Using default value '0.1'.
use_pside not found. Using default value 'false'.
linsolver found at /, value is 'istl'.
linsolver_residual_tolerance not found. Using default value '1e-08'.
linsolver_verbosity not found. Using default value '0'.
linsolver_type not found. Using default value '1'.
linsolver_save_system not found. Using default value 'false'.
linsolver_max_iterations not found. Using default value '0'.
output not found. Using default value 'true'.
output_dir not found. Using default value 'output'.
================ Starting main simulation loop ===============
(number of epochs: 1)
use_reorder not found. Using default value 'true'.
use_segregation_split not found. Using default value 'false'.
nl_pressure_maxiter not found. Using default value '10'.
nl_pressure_change_tolerance not found. Using default value '1'.
nl_pressure_residual_tolerance not found. Using default value '0'.
nl_tolerance not found. Using default value '1e-09'.
nl_maxiter not found. Using default value '30'.
output not found. Using default value 'true'.
output_vtk not found. Using default value 'true'.
output_dir not found. Using default value 'output'.
output_interval not found. Using default value '1'.
check_well_controls not found. Using default value 'false'.
max_well_control_iterations not found. Using default value '10'.
num_transport_substeps not found. Using default value '1'.
num_psteps not found. Using default value '1'.
stepsize_days not found. Using default value '1'.
Initial saturations are 0 1
--------------- Simulation step number 0 ---------------
Current time (days) 0
Current stepsize (days) 1
Total time (days) 1
Pressure solver took: 1.5369 seconds.
Topological sort took: 0.005103 seconds.
Transport solver took: 0.033125 seconds.
Volume balance report (all numbers relative to total pore volume).
Saturated volumes: 0.099966 0.90003
Injected volumes: 0.1 0
Produced volumes: 3.3527e-05 0.099966
Total inj volumes: 0.1 0
Total prod volumes: 3.3527e-05 0.099966
In-place + prod - inj: 1.0331e-11 1
Init - now - pr + inj: -1.0331e-11 1.0334e-11
================ End of simulation ===============
Total time taken: 2.605827
Pressure time: 1.536899
Transport time: 0.033125
from opm-core.
I do not get exactly the same numbers (1.0328e-11 for the lower right), but I guess that can be ignored. All significant numbers are the same. Just in case you didn't know: optimization matters a lot for istl runtime, debug builds with istl can be very slow (but for small test cases like this it's no problem).
from opm-core.
Are you sure you get the same error message with use_reorder=false? Could you check what your config.h says about HAVE_SUITESPARSE_UMFPACK_H?
from opm-core.
Are you sure you get the same error message with use_reorder=false?
I have tested several times
Could you check what your config.h says about HAVE_SUITESPARSE_UMFPACK_H?
#define HAVE_SUITESPARSE_UMFPACK_H 0
from opm-core.
#define HAVE_SUITESPARSE_UMFPACK_H 0
Very strange. I would have thought that should result in an /* #undef HAVE_SUITESPARSE_UMFPACK_H */
instead.
from opm-core.
Yes, and it makes my test (#ifdef HAVE_...) wrong. Another weird thing is: with that config.h, how can my #ifdef guards in CSRMatrixUmfpackSolver::solve() work? Why doesn't @laods get link errors?
What should we do about this? Nothing?
from opm-core.
I would have thought that should result in an /* #undef HAVE_SUITESPARSE_UMFPACK_H */
I checked cmake/Modules/ConfigVars.cmake; it seems that it only generates that form if it is undefined or blank, not zero; maybe there was some use where it mattered if it was zero or not -- unfortunately I don't remember.
@atgeirr
Should the actual code test with #if !HAVE_SUITESPARSE_UMFPACK_H
instead of #ifndef
?
from opm-core.
I have checked with http://www.cmake.org/Wiki/CMake:How_To_Write_Platform_Checks . The offending line is cmake/Modules/FindSuiteSparse.cmake:234, which should set the result to empty string instead of zero. Patch incoming soon!
from opm-core.
I assumed that would fail, but some experimentation enlightened me. It will fail only if we can have a symbol #defined with no content. But if we are guaranteed either of:
- HAVE_... is 1
- HAVE_... is undefined
- HAVE_... is 0
...then it should be alright to use #if. I do not understand why we sometimes get a 0, but if I change to use #if, it is not a problem. I'll modify the PR again...
from opm-core.
I guess we should do the same with HAVE_ERT eventually, but that'll have to wait, since no-one have had any trouble with it.
from opm-core.
This should be fixed now, by #209 and #210 both. Actually, only one would suffice, but both are improvements.
@laods, please test again...
from opm-core.
Building opm-core completes.
./bin/sim_2p_incomp use_reorder=false
now produce
================ Test program for incompressible two-phase flow ===============
--------------- Reading parameters ---------------
use_reorder found at /, value is 'false'.
In file /private/laods/opm/RH5/realization_cmake/pure_cmake/src/opm-core/examples/sim_2p_incomp.cpp, line 89: Cannot use implicit transport solver without UMFPACK. Either reconfigure opm-core with SuiteSparse/UMFPACK support and recompile, or use the reordering solver (use_reorder=true).
terminate called after throwing an instance of 'std::exception'
what(): St9exception
Aborted
When calling ./bin/sim_2p_incomp
, "use_reorder not found. Using default value 'true'." is printed before "nx not found...".
from opm-core.
Great! I'll close this then!
from opm-core.
Related Issues (20)
- Some tests break after OPM/opm-parser#768 HOT 1
- Initialization and restart HOT 1
- Failing test_relpermdiagnostics HOT 4
- Dereferencing of end iterator happens in initStateEquil.hpp
- test_pinchprocessor is broken? HOT 3
- opm-core build fails HOT 4
- parameter's ouput does not show up in .CASE_NAME.DEBUG HOT 2
- Allow passing the size of the initial time step to adaptive time stepper HOT 1
- Runtime failure in "linsolver" test - umfpack not configured HOT 2
- Add restart test with no wells present.
- WellState::init has memory problems HOT 7
- Don't we need to keep track of (artificially) shut completions in the simulator for output? HOT 3
- Windows Installer (guide) failed HOT 3
- Compilation error due to not finding opm/output/data/Wells.hpp HOT 2
- Broken test HOT 3
- Multiple definitions of OPM_THROW HOT 1
- opm-core broken related to petsc HOT 2
- Some files missing? HOT 2
- Question: How OPM handles well sources in multi-cell wells? HOT 4
- Installing OPM in CentOS 8.1 (RPM) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opm-core.