Hej Richard
I made sure that the files exist and I sourced everything again. Code:
roman@pc070245:~/OpenFOAM/OpenFOAM-2.0.x$ export FOAM_INST_DIR="/home/roman/OpenFOAM"; source $FOAM_INST_DIR/OpenFOAM-2.0.x/etc/bashrc WM_GPU='CUDA' CUDA_ARCH_PATH=/home/roman/OpenFOAM/ofgpu-0-2 WM_MPLIB=NONE Code:
roman@pc070245:~/OpenFOAM/OpenFOAM-2.0.x$ ./Allwmake Code:
+ wmake all utilities |
To solve "fatal error: ofgpu/ofgpuconfig.h: No such file or directory"
Hi romant,
ofgpu-0.2 does not create ./src directory. you should make it your self. To solve "fatal error: ofgpu/ofgpuconfig.h: No such file or directory" copy "ofgpu-0-2/ofgpu" directory to "ofgpu-0-2/src/": mkdir ofgpu-0-2/src -p cp -r ofgpu-0-2/ofgpu ofgpu-0-2/src/ Ahmad |
thank you, but this still leaves some errors to work on. like all the linking errors that I mentioned with the normal openfoam :( and now it at least tries to compile part of the of-gpu, but still runs into problem, namely, when building PBiCGgpu.C
Code:
SOURCE=PBiCGgpu.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/roman/OpenFOAM/ofgpu-0-2/src -IlnInclude -I. -I/home/roman/OpenFOAM/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude -I/home/roman/OpenFOAM/OpenFOAM-2.0.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/PBiCGgpu.o |
$WM_PRECISION or a similar environment variable
Hi Roman,
I had the same problem. You should export $WM_PRECISION or a similar environment variable in <open-foam-root>/etc/bashrc It should have "SP" value since ofgpu supports only single-precision floating point. For you, its value is "DP" probably. Recompiling all modules is needed :) |
Missing src directory
Quote:
I've also added a note about single precision in the instructions: http://www.symscape.com/gpu-0-2-openfoam |
Unknown function type cudaGpu
I finished compiling and obtained libgpu.so in
platforms/linux64GccSPOpt/lib/cuda/ but when I tried pitzDailyGpu, I've got the following error Starting time loop -------------------------- --> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1141 dlopen error : gpu: cannot open shared object file: No such file or directory --> FOAM Warning : From function dlLibraryTable::open(const fileName&, const bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 96 could not load "gpu" --> FOAM Warning : From function dlLibraryTable::open(const dictionary&, const word&, const TablePtr&) in file lnInclude/dlLibraryTableTemplates.C at line 67 Could not open library "gpu" --> FOAM FATAL ERROR: Unknown function type cudaGpu ------------------------------------------- am I missing something here ? |
Check libofgpu.so
Check that libofgpu.so is also in your LD_LIBRARY_PATH
|
Greetings to all!
Quote:
Quote:
Best regards, Bruno |
gpu in controlDict is correct
Quote:
For reference libgpu.so is the bridge library between OpenFOAM and libofgpu.so. libofgpu.so is independent of OpenFOAM and only references CUDA libraries. Quote:
Bruno, partly this confusion is likely because I named the libs so similar and it's easy to miss refer to the wrong one. |
Try replacing "gpu" with "libgpu.so"
Another thought, try replacing "gpu" in controlDict with "libgpu.so" - though this shouldn't be necessary. I suggest this because the dlopen error message shouldn't be reported in it's raw form, at least not in OpenFOAM 2.0.x, yet that is what you are seeing.
Just to be clear which version of OpenFOAM and ofgpu are you using? |
Quote:
Thanks you very much for your help. It is working now. This part in my controlDict looks like this functions { cudaGpu { type cudaGpu; functionObjectLibs ("libgpu.so"); cudaDevice 0; } } What do you think why the normal setting does not work ? BTW. My OpenFoam is the one I clone from the repository yesterday (have no idea how to check the version via git) I will redo another make with your designated version of OpenFoam. |
Match git commit
Quote:
For the patch to work correctly you need to match the exact version of OpenFOAM from git. git commit: 2a7a68737dba87d82500df67029a15aeda662c42, Date: Sept. 14 11:28:07 2011. Use:
|
error with nviroment variable for OpenFOAM-2.1.x
As I download OpenFOAam-2.1.x from https://github.com/OpenFOAM/OpenFOAM-2.1.x and apply the patch.
I run the foamSystemCheck to check if I can compile OpenFOAM then I run foamInstallationTest to check if I source my ~/.bashrc correctly and I got the errors shown below. No error during applying patch. Plz help !! ERROR MESSAGE IN TERMINAL: Code:
Executing ./foamInstallationTest: |
Need Help debugging this message
I'm trying to compile cuda with wmake within ~/OpenFOAM/OpenFOAM-2.1.0/src/gpu/cuda/ and have the errors shown below. What does it mean ?
Code:
g++ -m32 -Dlinux -DWM_SP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/home/hai-nguyen/ofgpu-0-2/src -IlnInclude -I. -I/home/hai-nguyen/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude -I/home/hai-nguyen/OpenFOAM/OpenFOAM-2.1.0/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linuxGccDPOpt/cudaGpu.o Make/linuxGccDPOpt/PBiCGgpu.o Make/linuxGccDPOpt/PCGgpu.o -L/home/hai-nguyen/OpenFOAM/OpenFOAM-2.1.0/platforms/linuxGccDPOpt/lib \ |
Probably that you should have used 'wmake libso' to build a library instead of an executable.
|
***EDIT***
I wasn't configuring cmake correctly. I followed directions in the comments of the symscape website and now have everything working. ************ Applying $ cmake -DCMAKE_INSTALL_PREFIX=/opt/ofgpu-0-2/install gives me the following errors Code:
CUDA_TOOLKIT_ROOT_DIR not found or specified I can apply the OF patch with no errors. I'm on 64bit Ubuntu 10.04. For reference my $HOME/.bashrc file contains Code:
export CUDA_HOME="/opt/cuda" |
pitzDailyGpu example is not working
Hello,
I am trying to use ofgpu-1-1-0 library to accelerate the performance of linear solver in OpenFoam 2.2.x. I have followed the steps given on http://www.symscape.com/gpu-1-1-openfoam link. Try to execute the given example pitzDailyGpu. But, the error is like... ------------------------------------------------------------------------------------------------------------------------------- --> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1179 dlopen error : libgpu.so: cannot open shared object file: No such file or directory --> FOAM Warning : From function dlLibraryTable::open(const fileName&, const bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99 could not load "libgpu.so" --> FOAM Warning : From function dlLibraryTable::open(const dictionary&, const word&, const TablePtr&) in file lnInclude/dlLibraryTableTemplates.C at line 67 Could not open library "libgpu.so" --> FOAM FATAL ERROR: Unknown function type cudaGpu Valid functions are : 4 ( patchProbes probes sets surfaces ) From function functionObject::New(const word& name, const Time&, const dictionary&) in file db/functionObjects/functionObject/functionObject.C at line 92. FOAM exiting ------------------------------------------------------------------------------------------------------------------------------- As told in the earlier post that change the functionObjectLibs ("gpu"); to functionObjectLibs ("libgpu.so"); still, the same error is occurring. How can I resolve this error? |
Hello,
I'm having trouble compiling ofgpu. I didn't really understand how to make this compilation. Can you help me? Best Regards, Diego |
All times are GMT -4. The time now is 00:30. |