6 Replies Latest reply on May 19, 2012 10:13 AM by yurtesen

    OpenCL platform numbering...

    yurtesen

      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?

        • Re: OpenCL platform numbering...
          settle

          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.

            • Re: OpenCL platform numbering...
              yurtesen

              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.

                • Re: OpenCL platform numbering...
                  nou

                  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.

                    • Re: OpenCL platform numbering...
                      yurtesen

                      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

                        • Re: OpenCL platform numbering...
                          settle

                          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).

                            • Re: OpenCL platform numbering...
                              yurtesen

                              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

                              ---