madMAx43v3r / chia-gigahorse

224 stars 31 forks source link

Failed to allocate MEM_TYPE_DEVICE : CUDA error 2 : out of memory #303

Closed DMJ777 closed 7 months ago

DMJ777 commented 7 months ago

7b6785a8-77b5-4fc3-af9b-b7e2bd36e2c6 4905f169-1764-4b3a-bdf7-2cb044bea7a2 08532860-f527-4586-b911-9308056c38e2

Meet this problem , Gigahorse plot well when Chia GUI syncing (but time increase) or off - plot time has been about 2-3 minutes. But when chia Gui synced always error - Failed to allocate MEM_TYPE_DEVICE : CUDA error 2 : out of memory

I have 256gb of RAM , tried plot with two GPU,s , tried to use -M 0 and many different , Tried limit RAM usage but not been lucky because no understand how its working like.

In windows i run Chia GUI and plotting at same time without problems but not in UBUNTU, in windows plotting time increase 7x longer but its working , I have two 3080 ti GPU,s .

Any idea how to get this to work? Any formula ? Settings?

madMAx43v3r commented 7 months ago

It's means out of VRAM (MEM_TYPE_DEVICE = VRAM), not system RAM. Need to limit farmer to use second GPU and first one for plotting.

DMJ777 commented 7 months ago

Thank you for your reply , important question , how and where to do this? any manual? Thanks a lot in advantage

spleen911 commented 7 months ago

https://github.com/madMAx43v3r/chia-gigahorse/blob/master/chiapos/README.md#limit-gpu-usage

spleen911 commented 7 months ago

add to plotter ........... -g 0 add to farmer startup .......... import CUDA_VISIBLE_DEVICES=1

DMJ777 commented 7 months ago

add to plotter ........... -g 0 add to farmer startup .......... import CUDA_VISIBLE_DEVICES=1

-g 0 its number of one gpu ? ad this record to start code?

thank you for your reply, how to ad to farmer this? as its start from software shortcut in ubuntu

madMAx43v3r commented 7 months ago

thank you for your reply, how to ad to farmer this? as its start from software shortcut in ubuntu

Need to edit / create ~/.profile with:

export CUDA_VISIBLE_DEVICES=1

And then logout / login again, or reboot.

add to plotter ........... -g 0

Because he is using CUDA_VISIBLE_DEVICES for the farmer, need to use the same for plotter:

CUDA_VISIBLE_DEVICES=0 ./cuda_plot_k32_v3 ...

(without any -r or -g)

DMJ777 commented 7 months ago

thank you for your reply, how to ad to farmer this? as its start from software shortcut in ubuntu

Need to edit / create ~/.profile with:

export CUDA_VISIBLE_DEVICES=1

And then logout / login again, or reboot.

Thank you very much , Its working 8))) Will be helpful for others ....

plotter -g 0 profile edit