Etayson / server_client_Rotor_Cuda

Server and client app for Rotor-Cuda solver
2 stars 1 forks source link

Linux compilation #1

Open Alexxino opened 1 year ago

Alexxino commented 1 year ago

I have tried to compile the source codeof the client (im only interested in the client) in Linux since PureBasic allows to generate for different platforms using the same source code. However, I got the following error " Assembler error" in all the files. I have tried to change the compiler options to Linux/console but I got always the same error. I tried versions 5.70 and 6.0 of purebasic with no luck. image

Can you please try to generate for linux ? If the code needs a lot of code changing then forget about it, but maybe with some little fixes it is possible. image

I'm running it on Ubuntu 22.04 x64 LTS

Etayson commented 1 year ago

First of all you need Purebasic v5.31. New version does not support ASCII. In unicode it will not work properly even if you сompile. I don't have a Linux machine now, maybe later I'll install Linux and try to compile.

Alexxino commented 1 year ago

Hello @Etayson Could you compile it in linux x64? I cannot find the linux version of PureBasic 5.30 or 5.31 on internet, i got only the new versions. Is it possible to compile it in windows for linux?

Thanks

Etayson commented 1 year ago

I compiled the rotor client on Ubuntu and didn't have any problems during compilation. Didn't make any changes other than the library path and color off. You can do it yourself. Purebasic doesn't cost too much https://www.purebasic.com/pricing.php After the purchase, any version of the Purebasic for any system (Amiga, Linux, Windows and OS X) will be available to you. But if you want, you can use what I compiled. I did not check how the client works on Linux. Just compiled. clientRotorCudaX64.zip

Alexxino commented 1 year ago

@Etayson Thank you so much! The client works perfectly on linux, now I have problems with the rotor-cuda linux binary which does not recognize the GPU devices with Cuda v11 o v12 as it says in the instructions however, that is not your repo so not your problem :) It is weird since it works perfect for windows but not in linux. I have tried compiling it with different architectures CCAP but no luck... I will keep fighting..

Etayson commented 1 year ago

I have a problem with compilation of Rotor app on Linux too. Before compilation you need replace the Main.cpp and Rotor.cpp files. And use CCAP exacly what GPU have. For ex 1063 CC is 61 and comand for compilation make gpu=1 CCAP=61 all otherwise does not want to work.

Alexxino commented 1 year ago

@Etayson Yeah that is exactly what I have done, replacing the files and trying multiple CCAP (from 50 to 86) and with cuda 12 and 11 however when I try to list the GPU in Rotor it says that I need to compile it with gpu options😤 I will try again What is the right CCAP for the 3090 or 4090? I think is 86

Etayson commented 1 year ago

RTX 3090 CC 86, RTX 4090 CC 89 https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ Also try to use CudaToolkit 11.8 About drivers: https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html CUDA 11.8.x >=450.80.02

Alexxino commented 1 year ago

Sadly nothing it's working. Let me explain what I'm doing and maybe you @Etayson can spot the mistake:

  1. I rent an instance in Vast.ai with one docker with cuda (I have tried with v11, v11.8 and v12) (For instance. 11.8.0-devel-ubuntu22.04)
  2. Download the Rotor github source code.
  3. Replace the files with the linux folder
  4. Install libgmp-dev package
  5. Change the Makefile with the right path for /usr/local/Cuda-11.8
  6. make clean; make gpu=1 CCAP=86 all

Every time I run ./Rotor -l to list the GPU it says that it is not compiled with GPU.. I'm going totally crazy, What am I doing wrong ? I'm trying with 8060 because its slightly cheaper but I would like to use it with 4090. This is very frustrating and time consuming.

PD: If you want to share the linux x64 compiled version with me I will try if maybe its a problem of the dockers...

Etayson commented 1 year ago

It looks like you're doing it right. When you finished Rotor compilation did you see error? If there no errors should work. I didn't use ./Rotor -l. I just run client and it work for me.

Alexxino commented 1 year ago

@Etayson No errors at all, compilation is good and It runs with CPU good but no functionality with GPU. Can you try to run ./Rotor -l (--list). The client you mean your client?

Alexxino commented 1 year ago

This is an example using the last driver 12.2:

image

Same output in all my attempts

Alexxino commented 1 year ago

Finally I make it work, listing the GPU is not working but it works using the GPU