CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[foam-extend.org] foam-extend. cudaSolvers compilation

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 7, 2015, 03:42
Default foam-extend. cudaSolvers compilation
  #1
Senior Member
 
Join Date: Jan 2015
Posts: 150
Rep Power: 7
Svensen is on a distinguished road
I'm trying to compile cudaSolvers but I've got errors like the following. Does anyone successfully compiled these solvers on their computers ??

/usr/local/cuda-6.5/include/cusp/system/cuda/detail/multiply/coo_serial.cu: In function ‘void cusp::system::cuda::spmv_coo_serial_device(const Matrix&, const Array1&, Array2&)’:
/usr/local/cuda-6.5/include/cusp/system/cuda/detail/multiply/coo_serial.cu:66:51: error: expected primary-expression before ‘<’ token
spmv_coo_serial_kernel<IndexType,ValueType> <<<1,1>>>
^
/usr/local/cuda-6.5/include/cusp/system/cuda/detail/multiply/coo_serial.cu:66:57: error: expected primary-expression before ‘>’ token
spmv_coo_serial_kernel<IndexType,ValueType> <<<1,1>>>
^
In file included from /usr/local/cuda-6.5/include/cusp/system/cuda/detail/multiply.h:21:0,
from /usr/local/cuda-6.5/include/cusp/system/cuda/execution_policy.h:50,
from /usr/local/cuda-6.5/include/cusp/execution_policy.h:34,
from /usr/local/cuda-6.5/include/cusp/convert.h:25,
from /usr/local/cuda-6.5/include/cusp/detail/coo_matrix.inl:18,
from /usr/local/cuda-6.5/include/cusp/coo_matrix.h:597,
from cudaSolver/cudaTypes.H:53,
from cudaSolver/cudaSolver.H:42,
from cudaSolver/cudaSolver.C:26:
/usr/local/cuda-6.5/include/cusp/system/cuda/detail/multiply/coo_flat_spmv.h: In function ‘ValueType cusp::system::cuda::segreduce_warp(IndexType, IndexType, ValueType, IndexType*, ValueType*)’:
/usr/local/cuda-6.5/include/cusp/system/cuda/detail/multiply/coo_flat_spmv.h:40:10: error: ‘threadIdx’ was not declared in this scope
rows[threadIdx.x] = row;
Svensen is offline   Reply With Quote

Old   April 7, 2015, 07:46
Default
  #2
Senior Member
 
Elvis
Join Date: Mar 2009
Location: Sindelfingen, Germany
Posts: 611
Blog Entries: 5
Rep Power: 20
elvis will become famous soon enough
My guess is that Dominik Christ did that, he works for http://wikki.co.uk
http://www.cfd-online.com/Forums/mem...ik_christ.html
elvis is offline   Reply With Quote

Old   September 6, 2015, 07:05
Default cudaSolvers compilation => toward a solution
  #3
New Member
 
Thierry Rochemont
Join Date: Sep 2011
Location: lyon, france
Posts: 1
Rep Power: 0
ThierryRochemont is on a distinguished road
Hi,
I was struggling also with cudaSolver compilation. I found out that by reverting to cusp library v0.4.0 might do the trick.

git clone --branch v0.4.0 https://github.com/cusplibrary/cusplibrary.git cusplibray
cd cusplibrary
git checkout -b v0.4.0
copy cusp directory to your cuda install path

I had also to change cuda_lib_dir to lib64 in customized etc/prefs.sh
export cuda_lib_dir=$cuda_dir/lib64

go to $FOAM_SRC/cudaSolvers
./Allwmake



Regards,

OS system:
ubuntu 14.04
grapic video = Geforce 970, with cuda_6.5.19_linux64.run
openfoam: foam-extend-3.2 (nextRelease branch)
gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
ThierryRochemont is offline   Reply With Quote

Old   September 24, 2015, 11:20
Default
  #4
New Member
 
Join Date: Mar 2015
Posts: 3
Rep Power: 7
zhihongliu is on a distinguished road
Hi,ThierryRochemont
have you solved this problem?
I followed your step by add the "export cuda_lib_dir=$cuda_dir/lib64" to the path foam/foam/foam-extend-3.1/etc
and I used the cusp v0.5.1, cuda7.0
but I still get the same problem.
I hope I can get your help which will save me from the debug nightmare.
zhihongliu is offline   Reply With Quote

Old   September 25, 2015, 02:23
Default
  #5
Senior Member
 
Join Date: Jan 2015
Posts: 150
Rep Power: 7
Svensen is on a distinguished road
You need to switch to cusp library v0.4.0
Svensen is offline   Reply With Quote

Old   September 26, 2015, 11:18
Default
  #6
New Member
 
Join Date: Mar 2015
Posts: 3
Rep Power: 7
zhihongliu is on a distinguished road
Thank you, Svensen
I have compiled it correctly by using the cusp library v0.4.0
But I am still confused why cusp v0.5.0 show the error: expected primary-expression before ‘<’ token.
zhihongliu is offline   Reply With Quote

Old   October 21, 2015, 14:54
Default
  #7
New Member
 
Paul Handy
Join Date: Sep 2014
Location: Idaho, USA
Posts: 21
Rep Power: 7
phandy is on a distinguished road
This is what got mine to compile.
phandy is offline   Reply With Quote

Reply

Tags
cuda, foam-extend-3.1

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
error with reactingFoam BakedAlmonds OpenFOAM Running, Solving & CFD 4 June 22, 2016 02:21
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 09:56
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 14:11
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 14:00
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 08:19


All times are GMT -4. The time now is 18:46.