Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
O
openfpm_vcluster
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openfpm
openfpm_vcluster
Commits
dcf398d0
Commit
dcf398d0
authored
Feb 17, 2017
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documentation + fix in installation process for SE_CLASS3
parent
5b360467
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
200 additions
and
46 deletions
+200
-46
configure.ac
configure.ac
+58
-1
src/Makefile.am
src/Makefile.am
+1
-1
src/VCluster/VCluster.cpp
src/VCluster/VCluster.cpp
+29
-0
src/VCluster/VCluster.hpp
src/VCluster/VCluster.hpp
+99
-43
src/VCluster/VCluster_semantic_unit_tests.hpp
src/VCluster/VCluster_semantic_unit_tests.hpp
+12
-0
src/main.cpp
src/main.cpp
+1
-1
No files found.
configure.ac
View file @
dcf398d0
...
@@ -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
...
...
src/Makefile.am
View file @
dcf398d0
...
@@ -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)
...
...
src/VCluster/VCluster.cpp
View file @
dcf398d0
#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
);
}
src/VCluster/VCluster.hpp
View file @
dcf398d0
This diff is collapsed.
Click to expand it.
src/VCluster/VCluster_semantic_unit_tests.hpp
View file @
dcf398d0
...
@@ -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
;
...
...
src/main.cpp
View file @
dcf398d0
#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"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment