Commit dcf398d0 authored by incardon's avatar incardon

Documentation + fix in installation process for SE_CLASS3

parent 5b360467
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
AC_PREREQ(2.59) AC_PREREQ(2.59)
AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS) AC_INIT(OpenFPM_vcluster, 0.8.0, BUG-REPORT-ADDRESS)
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
AC_CONFIG_SRCDIR([src/main.cpp]) AC_CONFIG_SRCDIR([src/main.cpp])
...@@ -102,6 +102,63 @@ else ...@@ -102,6 +102,63 @@ else
NVCCFLAGS+="$NVCCFLAGS -O3 " NVCCFLAGS+="$NVCCFLAGS -O3 "
fi fi
###### Check for se-class1
AC_MSG_CHECKING(whether to build with security enhancement class1)
se_class1=no
AC_ARG_ENABLE(se-class1,
AC_HELP_STRING(
[--enable-se-class1],
[enable security enhancement class1]
),
se_class1="$enableval"
)
AC_MSG_RESULT($se_class1)
if test x"$se_class1" = x"yes"; then
AC_DEFINE([SE_CLASS1],[],[Security enhancement class 1])
fi
###### Check for se-class 2
AC_MSG_CHECKING(whether to build with security enhancement class 2)
se_class2=no
AC_ARG_ENABLE(se-class2,
AC_HELP_STRING(
[--enable-se-class2],
[enable security enhancement class 2]
),
se_class2="$enableval"
)
AC_MSG_RESULT($se_class2)
if test x"$se_class2" = x"yes"; then
AC_DEFINE([SE_CLASS2],[],[Security enhancement class 2])
fi
###### Check for se-class 3
AC_MSG_CHECKING(whether to build with security enhancement class 3)
se_class3=no
AC_ARG_ENABLE(se-class3,
AC_HELP_STRING(
[--enable-se-class3],
[enable security enhancement class 3]
),
se_class3="$enableval"
)
AC_MSG_RESULT($se_class3)
if test x"$se_class3" = x"yes"; then
AC_DEFINE([SE_CLASS3],[],[Security enhancement class 3])
fi
####### include openfpm_devices include path ####### include openfpm_devices include path
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
LINKLIBS = $(DEFAULT_LIB) $(PTHREAD_LIBS) $(OPT_LIBS) $(HDF5_LDFLAGS) $(HDF5_LIBS) $(BOOST_LDFLAGS) LINKLIBS = $(DEFAULT_LIB) $(PTHREAD_LIBS) $(OPT_LIBS) $(HDF5_LDFLAGS) $(HDF5_LIBS) $(BOOST_LDFLAGS)
noinst_PROGRAMS = vcluster_test noinst_PROGRAMS = vcluster_test
vcluster_test_SOURCES = main.cpp VCluster/VCluster.cpp ../../openfpm_devices/src/memory/HeapMemory.cpp ../../openfpm_devices/src/memory/PtrMemory.cpp vcluster_test_SOURCES = main.cpp VCluster/VCluster.cpp ../../openfpm_devices/src/memory/HeapMemory.cpp ../../openfpm_devices/src/memory/PtrMemory.cpp ../../openfpm_devices/src/Memleak_check.cpp
vcluster_test_CXXFLAGS = $(AM_CXXFLAGS) $(INCLUDES_PATH) $(BOOST_CPPFLAGS) vcluster_test_CXXFLAGS = $(AM_CXXFLAGS) $(INCLUDES_PATH) $(BOOST_CPPFLAGS)
vcluster_test_CFLAGS = $(CUDA_CFLAGS) vcluster_test_CFLAGS = $(CUDA_CFLAGS)
vcluster_test_LDADD = $(LINKLIBS) vcluster_test_LDADD = $(LINKLIBS)
......
#include "VCluster.hpp" #include "VCluster.hpp"
#include <execinfo.h>
Vcluster * global_v_cluster_private = NULL; Vcluster * global_v_cluster_private = NULL;
...@@ -8,3 +9,31 @@ bool ofp_initialized = false; ...@@ -8,3 +9,31 @@ bool ofp_initialized = false;
size_t tot_sent = 0; size_t tot_sent = 0;
size_t tot_recv = 0; size_t tot_recv = 0;
std::string program_name;
// Segmentation fault signal handler
void bt_sighandler(int sig, siginfo_t * info, void * ctx_p)
{
void *trace[16];
char **messages = NULL;
int i, trace_size = 0;
if (sig == SIGSEGV)
std::cout << "Got signal " << sig << " faulty address is %p, " << info->si_addr << " from " << info->si_pid << std::endl;
else
std:: cout << "Got signal " << sig << std::endl;
trace_size = backtrace(trace, 16);
/* overwrite sigaction with caller's address */
trace[1] = (void *)info->si_addr;
messages = backtrace_symbols(trace, trace_size);
/* skip first stack frame (points here) */
printf("[bt] Execution path:\n");
for (i=1; i<trace_size; ++i)
{
printf("[bt] #%d %s\n", i, messages[i]);
}
exit(0);
}
This diff is collapsed.
...@@ -39,6 +39,8 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather) ...@@ -39,6 +39,8 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather)
if (vcl.getProcessingUnits() >= 32) if (vcl.getProcessingUnits() >= 32)
return; return;
//! [Gather the data on master]
openfpm::vector<size_t> v1; openfpm::vector<size_t> v1;
v1.resize(vcl.getProcessUnitID()); v1.resize(vcl.getProcessUnitID());
...@@ -49,6 +51,8 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather) ...@@ -49,6 +51,8 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather)
vcl.SGather(v1,v2,(i%vcl.getProcessingUnits())); vcl.SGather(v1,v2,(i%vcl.getProcessingUnits()));
//! [Gather the data on master]
if (vcl.getProcessUnitID() == (i%vcl.getProcessingUnits())) if (vcl.getProcessUnitID() == (i%vcl.getProcessingUnits()))
{ {
size_t n = vcl.getProcessingUnits(); size_t n = vcl.getProcessingUnits();
...@@ -72,6 +76,8 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather_2) ...@@ -72,6 +76,8 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather_2)
if (vcl.getProcessingUnits() >= 32) if (vcl.getProcessingUnits() >= 32)
return; return;
//! [Gather the data on master complex]
openfpm::vector<size_t> v1; openfpm::vector<size_t> v1;
v1.resize(vcl.getProcessUnitID()); v1.resize(vcl.getProcessUnitID());
...@@ -82,6 +88,8 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather_2) ...@@ -82,6 +88,8 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather_2)
vcl.SGather(v1,v2,0); vcl.SGather(v1,v2,0);
//! [Gather the data on master complex]
if (vcl.getProcessUnitID() == 0) if (vcl.getProcessUnitID() == 0)
{ {
size_t n = vcl.getProcessingUnits(); size_t n = vcl.getProcessingUnits();
...@@ -550,6 +558,8 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_scatter) ...@@ -550,6 +558,8 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_scatter)
for(size_t i = 0 ; i < n_elements ; i++) for(size_t i = 0 ; i < n_elements ; i++)
v1.get(i) = 5; v1.get(i) = 5;
//! [Scatter the data from master]
openfpm::vector<size_t> v2; openfpm::vector<size_t> v2;
openfpm::vector<size_t> prc; openfpm::vector<size_t> prc;
...@@ -564,6 +574,8 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_scatter) ...@@ -564,6 +574,8 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_scatter)
vcl.SScatter(v1,v2,prc,sz,(i%vcl.getProcessingUnits())); vcl.SScatter(v1,v2,prc,sz,(i%vcl.getProcessingUnits()));
//! [Scatter the data from master]
BOOST_REQUIRE_EQUAL(v2.size(),vcl.getProcessUnitID() % SSCATTER_MAX); BOOST_REQUIRE_EQUAL(v2.size(),vcl.getProcessUnitID() % SSCATTER_MAX);
bool is_five = true; bool is_five = true;
......
#include "config.h"
#define BOOST_TEST_MODULE "C++ test module for OpenFPM_vcluster project" #define BOOST_TEST_MODULE "C++ test module for OpenFPM_vcluster project"
#include <boost/test/included/unit_test.hpp> #include <boost/test/included/unit_test.hpp>
#include "config.h"
#include "VCluster/VCluster.hpp" #include "VCluster/VCluster.hpp"
#include "unit_test_init_cleanup.hpp" #include "unit_test_init_cleanup.hpp"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment