Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPU #11

Open
random-robbie opened this issue Oct 3, 2014 · 29 comments
Open

GPU #11

random-robbie opened this issue Oct 3, 2014 · 29 comments

Comments

@random-robbie
Copy link

Hi,

Does this also work on the GPU clusters at all?

g2.2xlarge

looking for a fairly quick way of rendering a project of around 250 frames

@djoxy
Copy link

djoxy commented Oct 3, 2014

If you mean to render using Nvidia GPU yes it works but you will have to add a option to the blender command line (task).

-P cuda_setup.py

EXAMPLE:

blender -b project.blend -o //finished/render -F PNG -x 1 -P cuda_setup.py -s 50 -e 110 -a

You have to create file cuda_setup.py (via notepad ++) with this content:

import bpy
bpy.context.user_preferences.system.compute_device_type = 'CUDA'
bpy.context.user_preferences.system.compute_device = 'CUDA_MULTI_2'

This basically sets up the blender to use the GPU for rendering.

CUDA_MULTI_2 is the name for the Amazon instance with dual Tesla GPU.

Only thing I cant recall is how to get this name for other type of nvidia cards and you have to set it up before going.

Hope I was clear enough.

Best regards

@random-robbie
Copy link
Author

Thank you for your help I will try this with my next little project!

Amazing work! keep it up!

@random-robbie
Copy link
Author

forgot to ask did you see any major speed improvement with this?

@random-robbie random-robbie reopened this Oct 3, 2014
@djoxy
Copy link

djoxy commented Oct 3, 2014

I just notice that prices for this GPU spot instances where down by a big numbers since last time I was using GPU instance.

I think this is a game changer. My guess is that those GPU instances are more then 10 times faster then CPU and price is around $0.07 now. Which was the original price for CPU instance when Brenda was created.

@random-robbie
Copy link
Author

brilliant i currently have

c3.8xlarge
c3.4large
c3.xlarge
c3.xlarge

running at the moment so on my next project i will do the cuda side.

you should add the cuda options in to the main readme.

once again thanks for your help

@djoxy
Copy link

djoxy commented Oct 3, 2014

Hey I am not a developer. I only researched this so I can use it for rendering of my projects :). Basic Brenda user here.

Welcome

Best regards

@random-robbie
Copy link
Author

you've done really well i am just firing up instances to get it done quicker :)

i will let you know how i get on with the cuda.

@random-robbie
Copy link
Author

currently getting HVM required for g2.2xlarge any ideas?

@random-robbie random-robbie reopened this Oct 3, 2014
@random-robbie
Copy link
Author

hate to ask could you create a AMI for the GPU at all? i am struggling to get it all working correctly.

@djoxy
Copy link

djoxy commented Oct 7, 2014

You don't have to create special AMI for GPU. You just have to tell current AMI to use the CUDA for rendering instead of CPU via script I send you. Only problem is that path to the script should be available for rendering machine. What I did is that I put that script on the S3 where rendered output files are so it is accessible by a Brenda rendering node.

@djoxy
Copy link

djoxy commented Oct 7, 2014

By the way, you can update Blender on the AMI to current one 2.72. What you have to do is start that ami on one machine then update blender and then create new AMI from that running machine. You will have to change AMI name in the Brenda configuration too so Brenda use it instead of old one.

@random-robbie
Copy link
Author

i tried to run the brenda AMI on a GPU cluster and cause the AMI is PV and not HVM it wont run it.
I kept getting an error stating it needed to be HVM

@djoxy
Copy link

djoxy commented Oct 7, 2014

I see now. This is new. So we have to build new fresh AMI that supports HVM

@djoxy
Copy link

djoxy commented Oct 7, 2014

Where you struggle?

@random-robbie
Copy link
Author

it just would not connect with any of the nodes.

i also think that i done the frame rate template wrong.

current file it is:

blender -b *.blend -o //finished/render -F AVI_JPEG -x 1 -P cuda_setup.py -s $START -e $END -j $STEP -t 0 -a

@djoxy
Copy link

djoxy commented Oct 7, 2014

This was my template:

