Commit Graph

311 Commits

Author SHA1 Message Date
Tobias Meyer Andersen
5919b417e3 refactor cuview 2024-08-22 15:27:23 +02:00
Tobias Meyer Andersen
fba1858f42 refactor cuvector 2024-08-22 15:20:20 +02:00
Tobias Meyer Andersen
3aa1767548 refactor cusparsematrix 2024-08-22 15:14:33 +02:00
Tobias Meyer Andersen
0c1ea3ee4d refactor cuseqilu0 2024-08-22 15:07:53 +02:00
Tobias Meyer Andersen
1721a1071f refactor cuowneroverlapcopy 2024-08-22 14:46:38 +02:00
Tobias Meyer Andersen
158619083e refacor cujac 2024-08-22 14:40:23 +02:00
Tobias Meyer Andersen
d17ee3315b refactor CuDILU 2024-08-22 14:28:33 +02:00
Tobias Meyer Andersen
69897753e8 refactor CuBuffer 2024-08-22 14:12:30 +02:00
Arne Morten Kvarving
fda6a63049 added: build system option to instantiate for float scalar 2024-08-19 13:09:41 +02:00
Arne Morten Kvarving
8340cb61c0 changed: put parallel unit tests in separate .cmake file
more consistent with how other tests are included
2024-08-08 12:21:22 +02:00
Tobias Meyer Andersen
e8ac31da16 add CuBuffer and CuView to cuISTL 2024-08-01 16:38:16 +02:00
Bård Skaflestad
9895c15d7c Simplify Generation of Processor Dependent MPI Tests
Suggested by: [at]akva2.
2024-06-28 11:24:48 +02:00
Bård Skaflestad
0c71d0701c Add MPI Support to Saturation Function Consistency Checks
This commit adds a new public member function

    SatfuncConsistencyChecks<>::collectFailures(root, comm)

which aggregates consistency check violations from all ranks in the
MPI communication object 'comm' onto rank 'root' of 'comm'.  This
amounts to summing the total number of violations from all ranks and
potentially resampling the failure points for reporting purposes.

To this end, extract the body of function processViolation() into a
general helper which performs reservoir sampling and records point
IDs and which uses a call-back function to populate the check values
associated to a single failed check.  Re-implement the original
function in terms of this helper by wrapping exportCheckValues() in
a lambda function.  Extract similar helpers for numPoints() and
anyFailedChecks(), and add a new helper function

    SatfuncConsistencyChecks<>::incorporateRankViolations()

which brings sampled points from an MPI rank into the 'root's
internal data structures.

One caveat applies here.  Our current approach to collecting check
failures implies that calling member function reportFailures() is
safe only on the 'root' process in a parallel run.  On the other
hand functions anyFailedChecks() and anyFailedCriticalChecks() are
safe, and guaranteed to return the same answer, on all MPI ranks.

On a final note, the internal helper functions are at present mostly
implemented in terms of non-owning pointers.  I intend to switch to
using 'std::span<>' once we enable C++20 mode.
2024-06-28 11:04:53 +02:00
Kjetil Olsen Lye
9b414419e7
Merge pull request #5404 from multitalentloes/add_dilu_LU_splitting
Add cudilu lu splitting
2024-06-27 14:30:45 +02:00
Tobias Meyer Andersen
9b2f41ad96 Add option to split the matrix into diagonal,
strictly lower and stricly upper part.
Add tests checking that the result matches
the CPU dilu implementation.
2024-06-05 13:35:54 +02:00
Arne Morten Kvarving
d32c8c2d90 fixed: linking of some cuda tests with shared libraries
need to link against the cudart library
2024-06-03 08:50:46 +02:00
Kai Bao
481c4830b5 only trying to link darmaris when requested 2024-05-28 16:16:19 +02:00
Tobias Meyer Andersen
60359268fd Add cmake message if not hipifying due to version 2024-05-08 14:28:44 +02:00
Tobias Meyer Andersen
69a45b632e lower cmake version, keep it for HIP 2024-05-08 14:09:26 +02:00
Tobias Meyer Andersen
e9d6b326cc Add HIP support for AMD GPUs
This commits adds cmake functionality that can
hipify the cuistl framework to support AMD GPUs.

