• 1/3

Check whether iray uses CPUs and/or GPUs

Posted by MaxStation, 1 March 2011 12:00 am

There is an easy way to check whether iray uses CPUs and/or GPUs: the mental ray log file.

In Customize -> Preferences check the option 'Show/Log Information Messages' and 'Write Messages to File' and select the file you'd like to file to be written to by clicking on the File button:

Customize -> Preferences -> Messages

Note that the actual file name will be max_Production.log even though i selected max.log as the filename.

 

CPU only

Once the render starts you can look at the log file, scroll down a little bit (or just search for IRAY) and you'll see something like:

IRAY 0.3 info : using CPU backend with 4 threads

if you don't have a CUDA capable graphics board in the machine. In this case it's rendering on four threads (the machine has two cpu's and hyperthreading is enabled).

 

With a CUDA capable graphics card

Or something like this if you do have a CUDA capable graphics board:

IRAY 0.3  info : found 1 CUDA devices

IRAY 0.3  info : defaulting to use all CUDA devices

IRAY 0.3  info : using CPU backend with 8 threads

IRAY 0.11 info : CUDA device 0: "Quadro FX 1800M" (compute capability 1.2)

Both the GPU and CPUs are used. You may need to update your driver, check the 3ds Max hardware page.

 

Asking for the impossible...

If you use the Iray Manager Maxscript to force the use of the GPUs on a machine without a CUDA capable graphics board you get:

IRAY 0.3 warn : no CUDA capable devices found

 

 

For more information see the iray FAQ on Shane's blog. Check whether your graphics card is listed on http://www.nvidia.com/object/cuda_gpus.html

9 Comments

MaxStation

Posted 1 March 2011 3:49 pm

Hi SuperCoon, thanks for asking that: Yes, both GPU and CPU will be used at the same time (as long as you GPU is supported). I've done a quick update on the post (i forgot to copy the CPU info from the logfile in the GPU section).

SuperCoon

Posted 1 March 2011 7:01 pm

Cool! That's nice to know.

PiXeL_MoNKeY

Posted 4 March 2011 5:17 pm

NOTE: When it comes to iray using GPU only over CPU+GPU can be about 10% faster. Of course this will depend on the hardware being used, but if you have Fermi based GPU-cards I would turn off CPU.

See my benchmark results at CGTalk for more information on what I found: http://forums.cgsociety.org/showpost.php?p=6842823&postcount=56

-Eric

SuperCoon

Posted 4 March 2011 10:39 pm

So how would one tell iray not to use the CPU?

MaxStation

Posted 7 March 2011 9:52 am

Hi SuperCoon,

The easiest way to tell iray which GPU's/CPU's to use is to use the Iray Manager Maxscript: http://loran-cg.blogspot.com/2010/10/iray-manager-maxscript.html

Alternatively you can use the following MAXScript commands (from the iray FAQ - http://area.autodesk.com/blogs/shane/the_iray_faq):

Use only the CPU:
mental_ray_string_options.addoption "iray threads" sysinfo.cpucount
mental_ray_string_options.addoption "iray devices" ""

Use only the GPU (when you have 2):
mental_ray_string_options.addoption "iray threads" 0
mental_ray_string_options.addoption "iray devices" "0 1"

Use both CPU and GPU (when you have 2):
mental_ray_string_options.addoption "iray threads" sysinfo.cpucount
mental_ray_string_options.addoption "iray devices" "0 1"

SuperCoon

Posted 7 March 2011 2:41 pm

I got an error on the second link, but the first link was really helpful; thanks.

MaxStation

Posted 7 March 2011 3:05 pm

Hi SuperCoon, thanks for higlighting that. The link for the iray FAQ is http://area.autodesk.com/blogs/shane/the_iray_faq

A newer version of the Iray Manager Maxscript is on http://dimensao3.com/al/

SuperCoon

Posted 7 March 2011 3:29 pm

Cool! The new manager looks to be greatly enhanced; thanks again. Oh! Thanks for the corrected link too.

d619303

Posted 21 March 2012 4:30 am

thanks for your sharing.Hyundai Sonata Hybrid
http://www.hyundaisonatahybrid.info

Add Your Comment

You must be logged in to post a comment. Login here or Register

Please only report comments that are spam or abusive.