Commit Graph
33 Commits
Author SHA1 Message Date
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
David Medina e4add0c92c Merge pull request #829 from mfem/okina-allin
OCCA all modes [okina-allin]
2019-04-02 23:05:06 -07:00
camierjs ef636179ac Occa all-in mode fix
Added order 4 for geometric kernels
2019-04-02 17:37:29 -07:00
David Medina ad269598be Merge pull request #827 from dmed256/okina
[okina] Feedback updates [dmed256:okina]
2019-04-02 15:07:57 -07:00
dmed256 2f45b3978c Feedback updates 2019-04-02 13:59:10 -07:00
Will Paznerandtzanio f83061025a Update general/device.cpp
Co-Authored-By: tzanio <tzanio@llnl.gov>
2019-04-02 13:40:44 -07:00
Will Paznerandtzanio 22b8e5b424 Update general/device.cpp
Co-Authored-By: tzanio <tzanio@llnl.gov>
2019-04-02 13:40:30 -07:00
Will Paznerandtzanio b18d01349d Update general/device.cpp
Co-Authored-By: tzanio <tzanio@llnl.gov>
2019-04-02 13:40:16 -07:00
Will Paznerandtzanio 304b1ad9b8 Update general/device.cpp
Co-Authored-By: tzanio <tzanio@llnl.gov>
2019-04-02 13:40:02 -07:00
Tzanio 6bc771fc9c Better error messages in device.cpp 2019-03-27 11:25:01 -07:00
camierjs e43b6b1d63 occa D1D property and file path fix 2019-03-25 16:23:06 -07:00
Tzanio 3e0d97e205 Restored some OCCA/diffusion kernels and OCCA+OpenMP support. 2019-03-25 14:52:25 -07:00
camierjs 95370fc05e Occa, Raja cleanup 2019-03-25 12:36:25 -07:00
Tzanio 614c78b65e Renamed the config class to Device, and simplified its use in the examples. 2019-03-22 14:15:27 -07:00