Some tests have been written as HIP does not mirror
CUDA exactly.

CONVERT_CUDA_TO_HIP is the new CMAKE argument.
CMAKE version is increased to include HIP
as a language (3.21 required).

A macro is added to create a layer of indirection
that will make only cuistl files that have been
changed rehipified.

Some BDA stuff is extracted to make sure CUDA
is not accidentally included.
2024-05-06 15:56:53 +02:00
Kai Bao
68c202eb55 using flowexp as files names 2024-04-23 11:39:49 +02:00
Kai Bao
f6170ec1dd copying the ebos from opm-flowexperimental 2024-04-23 11:39:49 +02:00
Arne Morten Kvarving
388c6c72f7 Flow: drop ebos from simulator object filenames 2024-03-08 12:39:48 +01:00
Tobias Meyer Andersen
b59950edd9 Fix cmake warning with line order chagne 2024-03-07 15:24:24 +01:00
Bård Skaflestad
d1d22668ea Add Utility for Region-Based Phase-Filled Averages
The initial use case is calculating the phase-filled pore-volume
weighted average of the fluid mass densities per PVT region.  This
value goes into calculating depth-corrected per-cell phase pressure
values such as the BPPO and BPPG summary vectors.

This class manages a single linear array which separately tracks the
averages' numerators and denominators as running sums per region and
region set.  We pick this data structure to simplify the cross-rank
reduction needed in MPI parallel runs.  Client code is expected to
add individual per-cell and per-phase contributions using the
addCell() member function and then call the accumulateParallel()
member to affect the cross-rank reduction.  The averages will then
be available through the fieldValue() and value() member functions.

As a further view towards the initial use case, we track two
different types of average per phase--one for the phase-filled
volume and one for the pore-volume filled volume.  The latter is the
average we would get for the case of the phase saturation being one
throughout the region.  This alternative value is the fallback
option for the case of the phase saturation being identically zero
throughout the region.
2024-02-28 12:08:24 +01:00
Arne Morten Kvarving
8f1b2507d7 changed: rename simulator main files
add _main to the file name. this in preparation for
removing ebos in the simulator instance file names
2024-02-02 09:23:06 +01:00
Markus Blatt
819842d7cf Fix linking errors when using shared libraries.
We accomplish that by passing the module version as a string to the
constructors of LogOutputHelper and EclGenericOutputBlackoilModel
instead of calling moduleVersionName() in LogOutputHelper. That way
moduleVersionName is not needed by libopmsimulators anymore and
compilation works again for people requesting shared libraries via
CMake's BUILD_SHARED_LIBS variable.
2024-01-29 16:37:38 +01:00
Arne Morten Kvarving
e686fabb39 added: class for calculating RPTRST CONV 2024-01-10 13:07:34 +01:00
Torbjørn Skille
72892f0c4b PRT file updates
* Arrays genarated from RPTSOL + FIP is now strictly following Eclipse format
* Adding reservoir volume array also for custom FIP regions
2024-01-03 21:47:54 +01:00
Arne Morten Kvarving
de9c3ddfda added: test for outputdir 2023-12-19 15:21:58 +01:00
Arne Morten Kvarving
0157385668 fixed: also add dependency with ninja generator 2023-11-22 12:27:31 +01:00
Arne Morten Kvarving
32dfa0b473 vendor libfmt using FetchContent 2023-11-21 15:10:26 +01:00
Atgeirr Flø Rasmussen
8b480a0a49
Merge pull request #4852 from multitalentloes/cujac_preconditioner
Cujac preconditioner
2023-10-16 12:46:29 +02:00
Tobias Meyer Andersen
8b396fa3dc Update test properties of new tests using CUDA. Avoid comparison causing new warning 2023-10-16 11:31:00 +02:00
Razvan Nane
7e8528b43a Disable only CUDA when ROCm also selected 2023-10-11 13:29:40 +02:00
Razvan Nane
7673118f14 CUDA and HIP not allowed at the same time 2023-10-08 08:58:35 +02:00
Razvan Nane
e4abc12a05 Adapt rocsparse separate wells PR to changes made to ISTLSolverEbos 2023-10-08 08:58:35 +02:00
Razvan Nane
ca210612e1 Fix hipErrorNoBinaryForGpu when hip_FOUND 2023-10-08 08:58:35 +02:00
Markus Blatt
5a2a97d21c [cmake] Always demand rocblas to be there when activating rocsparse
This was somehow only done for hip version >=5.3, but Debian bookworm
is missing rocblas and using hipcc 2.3.0 and therefore compilation failed there.
2023-10-02 17:14:43 +02:00
Vegard Kippe
4ff08ffd2d Added testcase for TUNING/TSINIT and NEXTSTEP - depends on https://github.com/OPM/opm-tests/pull/1028 2023-08-25 14:01:51 +02:00
Arne Morten Kvarving
e03600f6ef added: build system option to enable Tracy profiler 2023-08-15 15:57:06 +02:00
Arne Morten Kvarving
896cb8484d added: option to disable the BDA solvers 2023-08-11 11:00:07 +02:00
hnil
66ff026008 remove use of hidden private defines for poly and alugrid
- fixed polygrid
- renamed executables to include blackoil in name
2023-08-08 15:30:05 +02:00
Bård Skaflestad
95d715b807 Add Parallel Calculation Support for WBPn/WPAVE
This commit adds a parallel calculation object derived from the serial
PAvgCalculator class.  This parallel version is aware of MPI
communicators and knows how to aggregate contributions from wells that
might be distributed across ranks.