blender -b /mnt/s3/project.blend -o //finished/animation -F PNG -x 1 -P /mnt/s3/py/cuda_setup.py -s 50 -e 110 -a

@random-robbie
Copy link
Author

do you have skype at all? easier to chat than bomb your github? add me robbie@xcellweb.co.uk

@Berryu
Copy link

Berryu commented Oct 17, 2014

I'm also having problems with the HVM error. Did you guys already solved the problem?

@random-robbie
Copy link
Author

driver issues with the GPU under ubunut i think is the issue.

@djoxy
Copy link

djoxy commented Oct 17, 2014

Yes. Drivers for nvidia K520 and CUDA. Since Robby and me aren't that Linux proficient.

@Berryu
Copy link

Berryu commented Oct 17, 2014

Wait, I'm confused. Is it fixable or not?

@djoxy
Copy link

djoxy commented Oct 17, 2014

Yes by someone who knows how to do it properly...

@Berryu
Copy link

Berryu commented Oct 18, 2014

Doesn't that just mean that we need to make a custom IMA with the new drivers?

@Berryu
Copy link

Berryu commented Oct 19, 2014

Hey guys,

I'm glad to tell you that I found a way to use the gpu. You will have to launch a g2.2xlarge instance via the aws marketplace with the nvidia grid drivers preinstalled. After loggin in with ssh you need to create a custom IMA via the instructions James has written at the bottom of the page.

Just one problem, after rendering for one hour. It seems that the nvidia grid doesn't render, but the 8 cpu cores of the instance.

How to fix this?

edit: Forgot to mention that you have to configure the custom instance id in the blenda.conf file.

@Berryu
Copy link

Berryu commented Oct 19, 2014

Any luck?

@djoxy
Copy link

djoxy commented Nov 22, 2014

Hey Berry,

Sorry to say this but that way you did nothing. You just used AMI with NVIDIA drivers but still rendered via CPU. Blender by default use CPU for rendering until its ordered to use CUDA/GPUs. And here is the way to do that: http://www.dalaifelinto.com/?p=746

The problem I faced today is that I used an AMI (Ubuntu 14.04 x64) with Nvidia drivers and CUDA 6.5 already installed but for some reason Blender 2.72 does not see the cards (2xTesla). And that worked year ago (on Windows). Sadly this is out of my proficiency. Bottom line is:

We have:

  1. AMI with Nvidia drivers and CUDA 6.5 preinstalled
  2. Latest Blender 2.72b installed
  3. Brenda installed
  4. Script that force Blender to use GPU for rendering

If someone can fix and find the reason why Blender does not see the cards that would solve our problems.

Thanks

P.S. Public community AMI with NVIDIA and CUDA: http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/

@djoxy
Copy link

djoxy commented Nov 25, 2014

Okay, I have managed it working and just realized that GPU isn't worth for a bucks. The limit of GPU instances is only 5. They do render double faster then using CPU but you can arise 45 more CPU machines.

@hardbyte
Copy link

hardbyte commented Apr 7, 2015

Using favourable spot prices in North Virginia one can run GPU instances for between 5 and 10 cents per hour. In EC2 Management console there is a section Limits where I needed to put in a request to be allowed more than 5 g2.2xlarge instances but Amazon came back with an approval the same day for 40 machines.

Getting Blender going with the GPU instances took some fiddling so I've created a public AMI which you can use. Substitute the AMI with my image which has CUDA enabled and Blender 2.74 installed:

North Virginia (us-east-1): ami-7207351a
Sydney (ap-southeast-2): ami-9f5220a5

Use a frame-template with the addition -P /opt/cuda\_setup.py:

brenda-work -T frame-template -s 1 -e 1 push

Note if you don't include -P /opt/cuda_setup.py it will still run but will use the CPU instead of GPU. Tip run nvidia-smi to see GPU utilization during rendering. Note the AMI is based on StarCluster which uses Ubuntu 12.04 as the underlying operating system. Blender 2.73 is also present under /opt/blender-2.73.

Cross posted to my blog - http://bitsofpy.blogspot.com.au/2015/04/amazon-blender-274.html

@djoxy
Copy link

djoxy commented Apr 7, 2015

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants