Commit Graph

74 Commits

Author SHA1 Message Date
7c9666798e whitespace 2022-10-08 09:34:20 -04:00
7551c0a3ca GPU Package: Documenting some additional preprocessor flags, updating oneapi Makefile. 2022-10-07 22:44:21 -07:00
a6a39d47e1 Fixing potential issues with automatic splitting of accelerators for NUMA. 2022-10-06 20:48:02 -07:00
e9f39f85d2 Fixing issue where shared main memory property only set for NVIDIA devices. 2022-10-06 20:05:33 -07:00
fb675028b9 whitespace 2022-09-29 02:42:11 -04:00
71464d8314 GPU Package: Fixing logic in OpenCL backend that could result in unnecessary device allocations. 2022-09-28 22:30:09 -07:00
6e34d21b24 GPU Package: Switching back to timer disabling with multiple MPI tasks per GPU. Logic added to prevent mem leak. 2022-09-28 21:02:16 -07:00
167abe9ce0 add preprocessor flags to select between the changed and the old code variant 2022-09-09 12:41:24 -04:00
294a1c2168 Use primary context in CUDA GPU code.
Since LAMMPS uses the low-level driver API of CUDA, it needs to ensure
that it is in the correct context when invoking such functions. At the
moment it creates and switches to its own context inside `UCL_Device::set`
but then assumes that the driver is still in that context for subsequent
calls into CUDA; if another part of the program uses a different context
(such as the CUDA runtime using the "primary" context) this will cause
failures inside LAMMPS.

This patch changes the context creation to instead use the primary
context for the requested device. While it's not perfect, in that it
still doesn't ensure that it's in the correct context before making
driver API calls, it at least allows it to work with libraries that use
the runtime API.
2022-09-06 09:28:51 +10:00
d8f8a3a36a Handle inconsistent J molecules in tip4p/gpu 2022-05-28 00:24:24 +03:00
f3363070e7 remove support for CUDA toolkits before version 8 and GPUs older than Kepler 2022-04-12 15:48:16 -04:00
b36262cd11 cosmetic 2022-04-10 20:47:42 -04:00
537e3f2539 silence compiler warnings 2022-02-17 23:13:13 -05:00
e990a1cf61 remove ambiguity between "double_precision" class member variable and function 2021-10-16 21:07:04 -04:00
dd6e3c1acc avoid variable length array and signed vs. unsigned warnings 2021-10-08 20:07:20 -04:00
9da8c932ab make check more obvious 2021-09-25 21:33:10 -04:00
530912a930 detect double precision support according to OpenCL specs (1.2 and later) 2021-09-25 07:20:52 -04:00
cd3efc3fa8 initialize all members 2021-09-17 22:45:26 -04:00
00e396c921 move misplaced #endif and make code more readable 2021-09-16 07:33:24 -04:00
08eb3345af silence some compiler warnings 2021-08-31 15:11:46 -04:00
49a81d6fba silence compiler warnings 2021-08-26 06:30:16 -04:00
92b5b159e5 replace tabs and remove trailing whitespace in lib folder with updated script 2021-08-22 20:45:24 -04:00
8ea9179a00 Correct device pointer datatype in HIP UCL_Const 2021-06-02 15:46:57 -04:00
62423b0c75 Disable new GPU neighbor for HIP 2021-06-02 15:45:06 -04:00
b4a70880d9 Merge pull request #2745 from rbberger/gpu_updates
Updates to the GPU package
2021-04-30 19:32:44 -04:00
375f8e7054 support loading OpenCL functions up to the OpenCL 3.0 standard 2021-04-30 09:28:01 -04:00
8dfcdc4b3c Revert "activate workaround for problems with new GPU code neighbor lists"
This reverts commit a28d9a6e69.
2021-04-29 19:24:28 -04:00
24314b2316 Formatting 2021-04-23 16:36:01 -04:00
8ba1b59d8d Correct fprintf statement in debug code 2021-04-23 16:34:12 -04:00
0f1f49afa7 Add more output to ocl_get_devices 2021-04-22 12:52:30 -04:00
a28d9a6e69 activate workaround for problems with new GPU code neighbor lists 2021-03-11 22:06:10 -05:00
70ca055113 Add workaround to compile with HIP, new neighbor code still needs to be ported 2021-02-23 11:28:05 -05:00
2a0b7a26c0 Add missing cq() getter 2021-02-23 11:26:07 -05:00
446a068159 Use hipGetDeviceProperties to avoid int overflows 2021-02-23 10:14:05 -05:00
1e5a73c468 silence warnings when using default OpenCL headers. Pick OpenCL v2.1 as default. 2021-02-17 17:36:35 -05:00
e7e2d2323b Feb2021 GPU Package Update - GPU Package Files 2021-02-15 08:20:50 -08:00
f1ef7d85a8 T2345: Replace instances of NULL with nullptr
The following changes have been applied to src and lib folders:
regex replace: ([^"_])NULL ⇒ \1nullptr (8968 chgs in src, 1153 in lib)
Manually find/change: (void \*) nullptr ⇒ nullptr (1 case)
regex find: ".*?nullptr.*?"
  Manually ~14 cases back to "NULL" in src, ~2 in lib
  regex finds a few false positive where nullptr appears between two
  strings in a function call
2020-09-12 09:34:38 -06:00
db47eeb2a9 Fix handling of CL_DEVICE_TYPE flags 2020-07-31 19:21:32 +03:00
4f6dd381c3 Merge branch 'master' into gpu_hip 2020-03-30 17:15:55 -04:00
5a3a5d86d4 reduce compiler warnings and avoid clash with KOKKOS 2020-03-05 14:27:33 -05:00
66c5fa2abd Merge 'gpu_hip_port' into master 2020-01-28 20:35:08 +03:00
66a473455e silence warnings from generic OpenCL header files (as seen on Fedora 31) 2020-01-06 17:34:26 -05:00
65d11171c4 Replace functions which were deprecated since CUDA 5 2018-08-09 03:36:21 -04:00
ac7aeb6862 Add extra check for OpenCL timers
Fixes issue #1034 by preventing time() to access non-existent OpenCL events
2018-08-07 21:43:59 -04:00
223de57401 Added set_platform_accelerator() for nvd_device.h for OpenCL compatibility 2018-07-21 00:14:31 -05:00
884e72a4ba Merge pull request #1008 from akohlmey/support-platform-select
OpenCL related fixes and improvements to the GPU package
2018-07-20 14:32:49 -06:00
de8176b4fc various minor OpenCL related fixes and improvements to the GPU package
- document previously undocumented OpenCL tune settings
- implement OpenCL platform selection through prefixing the device type with the platform id separated by a colon
- allow passing custom tune parameters though postfixing the device type with the 13 tuneable parameters separated by commas
- remove an extra clear() that would delete device properties structs an cause LAMMPS to output garbage strings
2018-07-20 14:41:54 -04:00
2eb8d779e8 Fixes a memory leak when using OpenCL
The GPU package uses OpenCL events for measuring time. These have to be
released to free up memory. I removed the clReleaseEvent() calls in the
clear() method because in some cases they don't exist yet and I couldn't
find a way to check for a valid event (clRetainEvent didn't work). This
at least fixes the massive leak during simulations.

See issue #1006
2018-07-18 18:54:57 -04:00
341fa160fe Updated UCL_Device built with OpenCL to use platforms that support accelerators by default 2018-05-23 16:11:55 -05:00
e7e1827e57 remove variable length arrays in gpu lib 2018-05-08 00:48:53 -04:00