|
[Sponsors] |
September 13, 2010, 06:48 |
SpeedIT Classic and OpenFOAM
|
#1 |
Senior Member
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 17 |
Hi,
I'm trying the SpeedIT Classic version with OpenFOAM plugin on OF 1.7. I compiled the SpeedIT library and OF plugin well (I think) following all the README.txt files but when I try icoFoam with PCG_accel solver I obtain "ERROR : solver function returned -1". My solver function is: solver_result = sicl_gscsrcg( n_rows, pgpu_vals, pgpu_c_idx, pgpu_r_idx, pgpu_X, pgpu_B, precond, &n_iter, &eps) ; Am I forgetting something? Thanks in advance for any help Andrea
__________________
Andrea Pasquali |
|
November 2, 2010, 01:43 |
Return -1
|
#2 |
New Member
Fábio
Join Date: Sep 2010
Posts: 2
Rep Power: 0 |
Hi andrea, have you recompiled OF in single precision?? It can be the reason of the solver error.
Best regard Fábio Santos |
|
November 2, 2010, 17:21 |
maybe try to recompile the speedit code in CUDA
|
#3 |
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0 |
Instead of recompiling OF in single precision (and you want double precision), if you have a 1.3 compute capable card for double precision on your computer, change the floats to double in the speedIt cuda code (if you know some CUDA) and then try it again.
to compile CUDA code in doubel precision at the -arch sm-1.3 flag to your nvcc calls. this might be in a compile script. Dan |
|
November 16, 2010, 05:17 |
|
#4 |
New Member
Stephan Koerner
Join Date: Mar 2009
Posts: 4
Rep Power: 17 |
Hello! I'm also trying to set up the OpenFoam Plugin. But as I'm not that familiar with C I don't understand how to insert the solver functions correctly.
If I delete the comment signs of the given functions and compile I get the following error message: "si_... was not declared in this scope" And if I don't insert any function it can be compiled without any problem but as soon I start the simulation I get the message: "Call your own solver from PBiCG_accel.C file" Do I need to edit the PBiCG_accel.C file at all? I switched OpenFoam already to single precision. I would really appreciate your help. Thanks in advance, Stephan Last edited by phan; November 16, 2010 at 07:50. |
|
November 16, 2010, 16:13 |
|
#5 |
Member
|
Please post the question to the forum at speedit.vratis.com as it does not concern OF users directly (you need to register first). We will be happy to answer your question.
|
|
November 17, 2010, 16:50 |
|
#6 |
New Member
Zhijun
Join Date: Nov 2010
Posts: 3
Rep Power: 16 |
dear lukasz ,please respect that openfoam is free software and that you should respect everybodys opinion if you take the freedom to advertise your products in this forum .i and my colleges don't like this style .can somebody please post the openfoam cuda plugin to the git repository so that we can evaluate the code without registering to this company?
thanks zhijun ! |
|
November 19, 2010, 14:54 |
|
#7 |
Member
|
Dear All,
We are happy to announce a new release of the OpenFOAM plugin 1.1 (GPL License). Here is the list of features: -Multi-GPU support. -Tested on Fermi architecture (GTX460 and Tesla C2050). -Automated submission of the domain to the GPU cards (using decomposePar from OpenFOAM). -Optimized submission of computational tasks to the best GPU card in the system for any number of computational threads. -Plugin picks the most powerful GPU card for a single thread cases. You can freely download it at speedit.vratis.com. Enjoy! |
|
December 13, 2010, 07:42 |
|
#8 |
Senior Member
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 17 |
Hi,
I'm coming back to use Speed IT + OpenFOAM plug in. I installed the new CUDA toolkit 3.2, the Speed IT 1.0, and the OpenFOAM plug in 1.0. When I run the "icoFoam" test with PCG_accel I have: --> FOAM FATAL ERROR: Can not allocate GPU memory FOAM exiting I don't know where is the probem, could anyone help me ? Thanks Andrea
__________________
Andrea Pasquali |
|
December 14, 2010, 07:50 |
|
#9 |
Senior Member
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 17 |
I found Cuda Error number 38 = cudaErrorNoDevice = No available CUDA device.
I meet this error when PCG_accel.C calls the first cuda command (cudaMalloc). What means "No available CUDA device" ? I tested the examples in SDK and they work well. Any help? Thanks
__________________
Andrea Pasquali |
|
December 14, 2010, 13:10 |
|
#10 |
Senior Member
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 17 |
Hi,
I solve my (first) problem . Now I have problem in single / double precision. I'm trying to compile speed it in double (I changed the float in double inside .cu and .h files) I run make ad I obtained: si_classic.cu(226): error: argument of type "const double *" is incompatible with parameter of type "const float *" si_classic.cu(242): error: argument of type "const double *" is incompatible with parameter of type "const float *" si_classic.cu(242): error: argument of type "const double *" is incompatible with parameter of type "const float *" 226 is cublasSnrm2 that is float (in cublas.h) 226 is cublasSdot that is float (in cublas.h) What I have to do? I'm trying to rechange they from double to float but I found other errors... have I to change the cublas.h file? Thanks for any help Andrea
__________________
Andrea Pasquali |
|
December 15, 2010, 07:18 |
|
#11 |
Senior Member
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 17 |
I recompiled the si_classic.cu and si_classic.h in double precision but my GPU is not still working. This is what I did:
- In .cu file I changed the "cublasSnrm2" and "cublasSdot" functions in "cublasDnrm2" and "cublasDdot", the "sicl_gs..." solver functions in "si_gd..." and all floats in double; - In .h file I changed the "sicl_gs..." solver functions in "sicl_gd..." and and all floats in double; - In Makefile I added at nvcc command the option "--gpu-architecture sm_13" and the compilation with "make" command is ok without any errors; - Then I recompiled the PCG_accel.C lib adding the "sicl_gdcsrcg" solver function in "#elif defined(WM_DP) // scalar is double" statment without success. I have error "sicl_gdcsrcg was not declared in this scope"; - But if I add the "sicl_gdcsrcg" solver function in "#if defined(WM_SP) // scalar is float" statment the compilation is up to date! My OpenFOAM is in double precision! However the "icoFoam" test gives me this result at pressure iteartion: ERROR : solver function returned -1 diagonalPCG_accel: Solving for p, Initial residual = 0, Final residual = 1e-06, No Iterations 1000 Am I forgetting anything else needs to be changed from float to double? Or am I wronging anything else? Thanks for any help Andrea
__________________
Andrea Pasquali |
|
February 9, 2011, 17:35 |
|
#12 |
Senior Member
Join Date: Mar 2009
Location: Austin, TX
Posts: 160
Rep Power: 18 |
Did anyone ever get this working? I got everything compiled and installed, but I am getting a seg fault immediately after "Time = 1". If I remove the "_accel" from the solvers then it runs fine, so everything is good FOAM wise.
I am using CUDA 3.2, OpenFOAM 1.6-ext, GCC 4.4.4 and RHEL 6. To get the plugin compiled I had to go in and make several private members of "lduMatrix::solver" public. It seems like this should be documented if it is actually required, so I am wondering if I am using an incompatible set of software versions, or if I am just doing something else wrong. |
|
February 9, 2011, 17:51 |
|
#13 |
Senior Member
Join Date: Mar 2009
Location: Austin, TX
Posts: 160
Rep Power: 18 |
Judging from this Japanese blog post, we are looking not looking at any benefit anyway. This guy saw a 3x slowdown when compared to unaccelerated GAMG. This is the only data I have seen that isn't from the developers themselves. He used extremely small cases, so that might be limiting the GPU solvers somehow. Also if Google translate is to be trusted, the GPU accelerated solutions are not even accurate.
http://www.geocities.co.jp/SiliconVa...T-Classic.html |
|
February 9, 2011, 18:45 |
|
#14 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings Kyle,
I've never used SpeedIT so I don't know why the code isn't working for you. But I have accompanied some of the posts about SpeedIT and I can at least advise about one detail: the SpeedIT Classic is for single precision only, so it can only be fairly comparable with the single precision build of OpenFOAM. And by my experience, GAMG doesn't always work for every case. So in either case, it really depends on the case you're trying to solve and if single precision is enough! It's like running the case decomposed in parallel with CPUs only: the usual measure for estimated performance is to have at least 50k cells per core. But this is only for some usual case scenarios that some people have. It all depends on the equations that need to be solved and how well it can be done in parallel. As for putting GPU into the fighting ring, it also depends on the balance between the number of calculations to be done per iteration vs the amount of data to be transferred between the CPU's (system) RAM and GPU's (graphics card) RAM. Either way, that same blogger has an interesting comparison with Inria's CNC: http://www.geocities.co.jp/SiliconVa...M/CNC/CNC.html Best regards, Bruno
__________________
|
|
February 9, 2011, 19:00 |
|
#15 |
Senior Member
Join Date: Mar 2009
Location: Austin, TX
Posts: 160
Rep Power: 18 |
wyldckat,
I am running single precision, which is fine for my use case. Thanks for the link, I did not know there was another OpenFOAM solver that ran on the GPU. It looks like it might be a little better than speedit. And as far as copying between system RAM and GPU RAM, this should only happen at the beginning and end of the run. If you are exchanging the entire solution over the PCI-e bus every iteration then any and all advantage the GPU might have had is gone. Unfortunately this means you need to be able to fit the entire mesh and solution into GPU RAM, which if you have a decent sized case requires a lot of video cards! |
|
February 14, 2011, 18:13 |
|
#16 |
New Member
Jakub Pola
Join Date: Feb 2011
Posts: 22
Rep Power: 15 |
Hi,
I'm from the Speedit team and I hope that I might help here I just finished the tests of Speedit Classic with OpenFoam 1.7.1. Everything works fine. I have Ubuntu 10.10 32 bit with Cuda 3.2 on GTX 460 and gcc 4.4.4.
|
|
July 27, 2011, 06:05 |
it is helpful
|
#17 |
New Member
Di.Lee
Join Date: Jun 2011
Posts: 1
Rep Power: 0 |
The plugin works. Thank Jacub very much.
|
|
November 25, 2011, 06:56 |
|
#18 | |
New Member
RDG
Join Date: Feb 2011
Posts: 29
Rep Power: 15 |
Quote:
Hi, Andrea, how did you manage to solve that issue? I'm having the same problem. Thanks. |
||
May 7, 2012, 06:00 |
|
#19 |
Member
|
We are about to release a new version of the OpenFOAM plugin where you could run SpeedIT Classic as well as SpeedIT 2.1/Multi-GPU in case of larger cases that do not fit into one GPU card. The new release should solve the problem.
|
|
August 9, 2012, 12:04 |
Some news ?
|
#20 |
New Member
Matthieu Borgraeve
Join Date: Aug 2012
Posts: 17
Rep Power: 14 |
Hello !
I have at least one question : I am trying to use SpeedIT classic with the plugin2.1 for some benchmarks, and i don't manage to use the accel_solvers : the compilation of the plug-in crashes, and tell me he is missing some vector_type.h file. I'm running on Kubuntu 12.04 64b fully up-to-date, installed cuda and OpenFoam managing an error concerning binutils and binutils-gold which give two version of l, each compile and run without problem) Has anybody try or manage to use a recent version of it ? Best regards, EDIT Actually i found : i have to make a Allwmake FREE instead of COMMERCIAL Last edited by mborgraeve; August 9, 2012 at 12:28. Reason: answered ! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFOAM Feasibility... | JasonG | OpenFOAM | 9 | June 4, 2010 18:28 |
OpenFoam & Sobolev spaces | Dan | Main CFD Forum | 4 | October 4, 2008 16:50 |