Tong Dong Qiu
a71a5cd8fe
Moved OpenclMatrix to new file
2021-12-01 11:43:39 +01:00
Tong Dong Qiu
a8b1d7c9dc
Change header include guard name
2021-12-01 11:43:39 +01:00
Tong Dong Qiu
1306a65104
Remove unnecessary intermediate variables
2021-12-01 11:43:39 +01:00
Tong Dong Qiu
5385bd275e
Rename get_opencl_kernel functions
2021-12-01 11:43:39 +01:00
Tong Dong Qiu
adb4649277
Changed block_size template to parameter for block functions
2021-12-01 11:43:39 +01:00
Tong Dong Qiu
288e548b89
Changed block_size template to variable for OpenclMatrix
2021-12-01 11:43:39 +01:00
Tong Dong Qiu
9acffab47e
Changed block_size template to variable for BlockedMatrix
2021-12-01 11:43:39 +01:00
Tong Dong Qiu
a6b6a62b27
Changes needed for FPGA
2021-12-01 11:43:39 +01:00
Tong Dong Qiu
606143ef57
Add timer for cpr_apply
2021-12-01 11:43:39 +01:00
Tong Dong Qiu
6465cf9cbb
Add CPR preconditioner for openclSolver and
...
change raw pointers to vector for Matrix
2021-12-01 11:43:30 +01:00
Bård Skaflestad
d163bebcdc
Merge pull request #3699 from blattms/man-page-spelling
...
Adds manpage and fixes several spelling issue found by lintian
2021-11-17 09:59:50 +01:00
Markus Blatt
a2246d331b
Spelling fixes
...
Gbp-Pq: Name 0005-Spelling-fixes.patch
2021-11-15 12:06:05 +01:00
Arne Morten Kvarving
e25caba8ed
changed: refactor BDA well contributions
...
split in API specific classes for Cuda/OpenCL
this to
1) it's cleaner
2) it avoids pulling in openCL code in cuda classes which leads
to clashes between nvidia headers and opencl.hpp
there is still too much API specific things in interface between the
bda components to work through a virtual interface so we still have to cast
to the relevant implementation in various places.
2021-11-11 14:49:33 +01:00
Arne Morten Kvarving
352d31a1e9
BdaBridge: avoid FPGA include in header
...
already includ in the cpp file where it is required.
2021-11-11 13:39:46 +01:00
Arne Morten Kvarving
7fb39f8308
BdaBridge: avoid includes in header
2021-11-11 13:39:25 +01:00
Arne Morten Kvarving
be6c857b16
bda: use forwarding for WellContributions
2021-11-11 13:29:12 +01:00
Arne Morten Kvarving
4a1fb0b86a
use std::vector for val_pointers
2021-11-11 13:15:29 +01:00
Arne Morten Kvarving
2b0508af8b
changed: use unique_ptr for MultisegmentWellContributions
...
less manual pointer management is always good
2021-11-11 13:15:29 +01:00
Markus Blatt
c54e85a8eb
Fixes compilation of WellContributions with deactivated OpenCL.
...
OpenCL header was included and OpenclKernels used unconditionally
in WellContributions.cpp. As this file is compiled if CUDA is found,
too it lead to undefined references for e.g. cl::CommandQueue if
opencl headers were there and compile error if not.
2021-11-10 19:41:59 +01:00
Arne Morten Kvarving
f27931c2e2
fixed: auto function parameters requires the concept-ts
...
use a regular template parameter instead
2021-11-10 10:25:27 +01:00
Markus Blatt
ad44564f27
Merge pull request #3619 from Tongdongq/opencl-refactor
...
Opencl refactor
2021-11-08 16:45:57 +01:00
Tong Dong Qiu
803a2ac2f4
Allow CMake to set CHOW_PATEL variables
2021-11-04 15:47:33 +01:00
Tong Dong Qiu
920eeee426
Rename namespace bda to Opm::Accelerator
2021-11-04 15:47:33 +01:00
Tong Dong Qiu
b945502a82
Minor improvements
2021-11-04 15:45:33 +01:00
Tong Dong Qiu
78b1714481
Move apply_stdwells kernels to OpenclKernels
2021-11-04 14:25:39 +01:00
Tong Dong Qiu
1583292bf4
Move opencl kernels to static class
2021-11-04 14:25:22 +01:00
Tong Dong Qiu
b8587daaa7
Move ChowPatel decomposition to appropriate file
2021-11-04 13:58:06 +01:00
Markus Blatt
02bbe995c3
Fixes warning about catching polymorphic type by value.
...
Removed message in amgclbackend was:
warning: catching polymorphic type ‘class
boost::property_tree::json_parser::json_parser_error’ by value
[-Wcatch-value=]
2021-11-03 18:07:56 +01:00
Arne Morten Kvarving
7de50b94c7
changed: probe for cl/opencl.hpp and use if found
...
this to avoid a spam of warnings
2021-11-01 19:41:05 +01:00
Markus Blatt
9197ee3e20
Prevent deprecation warning about cl2.hpp: __CL_ENABLE_EXCEPTIONS.
2021-10-28 17:09:22 +02:00
Markus Blatt
4de52a8d30
Use OpenCl's CL/cl2.hpp instead of CL/cl.hpp
...
We still request Standard version 1.2 only.
We need to use KernelFunctor instead of make_kernel.
In addition cl::Sources now works on std::string and
does not support std::pair<const char*, in> anymore.
2021-10-28 16:42:43 +02:00
Tor Harald Sandve
70c9d2e237
Merge pull request #3590 from daavid00/micp-2021-10
...
micp
2021-10-14 22:28:28 +02:00
daavid00
48b175904a
first version of micp implementation in flow
2021-10-14 17:44:57 +02:00
Tong Dong Qiu
68adf85f52
Create and use scale kernel for relaxation of ILU
2021-10-05 10:49:21 +02:00
Franz Georg Fuchs
a0ccd1e754
cusparsesolver wrong size and type in cols,rows fixed
2021-09-27 13:53:26 +02:00
Arne Morten Kvarving
08e950686f
use .empty() instead of .size() comparisons
2021-08-04 09:19:03 +02:00
Arne Morten Kvarving
78c5675daf
changed: get rid of OPM_UNUSED macro usages
...
prefer anonymous parameters or c++17 [[maybe_unused]]
2021-08-02 14:55:41 +02:00
Markus Blatt
ea4e4a1520
Merge pull request #3346 from Tongdongq/amgcl-support
...
Amgcl support
2021-07-21 15:02:25 +02:00
Bård Skaflestad
48e1af8bbe
Address Static Code Analysis Warnings
...
In particular, don't print uninitialized memory (Reorder.cpp:left)
and don't capture objects ('prm') that aren't actually used. While
here, refactor the initialization of the MT19937 random number
generator. Constructing this object is too expensive to do for each
try, especially when we can just run the generator in place.
2021-07-13 11:37:57 +02:00
Tong Dong Qiu
796d1b7f8a
Allow to choose a platform and device when using amgcl with VexCL
2021-07-09 17:03:11 +02:00
Tong Dong Qiu
0ee6b58fb0
Only initialize VexCL once
2021-07-09 15:39:35 +02:00
Tong Dong Qiu
b0749ce7d4
Use default parameters if json file does not specify all.
...
Throw exception if json file cannot be parsed.
2021-07-09 14:07:55 +02:00
Tong Dong Qiu
f77d745b51
Factor out CUDA part of amgclSolver
2021-07-07 16:24:52 +02:00
Tong Dong Qiu
b2156a4edc
Remove unused variable warnings
2021-07-07 16:24:52 +02:00
Tong Dong Qiu
b28c96699b
Combine blocked and unblocked VexCL implementations
2021-07-07 16:24:52 +02:00
Tong Dong Qiu
5306ae6a60
Allow VexCL to use unblocked matrices
2021-07-07 16:24:52 +02:00
Tong Dong Qiu
47ffeaf24a
Allow VexCL to use runtime parameters
2021-07-07 16:24:52 +02:00
Tong Dong Qiu
b4eb711c71
Enable the VexCL backend, disabled for blocksize=1
2021-07-07 16:24:52 +02:00
Tong Dong Qiu
a3d8d6655f
Added enum for amgcl_backend_type
2021-07-07 16:24:52 +02:00
Markus Blatt
adc2bf46b9
Search for VexCL and create an imported target.
...
Unfortunately, we cannot us the imported targets. They add some compile
parameters using generator expressions based on the CXX_COMPILER_ID.
While we are using the system CXX compiler for most of the stuff, some
cuda code is compiled with nvcc which at least for some versions does
not support -Wno-catch-value (which gets passed as normal compiler
option).
2021-07-07 16:24:52 +02:00
Tong Dong Qiu
d45f9d08f7
Allow amgcl without CUDA
2021-07-07 16:24:52 +02:00
Tong Dong Qiu
e556124405
Allow to choose amgcl backend at runtime, added default amgcl params
2021-07-07 16:24:52 +02:00
Tong Dong Qiu
282f611f92
Make sure amgcl can be used without CUDA
2021-07-07 16:24:52 +02:00
Tong Dong Qiu
3c1bfeb72f
Let amgcl use runtime parameters via JSON file
2021-07-07 16:24:52 +02:00
Tong Dong Qiu
a23d881817
Reuse amgcl parameters
2021-07-07 16:24:51 +02:00
Tong Dong Qiu
47e2899ba8
Moved amgcl declarations to header
2021-07-07 16:24:51 +02:00
Tong Dong Qiu
c2869810e2
Added amgclSolverBackend
2021-07-07 16:24:51 +02:00
Tong Dong Qiu
5918c64b54
Add useWellConn parameter to WellContributions()
2021-07-07 16:24:51 +02:00
Markus Blatt
2260fde478
Merge pull request #3300 from Tongdongq/add-tests
...
Added tests for cusparseSolver and openclSolver
2021-06-17 22:31:23 +02:00
Arne Morten Kvarving
86b454f4c8
fixed: initialize to avoid sca warning
2021-06-14 09:26:32 +02:00
Tong Dong Qiu
74b46e4d8d
Added tests for cusparseSolver and openclSolver
2021-06-07 11:40:03 +02:00
Tong Dong Qiu
0e63cda518
Instantiate whole class instead of each function
2021-06-07 11:40:03 +02:00
Markus Blatt
7c17db3d06
Fixes unused variable warnings for CUDA only.
2021-05-28 16:26:46 +02:00
Markus Blatt
6ffde47096
Fixes compilation with CUDA but without OpenCL.
...
Using statements should not be in namespaces anyway...
2021-05-28 16:26:46 +02:00
Arne Morten Kvarving
3c77b97cae
MultisegmentWellContribution: remove unused members
2021-04-30 13:09:25 +02:00
Markus Blatt
824df60e94
Merge pull request #3150 from Tongdongq/always_print_prec_info
...
Always print CHOW_PATEL info if used
2021-04-21 19:51:22 +02:00
Arne Morten Kvarving
b9c19958fb
fixed: mark possibly unused variables as such to quell warnings
...
also take chance to break an extremely long line
2021-04-19 09:49:20 +02:00
Tong Dong Qiu
5466b0f5f2
Always print CHOW_PATEL info if used
2021-04-09 16:19:45 +02:00
Tong Dong Qiu
8ea19c66aa
Reduced code duplication in BdaBridge
2021-03-12 11:15:02 +01:00
Tong Dong Qiu
81c0a3d9f9
Simplified CPU fallback warnings
2021-03-12 11:15:02 +01:00
Giacomo Marchiori
b4aa28771f
Added fpgaSolver
2021-03-12 11:14:59 +01:00
Tong Dong Qiu
87e3f1d72d
Added timers to ChowPatelIlu
2021-03-03 17:12:46 +01:00
Tong Dong Qiu
b87e9dad9a
Updated comments
2021-03-03 16:36:27 +01:00
Tong Dong Qiu
0caae966b8
Add more waiting for opencl functions, using shortened opencl kernel params in WellContributions
2021-03-03 14:04:06 +01:00
Tong Dong Qiu
688d8ff627
Shorten opencl kernel params, add source file for openclKernels
2021-03-03 13:09:24 +01:00
Tong Dong Qiu
61bf85bf24
Add waiting for enqueueWriteBuffer
2021-03-03 10:37:01 +01:00
Tong Dong Qiu
18bf7c4b19
Replace diagfinding with std::find
2021-03-03 09:50:33 +01:00
Tong Dong Qiu
5b4deab7e4
Generating opencl kernels
2021-03-01 10:26:44 +01:00
Tong Dong Qiu
141af23db5
Exact ILU decomp is now performed on GPU
2021-03-01 10:26:35 +01:00
Tong Dong Qiu
748dc4ccb3
Reduced header inclusion, also moved WellContributions OpenCL initialization
2021-03-01 09:42:56 +01:00
Markus Blatt
00df3d06c2
Allow usage of non-gpu devices with OpenCL.
...
This is needed to use the CPU backend of PoCL http://portablecl.org/
which seems handy for debugging.
2021-02-09 10:45:19 +01:00
tqiu
c8dca99fad
Renamed fgpilu to ChowPatelIlu
2021-02-03 17:43:54 +01:00
tqiu
a64a342104
Added symmetry check in Debug mode
2021-02-01 11:19:38 +01:00
tqiu
363cc31316
Made waiting for a GPUcopy more explicit
2021-01-28 15:40:10 +01:00
tqiu
d222dffcfd
Improved initial guess of L
2021-01-28 13:46:01 +01:00
tqiu
837a83fc16
Added error checking and std::call_once
2021-01-26 17:32:18 +01:00
tqiu
1e09b1f4d9
Added comments and rewrote if
2021-01-26 15:42:38 +01:00
tqiu
dba20adf04
Bugfix: extra swap was done on odd number of sweeps
2021-01-20 11:00:30 +01:00
tqiu
48ebef7808
Updated comments
2021-01-19 11:06:39 +01:00
tqiu
123e3fa89e
Use std::find and added comments
2021-01-18 17:10:46 +01:00
tqiu
a8e524fc9d
Minor C to C++ changes
2021-01-18 14:11:07 +01:00
tqiu
0f9ae3695d
Made reordering optional for WellContributions
...
Removed unnecessary alloc
2021-01-13 12:34:56 +01:00
tqiu
f26e58c6ca
Reordering is now actually skipped when NONE is chosen.
...
Also made reordering optional for openclSolver.
2021-01-12 15:25:47 +01:00
tqiu
71692ff52b
Disabled FGPILU by default
2021-01-12 15:21:19 +01:00
tqiu
9f92a69037
Added CPU and GPU implementations of Fine-Grained Parallel ILU (FGPILU)
2021-01-12 15:21:19 +01:00
Jose Eduardo Bueno
a9c2a684c6
Removed WellContributionsOCLContainer class (rebase)
2020-11-18 09:14:31 -03:00
tqiu
d25405d39a
Renamed parameter to OpenclIluReorder and moved error checking to BdaBridge constructor.
2020-10-19 11:36:25 +02:00
tqiu
a372a1e4bd
Added cmdline parameter --ilu-reorder-strategy
2020-10-19 11:33:32 +02:00
Markus Blatt
44fadfb88a
Fixes compilation of CUDA.
...
nvcc exits compilation if the header dune/istl/basearray.hh (form DUNE
2.6) is included as it does not seem to understand the friend declaration
there (friend class for a struct).
```
/usr/include/dune/istl/basearray.hh:101:49: error: ‘typename Dune::Imp::base_array_unmanaged<B, A>::RealIterator’ names ‘template<class B, class A> template<class T> struct Dune::Imp::base_array_unmanaged<B, A>::RealIterator’, which is not a type
friend class RealIterator<const ValueType>;
^
```
2020-10-14 19:23:57 +02:00
Markus Blatt
ec884183a5
Merge pull request #2828 from blattms/add-mswells
...
[opencl] deletes assignment operator of WellContributionsOCLContainer
2020-10-01 22:35:09 +02:00