CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM News & Announcements > OpenFOAM Announcements from Other Sources

GPU Linear Solvers for OpenFOAM

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree5Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 23, 2011, 06:14
Default
  #21
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 21
romant is on a distinguished road
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
I then start the code, but I am still getting errors. The path should be right. Compiling of of-gpu went find and I didn't get any errors. I soft linked the install/release/lib to install/lib.

Code:
roman@pc070245:~/OpenFOAM/OpenFOAM-2.0.x$ ./Allwmake 
make: Nothing to be done for `all'.
no ThirdParty sources found - skipping
+ set -e
+ wmakePrintBuild -check
same version as previous build
+ wmakeLnInclude OpenFOAM
+ wmakeLnInclude OSspecific/POSIX
+ OSspecific/POSIX/Allwmake
'/home/roman/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libOSspecific.o' is up to date.
+ Pstream/Allwmake
+ wmake libso dummy
'/home/roman/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/dummy/libPstream.so' is up to date.
+ wmake libso OpenFOAM
'/home/roman/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so' is up to date.
+ [ TRUE =  ]
+ gpu/Allwmake
+ wmake libso gpuless
'/home/roman/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/gpuless/libgpu.so' is up to date.
+ wmake libso cuda
SOURCE=cudaGpu.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/cudaGpu.o
cudaGpu.C:23:31: fatal error: ofgpu/ofgpuconfig.h: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/cudaGpu.o] Error 1
I marked something in read. I know that the path does not exist. I checked that the green-marked file and path exist. and they do. Further down the compilation it is missing many more files and always results in the same errors. like
Code:
+ wmake all utilities
make[1]: Entering directory `/home/roman/OpenFOAM/OpenFOAM-2.0.x/applications/utilities/mesh'
make[2]: Entering directory `/home/roman/OpenFOAM/OpenFOAM-2.0.x/applications/utilities/mesh/advanced'
make[3]: Entering directory `/home/roman/OpenFOAM/OpenFOAM-2.0.x/applications/utilities/mesh/advanced/PDRMesh'
SOURCE=PDRMesh.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/OpenFOAM-2.0.x/src/meshTools/lnInclude -I/home/roman/OpenFOAM/OpenFOAM-2.0.x/src/dynamicMesh/lnInclude -I/home/roman/OpenFOAM/OpenFOAM-2.0.x/src/finiteVolume/lnInclude -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/PDRMesh.o
PDRMesh.C:45:26: fatal error: fvMeshSubset.H: No such file or directory
compilation terminated.
make[3]: *** [Make/linux64GccDPOpt/PDRMesh.o] Error 1
make[3]: Target `/home/roman/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/bin/PDRMesh' not remade because of errors.
make[3]: Leaving directory `/home/roman/OpenFOAM/OpenFOAM-2.0.x/applications/utilities/mesh/advanced/PDRMesh'
make[2]: *** [PDRMesh] Error 2
make[3]: Entering directory `/home/roman/OpenFOAM/OpenFOAM-2.0.x/applications/utilities/mesh/advanced/autoRefineMesh'
SOURCE=autoRefineMesh.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/OpenFOAM-2.0.x/src/dynamicMesh/lnInclude -I/home/roman/OpenFOAM/OpenFOAM-2.0.x/src/meshTools/lnInclude -I/home/roman/OpenFOAM/OpenFOAM-2.0.x/src/triSurface/lnInclude -I/home/roman/OpenFOAM/OpenFOAM-2.0.x/src/lagrangian/basic/lnInclude -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/autoRefineMesh.o
autoRefineMesh.C:32:32: fatal error: twoDPointCorrector.H: No such file or directory
compilation terminated.
in this one all the green lnInclude directories are missing.
__________________
~roman
romant is offline   Reply With Quote

Old   October 23, 2011, 06:21
Default To solve "fatal error: ofgpu/ofgpuconfig.h: No such file or directory"
  #22
New Member
 
Ahmad Lashgar
Join Date: Aug 2010
Posts: 10
Rep Power: 16
ahmadlashgar is on a distinguished road
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
ahmadlashgar is offline   Reply With Quote

Old   October 23, 2011, 06:28
Default
  #23
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 21
romant is on a distinguished road
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
PBiCGgpu.C: In member function ‘virtual Foam::lduMatrix::solverPerformance Foam::PBiCGgpu::solve(Foam::scalarField&, const scalarField&, Foam::direction) const’:
PBiCGgpu.C:88:72: error: no matching function for call to ‘ofgpu::SparseMatrixArgs::SparseMatrixArgs(const char*, Foam::label, Foam::label, Foam::UList<int>::const_iterator, Foam::UList<int>::const_iterator, Foam::UList<int>::const_iterator, Foam::UList<double>::const_iterator, Foam::UList<double>::const_iterator, Foam::UList<int>::const_iterator, Foam::UList<int>::const_iterator, Foam::UList<double>::const_iterator, Foam::UList<double>::iterator, Foam::UList<double>::const_iterator, const label&, const scalar&, const scalar&, Foam::scalar&, Foam::scalar&, Foam::label&, bool&)’
PBiCGgpu.C:88:72: note: candidates are:
/home/roman/OpenFOAM/ofgpu-0-2/src/ofgpu/sparsematrixargs.h:46:5: note: ofgpu::SparseMatrixArgs::SparseMatrixArgs(const char*, ofgpu::index, ofgpu::index, const index*, const index*, const index*, const real*, const real*, const index*, const index*, const real*, ofgpu::real*, const real*, ofgpu::index, ofgpu::real, ofgpu::real, ofgpu::real&, ofgpu::real&, ofgpu::index&, bool&)
/home/roman/OpenFOAM/ofgpu-0-2/src/ofgpu/sparsematrixargs.h:46:5: note:   no known conversion for argument 7 from ‘Foam::UList<double>::const_iterator {aka const double*}’ to ‘const real* {aka const float*}’
/home/roman/OpenFOAM/ofgpu-0-2/src/ofgpu/sparsematrixargs.h:24:10: note: ofgpu::SparseMatrixArgs::SparseMatrixArgs(const ofgpu::SparseMatrixArgs&)
/home/roman/OpenFOAM/ofgpu-0-2/src/ofgpu/sparsematrixargs.h:24:10: note:   candidate expects 1 argument, 20 provided
make: *** [Make/linux64GccDPOpt/PBiCGgpu.o] Error 1
and of course the missing lnInclude directories.
__________________
~roman
romant is offline   Reply With Quote

Old   October 23, 2011, 06:54
Default $WM_PRECISION or a similar environment variable
  #24
New Member
 
Ahmad Lashgar
Join Date: Aug 2010
Posts: 10
Rep Power: 16
ahmadlashgar is on a distinguished road
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
ahmadlashgar is offline   Reply With Quote

Old   October 24, 2011, 11:55
Default Missing src directory
  #25
Senior Member
 
gocarts's Avatar
 
Richard Smith
Join Date: Mar 2009
Location: Enfield, NH, USA
Posts: 138
Blog Entries: 4
Rep Power: 17
gocarts is on a distinguished road
Quote:
Originally Posted by ahmadlashgar View Post
ofgpu-0.2 does not create ./src directory
I see the problem - I missed the src directory in my package hierarchy (ofgpu-0-2.tgz). I've fixed it now, should be good to go. Thanks for finding/reporting this problem.

I've also added a note about single precision in the instructions: http://www.symscape.com/gpu-0-2-openfoam
__________________
Symscape, Computational Fluid Dynamics for all

Last edited by gocarts; October 24, 2011 at 12:01. Reason: More info
gocarts is offline   Reply With Quote

Old   November 22, 2011, 14:01
Default Unknown function type cudaGpu
  #26
New Member
 
Arpiruk Hokpunna
Join Date: Mar 2011
Posts: 10
Rep Power: 15
arphy is on a distinguished road
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:pen(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 96
could not load "gpu"
--> FOAM Warning :
From function dlLibraryTable:pen(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 ?
arphy is offline   Reply With Quote

Old   November 22, 2011, 14:07
Default Check libofgpu.so
  #27
Senior Member
 
gocarts's Avatar
 
Richard Smith
Join Date: Mar 2009
Location: Enfield, NH, USA
Posts: 138
Blog Entries: 4
Rep Power: 17
gocarts is on a distinguished road
Check that libofgpu.so is also in your LD_LIBRARY_PATH
__________________
Symscape, Computational Fluid Dynamics for all
gocarts is offline   Reply With Quote

Old   November 22, 2011, 16:23
Default
  #28
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!
Quote:
Originally Posted by arphy View Post
--> FOAM Warning :
From function dlLibraryTable:pen(const dictionary&, const word&, const TablePtr&)
in file lnInclude/dlLibraryTableTemplates.C at line 67
Could not open library "gpu"
That name in bold is unrolled to "libgpu.so".

Quote:
Originally Posted by gocarts View Post
Check that libofgpu.so is also in your LD_LIBRARY_PATH
@arphy: Along with Richard's suggestion, I'm also guessing that there is a typo somewhere in you case's "controlDict" file? "gpu" instead of "ofgpu".

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   November 22, 2011, 17:09
Default gpu in controlDict is correct
  #29
Senior Member
 
gocarts's Avatar
 
Richard Smith
Join Date: Mar 2009
Location: Enfield, NH, USA
Posts: 138
Blog Entries: 4
Rep Power: 17
gocarts is on a distinguished road
Quote:
Originally Posted by arphy
I finished compiling and obtained libgpu.so in
platforms/linux64GccSPOpt/lib/cuda/
It's correct to load libgpu.so ("gpu" in your controlDict) and I was thinking that given libgpu.so is in the right location, it is more likely that libofgpu.so (which libgpu.so references) was not being found and therefore loading libgpu.so would fail.

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:
Originally Posted by wyldckat
...typo somewhere in your case's "controlDict" file? "gpu" instead of "ofgpu".
No, as discussed above controlDict should refer to gpu not ofgpu.

Bruno, partly this confusion is likely because I named the libs so similar and it's easy to miss refer to the wrong one.
wyldckat likes this.
__________________
Symscape, Computational Fluid Dynamics for all
gocarts is offline   Reply With Quote

Old   November 22, 2011, 17:39
Default Try replacing "gpu" with "libgpu.so"
  #30
Senior Member
 
gocarts's Avatar
 
Richard Smith
Join Date: Mar 2009
Location: Enfield, NH, USA
Posts: 138
Blog Entries: 4
Rep Power: 17
gocarts is on a distinguished road
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?
alquimista and arphy like this.
__________________
Symscape, Computational Fluid Dynamics for all
gocarts is offline   Reply With Quote

Old   November 23, 2011, 00:46
Default
  #31
New Member
 
Arpiruk Hokpunna
Join Date: Mar 2011
Posts: 10
Rep Power: 15
arphy is on a distinguished road
Quote:
Originally Posted by gocarts View Post
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?

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.

Last edited by arphy; November 23, 2011 at 02:29.
arphy is offline   Reply With Quote

Old   November 23, 2011, 09:46
Default Match git commit
  #32
Senior Member
 
gocarts's Avatar
 
Richard Smith
Join Date: Mar 2009
Location: Enfield, NH, USA
Posts: 138
Blog Entries: 4
Rep Power: 17
gocarts is on a distinguished road
Quote:
Originally Posted by arphy View Post
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.
I think the version you checked out of git has a modified Foam::dlopen routine.

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:
  1. git clone http://github.com/OpenFOAM/OpenFOAM-2.0.x
  2. cd OpenFOAM-2.0.x
  3. git checkout 2a7a68737dba87d82500df67029a15aeda662c42
  4. apply patch
__________________
Symscape, Computational Fluid Dynamics for all
gocarts is offline   Reply With Quote

Old   February 12, 2012, 16:29
Default error with nviroment variable for OpenFOAM-2.1.x
  #33
New Member
 
Join Date: Jan 2012
Posts: 4
Rep Power: 14
sontac is on a distinguished road
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:


Checking basic setup...
-------------------------------------------------------------------------------

FATAL ERROR: OpenFOAM environment not configured.

    Please refer to the installation section of the README file:
    <OpenFOAM installation dir>/OpenFOAM-2.1.x/README
    to source the OpenFOAM environment.
sontac is offline   Reply With Quote

Old   February 14, 2012, 13:20
Default Need Help debugging this message
  #34
New Member
 
Join Date: Jan 2012
Posts: 4
Rep Power: 14
sontac is on a distinguished road
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 \
          -lOpenFOAM -ldl   -lm -o OpenFOAM.out
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
Make/linuxGccDPOpt/cudaGpu.o: In function `Foam::cudaGpu::cudaGpu(Foam::word const&, Foam::Time const&, Foam::dictionary const&)':
cudaGpu.C:(.text+0x64c): undefined reference to `ofgpuConfig'
Make/linuxGccDPOpt/cudaGpu.o: In function `Foam::cudaGpu::cudaGpu(Foam::word const&, Foam::Time const&, Foam::dictionary const&)':
cudaGpu.C:(.text+0x8fc): undefined reference to `ofgpuConfig'
Make/linuxGccDPOpt/PBiCGgpu.o: In function `Foam::PBiCGgpu::PBiCGgpu(Foam::word const&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, float> const&, Foam::FieldField<Foam::Field, float> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::dictionary const&)':
PBiCGgpu.C:(.text+0x48): undefined reference to `Foam::PBiCG::PBiCG(Foam::word const&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, float> const&, Foam::FieldField<Foam::Field, float> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::dictionary const&)'
Make/linuxGccDPOpt/PBiCGgpu.o: In function `Foam::PBiCGgpu::PBiCGgpu(Foam::word const&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, float> const&, Foam::FieldField<Foam::Field, float> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::dictionary const&)':
PBiCGgpu.C:(.text+0xb8): undefined reference to `Foam::PBiCG::PBiCG(Foam::word const&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, float> const&, Foam::FieldField<Foam::Field, float> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::dictionary const&)'
Make/linuxGccDPOpt/PBiCGgpu.o: In function `Foam::PBiCGgpu::solve(Foam::Field<float>&, Foam::Field<float> const&, unsigned char) const':
PBiCGgpu.C:(.text+0x7dd): undefined reference to `ofgpuPBiCGsolve'
Make/linuxGccDPOpt/PCGgpu.o: In function `Foam::PCGgpu::PCGgpu(Foam::word const&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, float> const&, Foam::FieldField<Foam::Field, float> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::dictionary const&)':
PCGgpu.C:(.text+0x48): undefined reference to `Foam::PCG::PCG(Foam::word const&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, float> const&, Foam::FieldField<Foam::Field, float> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::dictionary const&)'
Make/linuxGccDPOpt/PCGgpu.o: In function `Foam::PCGgpu::PCGgpu(Foam::word const&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, float> const&, Foam::FieldField<Foam::Field, float> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::dictionary const&)':
PCGgpu.C:(.text+0xb8): undefined reference to `Foam::PCG::PCG(Foam::word const&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, float> const&, Foam::FieldField<Foam::Field, float> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::dictionary const&)'
Make/linuxGccDPOpt/PCGgpu.o: In function `Foam::PCGgpu::solve(Foam::Field<float>&, Foam::Field<float> const&, unsigned char) const':
PCGgpu.C:(.text+0x7dd): undefined reference to `ofgpuPCGsolve'
collect2: ld returned 1 exit status
make: *** [OpenFOAM.out] Error 1
sontac is offline   Reply With Quote

Old   February 15, 2012, 04:00
Default
  #35
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
Probably that you should have used 'wmake libso' to build a library instead of an executable.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   March 1, 2012, 21:41
Default
  #36
New Member
 
Join Date: Feb 2012
Posts: 6
Rep Power: 14
twray is on a distinguished road
***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
-- Could NOT find CUDA  (missing:  CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_CUDART_LIBRARY (ADVANCED)
    linked by target "ofgpu" in directory /opt/ofgpu-0-2/src/ofgpu
CUDA_TOOLKIT_INCLUDE (ADVANCED)
   used as include directory in directory /opt/ofgpu-0-2/src/ofgpu

-- Configuring incomplete, errors occurred!
How do I resolve these errors? Should I be using -DCMAKE_INSTALL_PREFIX=/opt/ofgpu-0-2/src/ofgpu/install?

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"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${CUDA_HOME}/lib64"
export PATH=${CUDA_HOME}/bin:${PATH}

Last edited by twray; March 6, 2012 at 16:31. Reason: resolved issue
twray is offline   Reply With Quote

Old   March 29, 2017, 09:05
Default pitzDailyGpu example is not working
  #37
New Member
 
Savita Mane
Join Date: Mar 2017
Posts: 4
Rep Power: 9
savee is on a distinguished road
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:pen(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
could not load "libgpu.so"
--> FOAM Warning :
From function dlLibraryTable:pen(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?

Last edited by savee; April 5, 2017 at 04:12.
savee is offline   Reply With Quote

Old   August 17, 2022, 15:22
Default
  #38
New Member
 
Diego Alex Mayer
Join Date: Aug 2022
Posts: 1
Rep Power: 0
Diego Alex Mayer is on a distinguished road
Hello,
I'm having trouble compiling ofgpu. I didn't really understand how to make this compilation. Can you help me?
Best Regards,
Diego
Diego Alex Mayer is offline   Reply With Quote

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Direct vs Iterative Linear Solvers for non-linears bill Main CFD Forum 16 November 5, 2014 08:18
solution diverges when linear upwind interpolation scheme is used subash OpenFOAM 0 May 29, 2010 02:23
New linear system solvers chegdan OpenFOAM Running, Solving & CFD 11 April 30, 2010 11:22
Water pump OpenFOAM 15 ANSYS CFX 110 comparation waynezw0618 OpenFOAM Running, Solving & CFD 39 March 5, 2009 13:57
Linear Solvers Sachin Main CFD Forum 0 May 6, 2006 13:07


All times are GMT -4. The time now is 00:57.