Skip to content

Commit

Permalink
Adding easybuild
Browse files Browse the repository at this point in the history
  • Loading branch information
ifilot committed Sep 7, 2023
1 parent 1dfeb18 commit 61d3bab
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
14 changes: 10 additions & 4 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,9 @@ The similarity analysis functionality of :program:`Bramble` can
benefit from the availability of a graphical card. To compile :program:`Bramble`
with CUDA support, run CMake with::

cmake ../src -DMOD_CUDA=1 -DCUDA_ARCH=<ARCH>
cmake ../src -DMOD_CUDA=1

wherein `<ARCH>` is replaced with the architecture of your graphical card. For
example, if you use an RTX 4090, you would use ``-DCUDA_ARCH=sm_89``. To
test that :program:`Bramble` can use your GPU, you can run the ``bramblecuda``
To test that :program:`Bramble` can use your GPU, you can run the ``bramblecuda``
tool whose sole function is to test for the availability of a GPU on the system::

./bramblecuda
Expand Down Expand Up @@ -127,3 +125,11 @@ Typical output should look as follows::
100% tests passed, 0 tests failed out of 9

Total Test time (real) = 1.73 sec

EasyBuild Installation
----------------------

For HPC infrastructure, there is also the option to install :program:`Bramble` using EasyBuild.
Make a copy of `bramble-1.1.0.eb` and run::

eb bramble-1.1.0.eb --minimal-toolchains --add-system-to-minimal-toolchains --robot
12 changes: 9 additions & 3 deletions src/test/test_similarity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
#include <boost/test/unit_test.hpp>

#include "similarity_analysis.h"
#ifdef MOD_CUDA
#include "card_manager.h"
#endif

// check that we can read .geo files
BOOST_AUTO_TEST_CASE(test_similarity) {
Expand Down Expand Up @@ -57,9 +60,12 @@ BOOST_AUTO_TEST_CASE(test_similarity) {
BOOST_TEST(ans2 == ans3, boost::test_tools::tolerance(1e-7));

#ifdef MOD_CUDA
float ans4 = sa.calculate_distance_metric_cuda(dm3, dm4, &permvec[0]);
BOOST_TEST(ans2 == ans4, boost::test_tools::tolerance(1e-7));
BOOST_TEST(ans3 == ans4, boost::test_tools::tolerance(1e-7));
CardManager cm;
if(cm.get_num_gpus() > 0) {
float ans4 = sa.calculate_distance_metric_cuda(dm3, dm4, &permvec[0]);
BOOST_TEST(ans2 == ans4, boost::test_tools::tolerance(1e-7));
BOOST_TEST(ans3 == ans4, boost::test_tools::tolerance(1e-7));
}
#endif // MOD_CUDA

//-------------------------------------------------------------------------
Expand Down

0 comments on commit 61d3bab

Please sign in to comment.