We also add a wrapper class, ParallelWBPCalculation, which knows how to
exchange information from PAvgCalculatorCollection objects on different
ranks and, especially, how to properly prune inactive cells/connections.
2023-07-07 15:01:05 +02:00
Arne Morten Kvarving
c3847e8325 simplify cmake code for tuning tests
add a post command to the runSimulator script and use this to
execute the unit test at the end of the run
2023-07-03 09:05:45 +02:00
Arne Morten Kvarving
ab3f6474aa fixed: parallel super builds
commit e5e7ff7287 introduced a dependency on a generated header in a
header file. this is problematic with super-builds as there is no
explicit dependency for the simulator objects to these generated
headers.

with the ninja-generator it is smart enough to figure out this across
the subdirectories, but the make generator is not. hence we explicitly
add a dependency on the opmcommon target in this case. ideally we would
only depend on the generated header to allow compiling opmcommon and
simulator objects in parallel. however there is as far as i know no way to
depend on OUTPUT targets across subdirectories.
2023-06-30 14:58:31 +02:00
Bård Skaflestad
506e7a0fef Tag Parallel Unit Tests With Accurate Number of Processors
Otherwise, we risk oversubscribing the host system when running
multiple tests in parallel ("ctest --parallel").
2023-06-29 12:32:37 +02:00
Bård Skaflestad
77adc6ea3b Add Container for Dynamic WBPn Source Values
This commit adds a new container class,

    ParallelPAvgDynamicSourceData

which inherits from PAvgDynamicSourceData and provides a parallel
view of source contributions.  Member function

    collectLocalSources

will call the user-provided source term evaluation function for each
source location in its purview--typically those locations owned by
the current MPI rank.  Those values will be distributed to other MPI
ranks through member function synchroniseSources which will fill the
base class' 'src_' data member, and become available to clients
through read-only item spans.
2023-06-21 12:06:49 +02:00
Kjetil Olsen Lye
ceb15e22e3 Expose CuISTL solver in FlexibleSolver. 2023-05-31 15:03:31 +02:00
Kjetil Olsen Lye
b57f6ea551 Added gpu_cuda label to cuseqilu0. 2023-05-30 11:50:02 +02:00