Looks like the login nodes do not have a /etc/OpenCL/vendors entry, so the runtime can’t find the appropriate libraries and fails.
I imagine this is done on purpose to avoid people running on the login node but, in any case, I tested the CPU driver provided in a Ubuntu and a RHEL system today and it looks like the CPU driver install is working as expected.
Regards,
Carlos
From: "Hammond, Jeff R" <jeff.r.hammond@intel.com>
Date: Thursday, October 24, 2019 at 10:47 AM
To: "Peterka, Thomas" <tpeterka@mcs.anl.gov>, "Rosales-fernandez, Carlos" <carlos.rosales-fernandez@intel.com>, "Harms, Kevin" <harms@alcf.anl.gov>
Cc: "Ecp-aurora-sdk-discuss@lists.jlse.anl.gov" <Ecp-aurora-sdk-discuss@lists.jlse.anl.gov>
Subject: Re: [Ecp-aurora-sdk-discuss] allocating an STL vector in USM using SYCL w/ latest version of SDK
What OpenCL is installed on the login node?
Brodman says Intel SYCL from GitHub plusoclcpuexp-2019.8.8.0.0822 works on his Xeon.
Jeff
From: Ecp-aurora-sdk-discuss <ecp-aurora-sdk-discuss-bounces@lists.jlse.anl.gov> on behalf of "Peterka, Thomas via Ecp-aurora-sdk-discuss"
<ecp-aurora-sdk-discuss@lists.jlse.anl.gov>
Reply-To: "Peterka, Thomas" <tpeterka@mcs.anl.gov>
Date: Thursday, October 24, 2019 at 7:47 AM
To: "Rosales-fernandez, Carlos" <carlos.rosales-fernandez@intel.com>, "Kevin Harms (Argonne)" <harms@alcf.anl.gov>
Cc: "Ecp-aurora-sdk-discuss@lists.jlse.anl.gov" <Ecp-aurora-sdk-discuss@lists.jlse.anl.gov>
Subject: Re: [Ecp-aurora-sdk-discuss] allocating an STL vector in USM using SYCL w/ latest version of SDK
Carlos,
You’re right. I was running on a login node because I thought small tests were ok there, the software stack is the same, and I would try to get code running on the CPU first.
I can confirm that the vector allocation and resize does indeed work as intended on an iris compute node. I’ll run on the compute nodes from now on.
To answer Kevin’s question:
using sycl::usm_allocator<int, sycl::usm::alloc::shared> alloc(ctxt, dev) causes the following error when running on the login node
"terminate called after throwing an instance of 'cl::sycl::invalid_object_error’ what(): This instance of device is a host instance 0 (CL_SUCCESS)"
But it also runs correctly on an iris compute node.
Many thanks. Onward,
Tom
-----------------
Tom Peterka
Mathematics and Computer Science Division
Argonne National Laboratory
9700 S. Cass Ave.
Lemont, IL 60439
Bldg 240, Rm 2148
e-mail: tpeterka@mcs.anl.gov
web: www.mcs.anl.gov/~tpeterka
phone: 630-252-7198
On Oct 24, 2019, at 7:54 AM, Rosales-fernandez, Carlos <carlos.rosales-fernandez@intel.com> wrote:
Thomas,
When I tested the latest SDK the allocator_vector.cpp example worked correctly on the iris nodes, but it may segfault if you run on a login node (I only test building there, not execution) – can you confirm if you saw the segfault in a compute node?
Carlos
From: Ecp-aurora-sdk-discuss <ecp-aurora-sdk-discuss-bounces@lists.jlse.anl.gov> on behalf of "Peterka, Thomas via Ecp-aurora-sdk-discuss" <ecp-aurora-sdk-discuss@lists.jlse.anl.gov>
Reply-To: "Peterka, Thomas" <tpeterka@mcs.anl.gov>
Date: Wednesday, October 23, 2019 at 8:12 PM
To: "Ecp-aurora-sdk-discuss@lists.jlse.anl.gov" <Ecp-aurora-sdk-discuss@lists.jlse.anl.gov>
Subject: [Ecp-aurora-sdk-discuss] allocating an STL vector in USM using SYCL w/ latest version of SDK
Hi,
I tried to compile and run a test of allocating a C++ std::vector using USM in the latest version of the SYCL SDK. I basically copied the code in this example:
Here is a snippet of my code:
#include <CL/sycl/usm/usm_allocator.hpp>
// needed for usm_allocator
using namespace cl;
sycl::default_selector selector;
sycl::queue q(selector);
auto dev = q.get_device();
auto ctxt = q.get_context();
sycl::usm_allocator<int, sycl::usm::alloc::host> alloc(ctxt, dev);
std::vector<int, decltype(alloc)> n(alloc);
n.resize(2); // seg faults
The last line, n.resize(2), seg faults. Trying to avoid the resizing by allocating a given size also seg faults:
std::vector<int, decltype(alloc)> n(2, alloc);
Can anyone confirm that allocating/resizing a nonzero-size vector works with the latest USM, or is this a bug?
Thanks,
Tom
-----------------
Tom Peterka
Mathematics and Computer Science Division
Argonne National Laboratory
9700 S. Cass Ave.
Lemont, IL 60439
Bldg 240, Rm 2148
e-mail: tpeterka@mcs.anl.gov
web: www.mcs.anl.gov/~tpeterka
phone: 630-252-7198