Commit Graph
63 Commits
Author SHA1 Message Date
Tzanio 49c6a564a7 Final changes 2020-01-10 17:41:33 -08:00
Will Pazner bac14b74c0 Destroy Ceed context in Device destructor
Also inititalize internal::ceed to NULL
2019-12-18 15:38:40 -08:00
Veselin Dobrev b87ec735d2 Apply 'make style' and other small tweaks. 2019-11-18 16:34:52 -08:00
Veselin Dobrev e18916ec92 Make sure CMake build works with libceed. In the GNU make build
system, install libceed q-function headers.

Add a runtime check for q-function header location: install/source
directories.
2019-11-07 16:48:55 -08:00
Yohann Dudouit 1a6f2226b3 Print the name of the backend used by libCEED and check that it is the requested one. 2019-10-18 16:46:37 -07:00
Yohann Dudouit 3a3bbeae4d Default cpu backend to /cpu/self since it picks automatically the best cpu backend available. 2019-10-17 15:26:37 -07:00
Veselin Dobrev 5dbf3c8b9f Change the default CPU backend for libCEED. 2019-09-13 15:18:23 -07:00
Yohann Dudouit c226405378 Remove ceed.hpp file. 2019-09-11 18:00:31 -07:00
Tzanio d84b46bc45 make style 2019-09-11 17:58:53 -07:00
Yohann Dudouit 45bbc247a4 Make /gpu/cuda/gen the default ceed-cuda backend. 2019-09-11 17:57:52 -07:00
Yohann Dudouit 40f4200bb5 Solve double free bug. 2019-09-11 17:57:52 -07:00
camierjs 14c9a845a2 ceed_option fix 2019-09-11 17:57:52 -07:00
camierjs 09a93c96fb Rebase with ex1 working 2019-09-11 17:57:51 -07:00
Yohann Dudouit 9a3d7a34ad Rebase compiles. 2019-09-11 17:57:51 -07:00
Yohann Dudouit 87869636cc gpu debugging 2019-09-11 17:57:51 -07:00
Tzanio 90c4f4fd78 make style 2019-09-11 17:57:51 -07:00
Yohann Dudouit bde675abff Add #ifdef MFEM_USE_CEED guards 2019-09-11 17:57:51 -07:00
Yohann Dudouit 065817c5e1 Remove GetCeed() function 2019-09-11 17:57:49 -07:00
Yohann Dudouit 05cf4c40b0 Add option to libCEED backend ':' is the option separator.
- example: ./ex1 -pa -d ceed-cpu:/cpu/self/avx/blocked
  - bug: ./ex1 -pa -d ceed-cuda:/gpu/cuda/reg computes 'nan'
  - however, ./ex1 -pa -d ceed-cpu:/gpu/cuda/reg works
  - bug: ./ex1 -pa -d ceed-cpu:/gpu/cuda/ref crashes in libCEED
  - however, ./ex1 -pa -d ceed-cuda:/gpu/cuda/ref works...
2019-09-11 17:54:53 -07:00
Yohann Dudouit b69a90eb16 Initial commit for okina gpu libceed.
Ceed and Cuda backend working together.

Use MFEM_SOURCE_DIR to find okl and cu files

Separate most of ceed integration in libceed.?pp
2019-09-11 17:54:36 -07:00
Tzanio 25ea5e9208 Merge branch 'master' into dmpi
Conflicts:
	general/device.cpp
2019-08-28 18:40:39 -07:00
camierjs 48985c6447 Remove mfem::out put 2019-08-21 17:45:00 -07:00
camierjs a9b99f3601 Device selection 2019-08-19 12:28:14 -07:00
camierjs 850c049386 std namespace fix 2019-07-25 09:35:36 -07:00
camierjs e754227754 Review updates 2019-07-25 09:31:53 -07:00
camierjs 762613713c rocm => hip 2019-07-24 17:55:53 -07:00
camierjs 5bf6cad024 GPU, CUDA, ROCM calls 2019-07-23 13:29:14 -07:00
camierjs 3fce1070c6 ex1 @ ROCm converges 2019-05-29 12:32:27 -07:00
camierjs f1c9da0164 First ex1 run on Radeon Instinct MI25 2019-05-28 20:46:08 -07:00
camierjs 4f7447f053 First pass toward ROCm 2019-05-28 20:24:55 -07:00
Veselin Dobrev 75065b0ea1 Addressing some feedback from the PR. 2019-05-24 10:25:34 -07:00
Veselin Dobrev b69fd1e038 Some tweaks and additions to the MemoryManager class.
Modify the Device class to require the creation of an object in
order to use backends other then Backend::CPU. At destriction,
this object will call the Destroy() method of the MemoryManager to
deallocate any remaining registered device pointers.

