biod.pnpi.spb.ru
/
alexxy
/
gromacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
beae8b0
)
Activate SYCL build on CI
author
Andrey Alekseenko
<al42and@gmail.com>
Thu, 8 Oct 2020 08:51:36 +0000
(08:51 +0000)
committer
Mark Abraham
<mark.j.abraham@gmail.com>
Thu, 8 Oct 2020 08:51:36 +0000
(08:51 +0000)
admin/gitlab-ci/global.gitlab-ci.yml
patch
|
blob
|
history
admin/gitlab-ci/gromacs.gitlab-ci.yml
patch
|
blob
|
history
src/gromacs/ewald/pme.cpp
patch
|
blob
|
history
src/gromacs/gpu_utils/gpu_utils.cpp
patch
|
blob
|
history
src/gromacs/hardware/device_management_sycl.cpp
patch
|
blob
|
history
src/gromacs/taskassignment/decidegpuusage.cpp
patch
|
blob
|
history
diff --git
a/admin/gitlab-ci/global.gitlab-ci.yml
b/admin/gitlab-ci/global.gitlab-ci.yml
index c3a4bf30f71abc0aa6ee7f71d59cb73e8739b7d4..2463fa96b43269894b04ab2cc947fa9171e4f116 100644
(file)
--- a/
admin/gitlab-ci/global.gitlab-ci.yml
+++ b/
admin/gitlab-ci/global.gitlab-ci.yml
@@
-52,6
+52,11
@@
CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
CMAKE_GPU_OPTIONS: -DGMX_GPU=OpenCL
CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
CMAKE_GPU_OPTIONS: -DGMX_GPU=OpenCL
+.use-sycl:
+ variables:
+ CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
+ CMAKE_GPU_OPTIONS: -DGMX_GPU=SYCL
+
# Base definition for using gcc.
.use-gcc:base:
variables:
# Base definition for using gcc.
.use-gcc:base:
variables:
diff --git
a/admin/gitlab-ci/gromacs.gitlab-ci.yml
b/admin/gitlab-ci/gromacs.gitlab-ci.yml
index b96b584497238209a858792c2378ab2d13c9408b..f5c9ea23ca64588048e3af5dc8b0740ae5a40c8e 100644
(file)
--- a/
admin/gitlab-ci/gromacs.gitlab-ci.yml
+++ b/
admin/gitlab-ci/gromacs.gitlab-ci.yml
@@
-312,6
+312,16
@@
gromacs:oneapi-2021.1-beta09-opencl:configure:
variables:
COMPILER_MAJOR_VERSION: 2021
variables:
COMPILER_MAJOR_VERSION: 2021
+gromacs:oneapi-2021.1-beta09-sycl:configure:
+ extends:
+ - .gromacs:base:configure
+ - .use-oneapi:base
+ - .use-sycl
+ - .rules:merge-and-post-merge-acceptance
+ image: gromacs/cmake-3.17.2-oneapi-2021.1-beta09-master
+ variables:
+ COMPILER_MAJOR_VERSION: 2021
+
gromacs:clang-UBSAN:configure:
extends:
- .gromacs:base:configure
gromacs:clang-UBSAN:configure:
extends:
- .gromacs:base:configure
@@
-540,6
+550,17
@@
gromacs:oneapi-2021.1-beta09-opencl:build:
needs:
- job: gromacs:oneapi-2021.1-beta09-opencl:configure
needs:
- job: gromacs:oneapi-2021.1-beta09-opencl:configure
+gromacs:oneapi-2021.1-beta09-sycl:build:
+ extends:
+ - .variables:default
+ - .gromacs:base:build
+ - .use-ccache
+ - .use-oneapi:base
+ - .rules:merge-and-post-merge-acceptance
+ image: gromacs/cmake-3.17.2-oneapi-2021.1-beta09-master
+ needs:
+ - job: gromacs:oneapi-2021.1-beta09-sycl:configure
+
gromacs:clang-9-mpi:build:
extends:
- .variables:default
gromacs:clang-9-mpi:build:
extends:
- .variables:default
@@
-794,6
+815,15
@@
gromacs:oneapi-2021.1-beta09-opencl:test:
needs:
- job: gromacs:oneapi-2021.1-beta09-opencl:build
needs:
- job: gromacs:oneapi-2021.1-beta09-opencl:build
+gromacs:oneapi-2021.1-beta09-sycl:test:
+ extends:
+ - .gromacs:base:test
+ - .use-oneapi:base
+ - .rules:post-merge-acceptance
+ image: gromacs/cmake-3.17.2-oneapi-2021.1-beta09-master
+ needs:
+ - job: gromacs:oneapi-2021.1-beta09-sycl:build
+
gromacs:clang-9-mpi:test:
extends:
- .gromacs:base:test
gromacs:clang-9-mpi:test:
extends:
- .gromacs:base:test
@@
-948,6
+978,16
@@
gromacs:oneapi-2021.1-beta09-opencl:regressiontest:
- job: gromacs:oneapi-2021.1-beta09-opencl:build
- job: regressiontests:prepare
- job: gromacs:oneapi-2021.1-beta09-opencl:build
- job: regressiontests:prepare
+gromacs:oneapi-2021.1-beta09-sycl:regressiontest:
+ extends:
+ - .gromacs:base:regressiontest
+ - .use-oneapi:base
+ - .rules:post-merge-acceptance
+ image: gromacs/cmake-3.17.2-oneapi-2021.1-beta09-master
+ needs:
+ - job: gromacs:oneapi-2021.1-beta09-sycl:build
+ - job: regressiontests:prepare
+
gromacs:gcc-8-cuda-11.0:release:test:
extends:
- .gromacs:base:test
gromacs:gcc-8-cuda-11.0:release:test:
extends:
- .gromacs:base:test
diff --git
a/src/gromacs/ewald/pme.cpp
b/src/gromacs/ewald/pme.cpp
index 912216964c66a664b8de8c460a5629e43cb3aa2f..76051509ecd8d499821b82fd8ed07e7bf290a18d 100644
(file)
--- a/
src/gromacs/ewald/pme.cpp
+++ b/
src/gromacs/ewald/pme.cpp
@@
-163,6
+163,10
@@
bool pme_gpu_supports_build(std::string* error)
{
errorReasons.emplace_back("a non-GPU build");
}
{
errorReasons.emplace_back("a non-GPU build");
}
+ if (GMX_GPU_SYCL)
+ {
+ errorReasons.emplace_back("SYCL build"); // SYCL-TODO
+ }
return addMessageIfNotSupported(errorReasons, error);
}
return addMessageIfNotSupported(errorReasons, error);
}
@@
-235,7
+239,10
@@
static bool pme_gpu_check_restrictions(const gmx_pme_t* pme, std::string* error)
{
errorReasons.emplace_back("non-GPU build of GROMACS");
}
{
errorReasons.emplace_back("non-GPU build of GROMACS");
}
-
+ if (GMX_GPU_SYCL)
+ {
+ errorReasons.emplace_back("SYCL build of GROMACS"); // SYCL-TODO
+ }
return addMessageIfNotSupported(errorReasons, error);
}
return addMessageIfNotSupported(errorReasons, error);
}
diff --git
a/src/gromacs/gpu_utils/gpu_utils.cpp
b/src/gromacs/gpu_utils/gpu_utils.cpp
index 1379ba83ce97f0947b4e3caeaded6ac8df35c3d6..eb26ce0a8e16a5e381363add1747f7f2c5169c39 100644
(file)
--- a/
src/gromacs/gpu_utils/gpu_utils.cpp
+++ b/
src/gromacs/gpu_utils/gpu_utils.cpp
@@
-79,5
+79,9
@@
bool buildSupportsNonbondedOnGpu(std::string* error)
{
errorReasons.emplace_back("non-GPU build of GROMACS");
}
{
errorReasons.emplace_back("non-GPU build of GROMACS");
}
+ if (GMX_GPU_SYCL)
+ {
+ errorReasons.emplace_back("SYCL build of GROMACS");
+ }
return addMessageIfNotSupported(errorReasons, error);
}
return addMessageIfNotSupported(errorReasons, error);
}
diff --git
a/src/gromacs/hardware/device_management_sycl.cpp
b/src/gromacs/hardware/device_management_sycl.cpp
index 236c2d2ab35827547b2cb82e6d80af73303484cc..0c142e0001dacb5476c40fa3b57bc7398dc49127 100644
(file)
--- a/
src/gromacs/hardware/device_management_sycl.cpp
+++ b/
src/gromacs/hardware/device_management_sycl.cpp
@@
-118,10
+118,9
@@
static DeviceStatus isDeviceCompatible(const cl::sycl::device& syclDevice)
static bool isDeviceFunctional(const cl::sycl::device& syclDevice, std::string* errorMessage)
{
static const int numThreads = 8;
static bool isDeviceFunctional(const cl::sycl::device& syclDevice, std::string* errorMessage)
{
static const int numThreads = 8;
- cl::sycl::queue queue;
try
{
try
{
-
queue = cl::sycl::
queue(syclDevice);
+
cl::sycl::queue
queue(syclDevice);
cl::sycl::buffer<int, 1> buffer(numThreads);
queue.submit([&](cl::sycl::handler& cgh) {
auto d_buffer = buffer.get_access<cl::sycl::access::mode::discard_write>(cgh);
cl::sycl::buffer<int, 1> buffer(numThreads);
queue.submit([&](cl::sycl::handler& cgh) {
auto d_buffer = buffer.get_access<cl::sycl::access::mode::discard_write>(cgh);
@@
-202,7
+201,7
@@
std::vector<std::unique_ptr<DeviceInformation>> findDevices()
deviceInfos[i]->syclDevice = syclDevice;
deviceInfos[i]->status = checkDevice(i, *deviceInfos[i]);
deviceInfos[i]->deviceVendor =
deviceInfos[i]->syclDevice = syclDevice;
deviceInfos[i]->status = checkDevice(i, *deviceInfos[i]);
deviceInfos[i]->deviceVendor =
- getDeviceVendor(syclDevice.get_info<sycl::info::device::vendor>());
+ getDeviceVendor(syclDevice.get_info<sycl::info::device::vendor>()
.c_str()
);
}
return deviceInfos;
}
}
return deviceInfos;
}
diff --git
a/src/gromacs/taskassignment/decidegpuusage.cpp
b/src/gromacs/taskassignment/decidegpuusage.cpp
index 3ec7ce027e3bb3c0fed3876f0a7bb0315e517789..020e6187c1803268c0991549b8f02a2b0a369df2 100644
(file)
--- a/
src/gromacs/taskassignment/decidegpuusage.cpp
+++ b/
src/gromacs/taskassignment/decidegpuusage.cpp
@@
-319,7
+319,7
@@
bool decideWhetherToUseGpusForNonbonded(const TaskTarget nonbondedTarge
// If we get here, then the user permitted GPUs, which we should
// use for nonbonded interactions.
// If we get here, then the user permitted GPUs, which we should
// use for nonbonded interactions.
- return gpusWereDetected;
+ return
buildSupportsNonbondedOnGpu &&
gpusWereDetected;
}
bool decideWhetherToUseGpusForPme(const bool useGpuForNonbonded,
}
bool decideWhetherToUseGpusForPme(const bool useGpuForNonbonded,