CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [foam-extend.org] extend-3.0 cuda installation (https://www.cfd-online.com/Forums/openfoam-installation/128834-extend-3-0-cuda-installation.html)

phandy October 21, 2015 12:25

Foam-extend 3.1 cuda build fails on archlinux
 
1 Attachment(s)
Update: I installed Cusp v 0.4.0, and it compiled just fine.

I'm also trying to install v3.1 with cuda on archlinux. I downloaded and extracted the rpm package from https://sourceforge.net/projects/ope...am-extend-3.1/, which already had most things built.
I've installed cuda from community/cuda arch repo, version 7.5.18, and cusp from the arch user repository, version 0.5.1-1.

in prefs.sh, my cuda options are:
Code:

export CUDA_SYSTEM=1
export CUDA_DIR=/opt/cuda
export CUDA_BIN_DIR=$CUDA_DIR/bin
export CUDA_LIB_DIR=$CUDA_DIR/lib64
export CUDA_INCLUDE_DIR=$CUDA_DIR/include
export CUDA_ARCH=sm_30

After sourcing $FOAM_INST_DIR/foam-extend-3.1/etc/bashrc, I change to the src/cudaSolvers directory and run:

Code:

$ ./Allwmake
Attached are two build logs for my attempts to get a working build. Due to the size of the logs, i gzipped them.

The first, allwmake.txt, comes from my noticing that the *.C files were being compiled with g++ instead of nvcc. Noting this, I decided to move *.C files in cudaSolvers/* to *.cu, and changing any references to their filenames (such as Make/files). The output of that attempt is in allwmakeAttempt1.log. It failed.

Not knowing what modifications @Aleksey_R mentioned in his point,
Quote:

1. I've downloaded cusplibrary and modified options file as it was mentioned before in this thread.
I went ahead and changed "#include <cusp/blas.h>" to "#include <cusp/blas/blas.h>" in all files, and changed CUDA_LIB_DIR=$CUDA_DIR/lib to CUDA_LIB_DIR=$CUDA_DIR/lib64. I moved the *.cu files previously changed to their original *.C locations and adjusted Make/files to note that.
Unsurprisingly, this build also failed, as it is attempting to use g++ to build cudaSolver.C - a laundry list of errors in all cusp related libraries.

I really wish I could figure out how to get this to compile.

jipai October 22, 2015 03:20

For information, at the first compilation of foam-ext, I had set compilation options in the c++Opt and cOpt files according to this site :

https://sites.google.com/site/jordim...am-compilation

So I removed the option -march=native in the c++Opt and cOpt files and cudaSolvers compiled successfully.

Hope this message could help
jipai

phandy October 22, 2015 09:14

jipai,

I'm glad it worked out for you. What version of cusp and cuda are you using?

jipai October 24, 2015 03:12

Hi,

Here are the versions for cusp and cuda :
- cusp 0.4.0
- CUDA Driver Version = 7.5, CUDA Runtime Version = 7.5

Mexes August 17, 2018 08:58

Hi Everybody,



I want to install foam-extend-4.x on my Lenovo T500 but I'm not sure what number I have to put in for the "30" in:

"export CUDA_ARCH=sm_30"


Results for running different commands are:



lspci -vnn | grep VGA -A 12
00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller [8086:2a42] (rev 07) (prog-if 00 [VGA controller])
Subsystem: Lenovo Mobile 4 Series Chipset Integrated Graphics Controller [17aa:20e4]
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at f4400000 (64-bit, non-prefetchable) [size=4M]
Memory at d0000000 (64-bit, prefetchable) [size=256M]
I/O ports at 1800 [size=8]
[virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
Capabilities: <access denied>
Kernel driver in use: i915
Kernel modules: i915

00:02.1 Display controller [0380]: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller [8086:2a43] (rev 07)
Subsystem: Lenovo Mobile 4 Series Chipset Integrated Graphics Controller [17aa:20e4]





lshw -numeric -C display
*-display:0
Beschreibung: VGA compatible controller
Produkt: Mobile 4 Series Chipset Integrated Graphics Controller [8086:2A42]
Hersteller: Intel Corporation [8086]
Physische ID: 2
Bus-Informationen: pci@0000:00:02.0
Version: 07
Breite: 64 bits
Takt: 33MHz
Fähigkeiten: vga_controller bus_master cap_list rom
Konfiguration: driver=i915 latency=0
Ressourcen: irq:16 memory:f4400000-f47fffff memory:d0000000-dfffffff ioport:1800(Größe=8) memory:c0000-dffff
*-display:1 UNGEFORDERT
Beschreibung: Display controller
Produkt: Mobile 4 Series Chipset Integrated Graphics Controller [8086:2A43]
Hersteller: Intel Corporation [8086]
Physische ID: 2.1
Bus-Informationen: pci@0000:00:02.1
Version: 07
Breite: 64 bits
Takt: 33MHz
Fähigkeiten: bus_master cap_list
Konfiguration: latency=0
Ressourcen: memory:f4200000-f42fffff

glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Mobile Intel® GM45 Express Chipset x86/MMX/SSE2
OpenGL version string: 2.1 Mesa 18.0.5
OpenGL shading language version string: 1.20
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 18.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
OpenGL ES profile extensions:








Thanks for your help!

wyldckat August 17, 2018 13:56

Quick answer @Mexes: Your machine does not seem to have an Nvidia graphics card, therefore you should not define anything for that installation step.

Mexes August 19, 2018 16:48

Quote:

Originally Posted by wyldckat (Post 703018)
Quick answer @Mexes: Your machine does not seem to have an Nvidia graphics card, therefore you should not define anything for that installation step.


Hi Bruno,


thanks for your reply and your help!


All times are GMT -4. The time now is 19:11.