Commit Graph
202 Commits
Author SHA1 Message Date
Veselin Dobrev e79b2e23be In order to support the use of global objects (initialized
before the memory manager configuration) on device with the
"debug" device, tweak the memory manager configuration method
to update the duals of all host memory types (except MANAGED)
to be DEVICE_DEBUG.

Global objects returned by Geometries.GetGeomToPerfGeomJac no
longer need to be copied before they can be used on device
with the "debug" device.
2021-05-13 19:15:51 -07:00
camierjs 2b2919b806 Merge master in tmopt 2021-03-28 12:51:39 -07:00
camierjs e10d5fb0f8 Remove VERIFY in UpdateDualMemoryType 2021-03-24 14:47:37 -07:00
camierjs 5345f9aa52 Add an UpdateDualMemoryType internal method used internally for SetDualMemoryType 2021-03-24 14:41:15 -07:00
Tom Stitt 34c007935c add hip host pinned memory
add hip support to umpire memory test
2021-03-19 17:39:24 -07:00
Veselin Dobrev a59f06e9e3 Replaced the methods Device::SetHostMemoryType() and
Device::SetDeviceMemoryType() with the method
Device::SetMemoryTypes() which can be called only before
Device configuration.

Added methods MemoryManager::GetDualMemoryType() and
MemoryManager::SetDualMemoryType() where the latter can be
called only before MemoryManager::Configure().

Updated the Memory/MemoryManager implementation to use the
dual memory types instead of the default memory types.

Various other tweaks and fixes in the Memory/MemoryManager
implementation.
2021-03-18 18:48:22 -07:00
Tom Stitt fb92b9e992 cleanup and minimize diff to master 2021-03-08 09:55:17 -08:00
Tom Stitt 5b377f6d2c Implement Memory::New(size, h_mt, d_mt), required updates in a number
of places
Remove GetDualMemoryType_
All umpire tests are passing but there are still some TODOs
2021-02-25 17:24:29 -08:00
Tom Stitt 22ec73e780 Revert device.cpp changes and remove automatic use of Umpire if
MFEM_USE_UMPIRE
Fix build; building with Umpire & CUDA now
2021-02-25 14:56:05 -08:00
Tom Stitt 40f3d0fd94 fix up some formatting 2021-02-25 14:29:47 -08:00
Tom Stitt a1fbbbc35e cleanup UmpireMemorySpaces, switch to names instead of ids since we had to pass a name anyways
update umpire test

make style

this is not yet ready to test but I'm adding changes incrementally
2021-02-25 14:16:21 -08:00
Tzanio 2064b3b891 Merge branch 'master' into feature/tomstitt/temp-mem-type 2021-02-05 13:08:10 -08:00
Adrien M. Bernede 04fb572359 Let's forget about 2020 2021-01-26 11:55:36 -08:00
Tom Stitt 06786f5540 Switch temporary memory handing so that Device allocators
can optionally define a AllocTemp method.
Use MemoryClass at ctor time for optional device memory type
targetting; add example to Vector.
Remove DeviceUmpireTempMemoryType
Remove UpdateDeviceType
Add cuda_umpire.cpp example, still a little bit of WIP
- move to tests later
2021-01-12 15:29:27 -08:00
Tom Stitt 88bf3467da grab changes from feature/apps/dev 2020-12-11 11:36:44 -08:00
Tom Stitt 56c3bda33e Merge remote-tracking branch 'origin/master' into feature/tomstitt/temp-mem-type
Switches to int id from string name for umpire allocator
2020-12-11 10:36:50 -08:00
camierjs 9f7720e69f Merge master in tmopt 2020-11-18 20:03:06 -08:00
Veselin Dobrev 1de94adf90 Fix for newer versions of Umpire. 2020-11-02 23:52:05 -08:00
Tom Stitt 474c6a19e9 Rename CuMemAllocHost -> CuMemAllocHostPinned, CuMemFreeHost ->
CuMemFreeHostPinned
Adds `PRESERVE` MemoryType to be used as the default param
Rename CudaHostMemorySpace -> HostPinnedHostMemorySpace; adds USE_CUDA
and USE_HIP (todo) regions
2020-09-03 11:20:32 -07:00
Tom Stitt 40716709c6 remove used var 2020-08-31 16:07:03 -07:00
Tom Stitt 99fda9ca0d Adds methods to update the device type and the delete device memory
Adds HostPinned memory for CUDA (need to generalize for hip)
Adds MemoryType options for ijk DenseTensor ctor and SetSize
2020-08-31 13:51:52 -07:00
Tom Stitt 66ee781768 Merge remote-tracking branch 'origin/master' into feature/tomstitt/temp-mem-type 2020-08-31 12:26:37 -07:00
camierjs 8ada6685c3 Fix tmop_tests_debug & temporary bump to see Travis errors 2020-08-25 09:34:02 -07:00
camierjs 9e0396bdde Merge master in tmopt 2020-08-24 11:46:11 -07:00
camierjs c10364d3f2 Move assignments inside if statements 2020-08-19 08:03:11 -07:00
camierjs 97b31f641e Remove dead code 2020-08-14 11:07:37 -07:00
camierjs 0b79c6a742 Fix aliases test_mem and cleanup 2020-08-14 11:04:23 -07:00
camierjs 7604bbd03a Cleanup debug 2020-08-11 16:48:24 -07:00
camierjs 07c9965aa4 WIP all tests before cleanup 2020-07-29 14:17:14 -07:00
camierjs d13ad22587 WIP debug mem copy 2020-07-29 08:32:08 -07:00
camierjs d9d3f0e4ea Time loop instrumentation 2020-07-28 18:28:52 -07:00
camierjs d1c4057431 SetDiscreteTargetBase on GPU 2020-07-28 17:59:18 -07:00
camierjs 58c48b961a WIP 3D Scalar Evaluation 2020-07-28 17:20:55 -07:00
camierjs 471c574dc6 Allow parallel debug device 2020-07-21 18:06:08 -07:00
Tom Stitt e57c5e0fec fix GetUmpireDeviceTempAllocatorId so it returns the correct value=p
remove unused 'exit' and extra blank line
2020-07-20 16:16:51 -07:00
Tom Stitt 802f213873 Adds optional temporary device memory type that can be used to prevent
repeated deviceMallocs
* example use in *mesh.cpp*::`GeometricFactors::GeometricFactors`

Updates to the `Umpire{Host,Device}MemorySpace`
* switch pool id from string to int
* support externally provided pool ids
* adds option to use default HOST/DEVICE MemoryTypes even if mfem is
built with umpire
* lazy init of UmpireHostMemorySpace
* adds temp pool id
2020-07-20 15:22:07 -07:00
camierjs d036fd8b1f Changelog, meld & revert MFEM_MMU_PROTECT_ERROR 2020-07-20 14:32:04 -07:00
camierjs b3cdfdea49 make style 2020-07-09 08:17:45 -07:00
camierjs a46473e463 Merge branch 'master' into okina-mmu-mflags 2020-06-29 10:29:06 -07:00
Veselin Dobrev 5a37ae4b85 Merge branch 'master' into x86
Resolved conflicts:
   CHANGELOG
2020-05-19 20:27:09 -07:00
camierjs 7df19938c4 Use _aligned_free 2020-04-07 17:44:57 -07:00
camierjs afb934a92f Memory wraps for pair of h_ptr/d_ptr 2020-04-06 15:10:17 -07:00
camierjs b37fcb9525 Merge branch 'master' into okina-mmu-mflags 2020-03-15 14:42:51 -07:00
Tzanio 05125e19d5 Removed a space 2020-03-09 15:36:41 -07:00
Tzanio 58872c9e7b Merge branch 'master' into okina-mmu
Conflicts:
	fem/datacollection.cpp
	tests/unit/CMakeLists.txt
2020-03-04 15:19:33 -08:00
Tzanio ca55ef0217 The release number for mfem-4.1 is LLNL-CODE-806117 2020-03-02 17:18:46 -08:00
camierjs ffd086e263 Add initial memory flags h_rw and d_rw 2020-02-26 18:08:38 -08:00
Veselin Dobrev d4b81e9ef4 Update the memory backend names based on the configured device
backend, CUDA/HIP/none:
- device -> cuda/hip/device
- managed -> cuda-uvm/hip-uvm/managed
- device-umpire -> cuda-umpire/hip-umpire/device-umpire
2020-02-24 16:15:00 -08:00
camierjs 73cf71a049 Re-enable the MFEM errors for mprotect on wrong memory types 2020-02-24 10:58:43 -08:00
Tzanio 2caa222edf A number of changes to switch the code from LGPL-2.1 to BSD-3:
- Updated LICENSE, README, CHANGELOG and CONTRIBUTING.md
- Removed COPYRIGHT, added NOTICE
- Updated the headers in all source files, makefiles, etc.
2020-02-23 11:16:46 -08:00