In class Device, remove the method Disable() and make the method
Enable() private.

Use a global Array<double> as the buffer used by the cuda functions
for minimum and dot product.
2019-05-23 23:21:27 -07:00
Tzanio 3a860f124c Added a call to Device::Enable at the end of Device::Configure.
Updated examples to use only Device::Configure (no more calls to Enable/Disable)
2019-05-21 19:17:06 -07:00
Veselin Dobrev 40378a046b Introduce a new Memory class for handling host + device allocations
and transfers.

The Memory class is now used by some MFEM classes (like Array and
Vector) which can be used on the Device. Such classes now provide
methods to access the underlying Memory object, e.g. GetMemory.

Updated ex1/ex1p and ex6/ex6p to not need to enable/disable the
Device at specific points -- the Device is now enabled just at the
start. Also, the same examples can now run on Device (e.g. -d cuda)
without the partial assembly option (-pa) -- full assembly will
be still done on CPU but the sparse matrix action and vector
operations will be done using the Device.

Reverted changes in class DenseMatrix related to using the Device.
At this point, DenseMatrix operations are only used for small matrices
and using the Device in this case is not a good option.
2019-05-16 14:53:39 -07:00
Veselin Dobrev 10b3988449 Reworked the macro MFEM_CUDA_CHECK:
* It always performs the error check, no just in debug mode.
* All 'cuda*' runtime calls are now wrapped with this macro.
2019-04-22 15:17:04 -07:00
camierjs 3e34d4b99a Cleanup, style and remove all CUdevice, CUcontext & CUstream 2019-04-19 11:00:23 -07:00
camierjs d3a1685cb6 Remove CU driver calls 2019-04-17 17:36:43 -07:00
Tzanio a49cd5df97 Merge branch 'okina-device-tweaks' into okina-rename
Conflicts:
        fem/bilinearform_ext.cpp
        fem/bilininteg_ext.cpp
        general/cuda.cpp
2019-04-09 18:08:44 -07:00
Veselin Dobrev 772f0aca37 Remove the memory manager related methods from mfem::Device, since
they are not really useful separately from the memory manager.
2019-04-09 16:13:04 -07:00
Tzanio 5072f2ddf3 Small fix 2019-04-09 15:55:43 -07:00
camierjs 471eba4d2d Move Device::Tracking to mm::Enable/Disable
Swap lasts +=1 for ++
2019-04-09 11:42:12 -07:00
Tzanio 38f86d34ab make style 2019-04-09 07:21:51 -07:00
Veselin Dobrev 600f5ec4bd Some additional simplifications and tweaks in headers.
Add MFEM_CUDA_CHECK_{DRV,RT} macros.
2019-04-09 00:37:58 -07:00
Tzanio e0c45fb9d4 Reserve okina name for future kernel interface 2019-04-08 23:39:10 -07:00
Veselin Dobrev 55f0a7ec66 Updates to the mfem::Device class. 2019-04-08 16:48:56 -07:00
Tzanio ac452b56dd Use MFEM_VERIFY instead of mfem_error
A few #if defined(X) -> #ifdef X
2019-04-06 20:50:50 -07:00
Tzanio 9d39982d95 Always error if a GPU device is not found (as opposed to just in debug mode) 2019-04-06 18:35:01 -07:00
Tzanio 254c7cbba8 make style 2019-04-05 15:15:52 -07:00
dmed256 ccd9b0280e Use MFEM_INSTALL_DIR to find occa kernel locations 2019-04-05 11:12:23 -07:00
camierjs 8a4ae9a556 Rework include hierarchy not to present cuda/occa internal headers
Separate dvector3 from dtensor because it is used in coefficient.hpp
2019-04-04 11:45:46 -07:00