OpenCL issue on Gentoo w/o dedicated graphics

65 views
Skip to first unread message

Konrad Schumacher

unread,
Jan 4, 2021, 12:26:20 PM1/4/21
to mcx-users

Happy new year everyone,


I recently started working with MMCLAB to simulate the sensitivity of NIRS probes using MRI-based head models. Unfortunately, I cannot get the current version of MMCLAB (1.9 Moon Cake - beta) running.

I adapted the basic-example, which runs with the 2019.4 version of MMCLAB (ran into another issue, separate posting, tbd); it prints the configuration on the Matlab command line and then nothing happens; 0% CPU. By peppering the source code with printf-commands, I think i traced back the problem to the clGetPlatformIDs call in mcx_list_cl_gpu; so I suppose it's an issue with openCL, right?


I'm running Gentoo 2.6, Kernel 4.19.80, on an Intel i7-4770, no dedicated graphics card (Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller). The OpenCL runtimes seem to be installed; locate libOpenCL.so finds /usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 (and associated sym-links).

I have no root privileges.


Any suggestions how to resolve this, (or requests I could address to my sysadmin) would be very appreciated.


Kind regards,

Konrad

Qianqian Fang

unread,
Jan 5, 2021, 12:06:23 AM1/5/21
to mcx-...@googlegroups.com, Konrad Schumacher
On 1/4/21 11:47 AM, Konrad Schumacher wrote:

Happy new year everyone,


I recently started working with MMCLAB to simulate the sensitivity of NIRS probes using MRI-based head models. Unfortunately, I cannot get the current version of MMCLAB (1.9 Moon Cake - beta) running.

I adapted the basic-example, which runs with the 2019.4 version of MMCLAB (ran into another issue, separate posting, tbd); it prints the configuration on the Matlab command line and then nothing happens; 0% CPU. By peppering the source code with printf-commands, I think i traced back the problem to the clGetPlatformIDs call in mcx_list_cl_gpu; so I suppose it's an issue with openCL, right?


I'm running Gentoo 2.6, Kernel 4.19.80, on an Intel i7-4770, no dedicated graphics card (Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller). The OpenCL runtimes seem to be installed; locate libOpenCL.so finds /usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0 (and associated sym-links).


i7-4xxx is too old for opencl. we noticed that it may run opencl in our past workshops, but the results may be incorrect, see some of our workshop prep instructions

http://mcx.space/wiki/index.cgi?Workshop/MCX19Preparation


libOpenCL.so does not actually do anything, but traverse the ICD (Installable Client Driver) from installed opencl compatible device drivers and link your chosen device to the corresponding device runtime libraries, so having a libOpenCL.so in your system does not mean you have a valid device installed or runtime installed.

Intel's CPU opencl runtime can be downloaded from here, I believe it does not support i7-4xxx

https://software.intel.com/content/www/us/en/develop/articles/opencl-drivers.html


on the other hand, since you don't have a GPU, running on the CPU using OpenCL is not necessarily faster, so you just set cfg.gpuid=-1 to use the SSE4 based CPU code, see README

https://github.com/fangq/mmc/blob/master/README.md#whats-new


I have no root privileges.


OpenCL does not need root privilege if installed properly



Any suggestions how to resolve this, (or requests I could address to my sysadmin) would be very appreciated.


Kind regards,

Konrad

--
You received this message because you are subscribed to the Google Groups "mcx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mcx-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mcx-users/ef8eada7-1cb6-4cf1-bf0b-7356ee155f60n%40googlegroups.com.

Konrad Schumacher

unread,
Jan 5, 2021, 4:37:07 AM1/5/21
to mcx-users

on the other hand, since you don't have a GPU, running on the CPU using OpenCL is not necessarily faster, so you just set cfg.gpuid=-1 to use the SSE4 based CPU code, see README

https://github.com/fangq/mmc/blob/master/README.md#whats-new


Dear Qianqian Fang,

thanks a lot for your immediate and helpful response! I’m one step further; with gpuid = -1 the simulation starts running. However, Matlab crashes immediately. I’ll post details in a new thread as this is not related to openCL, I think.

Thanks again!

Best, Konrad

Konrad Schumacher

unread,
Jan 5, 2021, 9:55:20 AM1/5/21
to mcx-users
Hi
I found out how to avoid Matlab crashing (see my other mail), but as soon as I add gpuid = -1 to the cfg, mmclab always returns an empty array in seeds.data, so I cannot replay. Can you reproduce that, e.g. when adding cfg.gpuid=-1 to the demo_example_replay.m?
Best, K
Reply all
Reply to author
Forward
0 new messages