cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

yurtesen
Miniboss

OpenCL platform numbering...

I was wondering how does the OpenCL platforms are numbered? I have virtually identical nodes where both Nvidia and AMD SDKs are installed and in some nodes the AMD platform is the first one and on some noes the Nvidia platform Is there a trick to get the same order?

0 Likes
6 Replies
settle
Challenger

Logically, the OpenCL platform numbering would either be first-in gets a lower number (that's my general experience), or last-in gets a lower number.  Logic aside, some vendors don't play fair and may attempt to assert their platform over existing platforms.  Anyways, I would caution against sticking to a fixed cl_uint since things could possible change between uninstall/reinstall/updates of drivers/SDKs.  Instead, play it safe and use clGetPlatformInfo to locate a particular vendor platform.

0 Likes

Well, the Nvidia was installed first but yet it is all mixed. This is on a cluster with several nodes and the nodes are suppose to be identical. I couldnt find any files laying around which might effect the ordering (this is on Linux) even considered the icd file date times... which are exactly the same on all machines (linux machines)

You are right about using the vendor string, however for simple test programs it might be quicker to use the number only, In either case, I would like to have at least some sort of control over what is going on.

0 Likes

most likely order which are platforms listed depends on order of files which are open from /etc/OpenCL/vendors

just hunch but try ls -i /etc/OpenCL/vendors and maybe you find correlation of inode number and order of platforms.

0 Likes

Good idea, but I think not...

Machine 1

-------------------------------------------------------------------------------

Platform ID - Name : 0  - AMD Accelerated Parallel Processing

Platform ID - Name : 1  - NVIDIA CUDA

-------------------------------------------------------------------------------

-bash-4.1$ ls -li /etc/OpenCL/vendors |sort

33556689 -rw-r--r-- 1 root root 11 Oct 25  2011 nvidia.icd

33557129 -rw-r--r-- 1 root root 15 Nov  7  2011 amdocl32.icd

33557130 -rw-r--r-- 1 root root 15 Nov  7  2011 amdocl64.icd

total 12

-bash-4.1$

Machine2

-------------------------------------------------------------------------------

Platform ID - Name : 0  - NVIDIA CUDA

Platform ID - Name : 1  - AMD Accelerated Parallel Processing

-------------------------------------------------------------------------------

-bash-4.1$ ls -li /etc/OpenCL/vendors |sort

57411796 -rw-r--r--. 1 root root 11 Oct 25  2011 nvidia.icd

57412232 -rw-r--r--  1 root root 15 Nov  7  2011 amdocl32.icd

57412233 -rw-r--r--  1 root root 15 Nov  7  2011 amdocl64.icd

total 12

-bash-4.1$

I thought about pci ids also but in this machine there is only nvidia cards and amd sdk works on processors only...

Anyway, it is not so big deal to parse the vendor strings. I guess this will stay as a mystery after all

0 Likes

What were the exact orders of installing the graphics cards, drivers, SDKs, and any other related configurations/updates?  If everything was done exactly identically, then your results are indeed strange (or suggest the order is randomly assigned).

0 Likes

I believe the only physical difference is the order of nvidia cards (there are 2 in each node). There are 3 slots in each node, and in some nodes the cards are in different slots. While I cant be sure if "everything" was done exactly the same way on "every" node.

Softwarewise, nvidia was working on all nodes before I put the AMD icd files. All nodes are updated

I am not sure if order of installing something is important, there is no fil where the platforms are added by order of installation right?

I checked 6 of the nodes and order of cards in the nodes does not seem to be the issue:

---

11:00.0 3D controller: nVidia Corporation GF100 [Tesla S2050] (rev a3)

14:00.0 3D controller: nVidia Corporation GF100 [Tesla S2050] (rev a3)

Platform ID - Name : 0  - NVIDIA CUDA

Platform ID - Name : 1  - AMD Accelerated Parallel Processing

----

06:00.0 3D controller: nVidia Corporation GF100 [Tesla S2050] (rev a3)

11:00.0 3D controller: nVidia Corporation GF100 [Tesla S2050] (rev a3)

Platform ID - Name : 0  - AMD Accelerated Parallel Processing

Platform ID - Name : 1  - NVIDIA CUDA

---

But then in one node:

---

06:00.0 3D controller: nVidia Corporation GF100 [Tesla S2050] (rev a3)

11:00.0 3D controller: nVidia Corporation GF100 [Tesla S2050] (rev a3)

---

Platform ID - Name : 0  - NVIDIA CUDA

Platform ID - Name : 1  - AMD Accelerated Parallel Processing

---

0 Likes