[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Espressomd-maintainer] [espresso] configure cuda autodetect (#70)
From: |
Georg Rempfer |
Subject: |
[Espressomd-maintainer] [espresso] configure cuda autodetect (#70) |
Date: |
Sat, 19 Jan 2013 12:59:52 -0800 |
Zweiter Anlauf. Ich hab den run check eingebaut. Damit das aber das Problem auch loest musste ich abhaengig von dessen Ergebnis die originale library list wiederherstellen. Das gab dann allerdings Probleme mit dem Code, da es einige stellen in der cuda_init.c gab die noch sauber geifdeft werden mussten.
Ich hab dann auch noch alles Plattformunabhaengig gemacht. Das einzig verdaechtige im Cuda Teil der configure.ac ist ein case statement. Allerdings sagen die autotool Seiten, dass es ok ist, so wie's da steht.
Am Ende hab ich seehr ausfuehrlich alle Kombinationen von configure-Einstellungen, Cuda-Toolkit, ld-Einstellungen und LB_GPU durchprobiert und jedesmal configure, make und Espresso getestet. Dabei habe ich herausgefunden, dass es eine Reihenfolge gibt in der man bei configure Cuda ausschalten kann und nachher trotzdem LB_GPU compilieren ohne, dass er merkt, dass Cuda fehlt. Das ging indem man an an der richtigen Stelle nicht make clean macht. Ein weiterer include in Dominiks code hat das aber behoben.
You can merge this Pull Request by running
git pull https://github.com/rempferg/espresso cuda_autodetect
Or view, comment on, or merge it at:
https://github.com/espressomd/espresso/pull/70
Commit Summary
- Added cuda run test to build system so that configure doesn't erroneously report cuda as working on systems that provide the tools to compile and link cuda code but do not provide the dynamically linked libraries to cuda binaries.
- Changed build system so that it leaves out the libraries cudart and cufft if the cuda checks failed. Properly fenced all the code depending on those libraries. Unfortunately the fences don't work because the precompiler constant CUDA gets set even when the checks fail.
- Configure script now only defines the symbol CUDA if all checks for cuda, including the run check, succeed. Since in that case, the cuda libraries are left out and all cuda code is fenced off, this should produce a working ESPResSo binary even on system where the cuda build tools are properly set up but the dynamic libraries are not properly referenced.
- Extensively tested build system with respect to different proper and broken cuda setups. Found and fixed two more bugs, one in the code fences and one in the cuda indicator for the makefile.
File Changes
- M configure.ac (56)
- M src/cuda_init.cu (9)
- M src/cuda_init.h (6)
- M src/lbgpu.cu (1)
- M src/tcl/cuda_init_tcl.c (8)
Patch Links:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Espressomd-maintainer] [espresso] configure cuda autodetect (#70),
Georg Rempfer <=