Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
O
openfpm_pdata
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
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
argupta
openfpm_pdata
Commits
d058871d
Commit
d058871d
authored
Feb 05, 2016
by
Pietro Incardona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing installation
parent
44232a31
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
55 additions
and
68 deletions
+55
-68
configure.ac
configure.ac
+4
-0
example/Grid/1_stencil/main.cpp
example/Grid/1_stencil/main.cpp
+4
-4
example/Vector/0_simple/main.cpp
example/Vector/0_simple/main.cpp
+30
-14
install
install
+1
-1
src/Decomposition/decomposition_util_test.hpp
src/Decomposition/decomposition_util_test.hpp
+2
-2
src/Grid/grid_dist_id_iterator.hpp
src/Grid/grid_dist_id_iterator.hpp
+0
-16
src/Makefile.am
src/Makefile.am
+7
-2
src/SubdomainGraphNodes.hpp
src/SubdomainGraphNodes.hpp
+4
-20
src/Vector/vector_dist_unit_test.hpp
src/Vector/vector_dist_unit_test.hpp
+0
-6
vtk/Makefile.am
vtk/Makefile.am
+3
-3
No files found.
configure.ac
View file @
d058871d
...
...
@@ -46,6 +46,10 @@ INCLUDES_PATH=" "
# Create a file with the install base folder
echo "$base" > install_dir
# Needed for build library
AC_PROG_RANLIB
AM_PROG_AR
# Checks for programs.
AC_PROG_CXX
...
...
example/Grid/1_stencil/main.cpp
View file @
d058871d
...
...
@@ -131,11 +131,11 @@ int main(int argc, char* argv[])
// Get again another iterator, iterate across all the domain points, calculating a Laplace stencil
//
//
dom
=
g_dist
.
getDomainIterator
();
auto
dom2
=
g_dist
.
getDomainIterator
();
while
(
dom
.
isNext
())
while
(
dom
2
.
isNext
())
{
auto
key
=
dom
.
get
();
auto
key
=
dom
2
.
get
();
// Laplace stencil
g_dist
.
template
get
<
B
>(
key
)[
1
]
=
g_dist
.
template
get
<
A
>(
key
.
move
(
x
,
1
))[
0
]
+
g_dist
.
template
get
<
A
>(
key
.
move
(
x
,
-
1
))[
0
]
+
...
...
@@ -144,7 +144,7 @@ int main(int argc, char* argv[])
6
*
g_dist
.
template
get
<
A
>(
key
)[
0
];
++
dom
;
++
dom
2
;
}
//
...
...
example/Vector/0_simple/main.cpp
View file @
d058871d
...
...
@@ -26,17 +26,14 @@ template<typename T> class Particle
{
public:
typedef
boost
::
fusion
::
vector
<
T
,
T
,
T
,
T
,
T
[
3
],
T
[
3
][
3
]
>
type
;
typedef
boost
::
fusion
::
vector
<
T
,
T
[
3
],
T
[
3
][
3
]
>
type
;
type
data
;
static
const
unsigned
int
x
=
0
;
static
const
unsigned
int
y
=
1
;
static
const
unsigned
int
z
=
2
;
static
const
unsigned
int
s
=
3
;
static
const
unsigned
int
v
=
4
;
static
const
unsigned
int
t
=
5
;
static
const
unsigned
int
max_prop
=
6
;
static
const
unsigned
int
s
=
0
;
static
const
unsigned
int
v
=
1
;
static
const
unsigned
int
t
=
2
;
static
const
unsigned
int
max_prop
=
3
;
};
int
main
(
int
argc
,
char
*
argv
[])
...
...
@@ -58,8 +55,8 @@ int main(int argc, char* argv[])
std
::
default_random_engine
eg
;
std
::
uniform_real_distribution
<
float
>
ud
(
0.0
f
,
1.0
f
);
Box
<
2
,
float
>
box
({
0.0
,
0.0
},{
1.0
,
1.0
});
size_t
bc
[
2
]
=
{
PERIODIC
,
PERIODIC
};
Box
<
2
,
float
>
domain
({
0.0
,
0.0
},{
1.0
,
1.0
});
size_t
bc
[
2
]
=
{
PERIODIC
,
PERIODIC
};
Ghost
<
2
,
float
>
g
(
0.01
);
//
...
...
@@ -82,12 +79,12 @@ int main(int argc, char* argv[])
// objects with an undefined position in space. This non-space decomposition is also called data-driven
// decomposition
//
vector_dist
<
2
,
float
,
Particle
<
float
>
,
CartDecomposition
<
2
,
float
>
>
vd
(
4096
,
box
,
bc
,
g
);
vector_dist
<
2
,
float
,
Particle
<
float
>
,
CartDecomposition
<
2
,
float
>
>
vd
(
4096
,
domain
,
bc
,
g
);
//
// ### WIKI 5 ###
//
// Get an iterator that go through
t the object
s, in an undefined position state and define its position
// Get an iterator that go through
the particle
s, in an undefined position state and define its position
//
auto
it
=
vd
.
getIterator
();
...
...
@@ -124,10 +121,29 @@ int main(int argc, char* argv[])
{
auto
key
=
it
.
get
();
if
(
ct
.
isLocal
(
vd
.
template
getPos
<
s
::
x
>(
key
))
==
false
)
// The template parameter is unuseful and will probably disappear
if
(
ct
.
isLocal
(
vd
.
template
getPos
<
0
>(
key
))
==
false
)
std
::
cerr
<<
"Error particle is not local"
<<
"
\n
"
;
// set the all the properties to 0.0
// scalar
vd
.
template
getProp
<
0
>(
key
)
=
0.0
;
vd
.
template
getProp
<
1
>(
key
)[
0
]
=
0.0
;
vd
.
template
getProp
<
1
>(
key
)[
1
]
=
0.0
;
vd
.
template
getProp
<
1
>(
key
)[
2
]
=
0.0
;
vd
.
template
getProp
<
2
>(
key
)[
0
][
0
]
=
0.0
;
vd
.
template
getProp
<
2
>(
key
)[
0
][
1
]
=
0.0
;
vd
.
template
getProp
<
2
>(
key
)[
0
][
2
]
=
0.0
;
vd
.
template
getProp
<
2
>(
key
)[
1
][
0
]
=
0.0
;
vd
.
template
getProp
<
2
>(
key
)[
1
][
1
]
=
0.0
;
vd
.
template
getProp
<
2
>(
key
)[
1
][
2
]
=
0.0
;
vd
.
template
getProp
<
2
>(
key
)[
2
][
0
]
=
0.0
;
vd
.
template
getProp
<
2
>(
key
)[
2
][
1
]
=
0.0
;
vd
.
template
getProp
<
2
>(
key
)[
2
][
2
]
=
0.0
;
cnt
++
;
++
it
;
...
...
install
View file @
d058871d
...
...
@@ -218,7 +218,7 @@ fi
install_base
=
$(
cat
install_dir
)
echo
"INCLUDE_PATH=-I. -I
$install_base
/openfpm_numerics/include -I
$install_base
/openfpm_pdata/include/config -I
$install_base
/openfpm_pdata/include -I
$install_base
/openfpm_data/include -I
$install_base
/openfpm_vcluster/include -I
$install_base
/openfpm_io/include -I
$install_base
/openfpm_devices/include -I
$i_dir
/METIS/include -I
$i_dir
/BOOST/include"
>
example.mk
echo
"LIBS_PATH= -L
$install_base
/openfpm_devices/lib -L
$install_base
/openfpm_vcluster/lib -L
$i_dir
/METIS/lib -L
$i_dir
/BOOST/lib "
>>
example.mk
echo
"LIBS=-lvcluster -lofpmmemory -lmetis -lboost_iostreams"
>>
example.mk
echo
"LIBS=-lvcluster -lofpm
_pdata -lofpm
memory -lmetis -lboost_iostreams"
>>
example.mk
echo
"LIBS_SE2=-lvcluster -lofpmmemory_se2 -lmetis -lboost_iostreams"
>>
example.mk
cp
example.mk src/example.mk
cp
example.mk example/example.mk
...
...
src/Decomposition/decomposition_util_test.hpp
View file @
d058871d
...
...
@@ -10,7 +10,7 @@
#include "VCluster.hpp"
openfpm
::
vector
<
SpaceBox
<
3
,
float
>>
create3Ddecomposition
(
Vcluster
&
vcl
)
/*
openfpm::vector<SpaceBox<3,float>> create3Ddecomposition(Vcluster & vcl)
{
vb3.add(Box<3,float>({0.2,0.2,0.5},{1.0,0.5,1.0}));
vb3.add(Box<3,float>({0.0,0.0,0.5},{0.2,0.2,1.0}));
...
...
@@ -18,7 +18,7 @@ openfpm::vector<SpaceBox<3,float>> create3Ddecomposition(Vcluster & vcl)
vb3.add(Box<3,float>({0.5,0.0,0.5},{1.0,0.2,1.0}));
vb3.add(Box<3,float>({0.0,0.2,0.5},{0.2,0.5,1.0}));
vb3.add(Box<3,float>({0.0,0.5,0.5},{1.0,1.0,1.0}));
}
}
*/
...
...
src/Grid/grid_dist_id_iterator.hpp
View file @
d058871d
...
...
@@ -113,22 +113,6 @@ class grid_dist_iterator<dim,device_grid,FREE>
public:
/*! \brief Copy operator=
*
* \param tmp iterator to copy
*
*/
grid_dist_iterator
<
dim
,
device_grid
,
FREE
>
&
operator
=
(
const
grid_dist_iterator
<
dim
,
device_grid
,
FREE
>
&
tmp
)
{
g_c
=
tmp
.
g_c
;
gList
=
tmp
.
gList
;
gdb_ext
=
tmp
.
gdb_ext
;
a_it
.
reinitialize
(
tmp
.
a_it
);
stop
=
tmp
.
stop
;
return
*
this
;
}
/*! \brief Constructor of the distributed grid iterator
*
* \param gk std::vector of the local grid
...
...
src/Makefile.am
View file @
d058871d
LINKLIBS
=
$(METIS_LIB)
$(PTHREAD_LIBS)
$(OPT_LIBS)
$(BOOST_LDFLAGS)
$(BOOST_IOSTREAMS_LIB)
$(CUDA_LIBS)
noinst_PROGRAMS
=
pdata
pdata_SOURCES
=
main.cpp ../openfpm_devices/src/memory/HeapMemory.cpp ../openfpm_devices/src/memory/PtrMemory.cpp ../openfpm_vcluster/src/VCluster.cpp ../openfpm_devices/src/Memleak_check.cpp
pdata_SOURCES
=
main.cpp
lib/pdata.cpp test_multiple_o.cpp
../openfpm_devices/src/memory/HeapMemory.cpp ../openfpm_devices/src/memory/PtrMemory.cpp ../openfpm_vcluster/src/VCluster.cpp ../openfpm_devices/src/Memleak_check.cpp
pdata_CXXFLAGS
=
$(CUDA_CFLAGS)
$(INCLUDES_PATH)
$(METIS_INCLUDE)
$(BOOST_CPPFLAGS)
-Wno-unused-local-typedefs
pdata_CFLAGS
=
$(CUDA_CFLAGS)
pdata_LDADD
=
$(LINKLIBS)
-lmetis
nobase_include_HEADERS
=
Decomposition/CartDecomposition.hpp Decomposition/common.hpp Decomposition/Decomposition.hpp Decomposition/ie_ghost.hpp
\
Decomposition/nn_processor.hpp Decomposition/ie_loc_ghost.hpp Decomposition/ORB.hpp
\
Graph/CartesianGraphFactory.hpp
\
Grid/grid_dist_id.hpp Grid/grid_dist_id_iterator_sub.hpp Grid/grid_dist_id_iterator.hpp Grid/grid_dist_key.hpp
\
Grid/grid_dist_id.hpp Grid/grid_dist_id_iterator_
dec.hpp Grid/grid_dist_util.hpp Grid/grid_dist_id_iterator_
sub.hpp Grid/grid_dist_id_iterator.hpp Grid/grid_dist_key.hpp
\
Vector/vector_dist.hpp Vector/vector_dist_ofb.hpp Vector/vector_dist_iterator.hpp Vector/vector_dist_key.hpp
\
config/config.h
\
example.mk
\
metis_util.hpp dec_optimizer.hpp SubdomainGraphNodes.hpp
lib_LIBRARIES
=
libofpm_pdata.a
libofpm_pdata_a_SOURCES
=
lib/pdata.cpp
libofpm_pdata_a_CXXFLAGS
=
$(INCLUDES_PATH)
$(BOOST_CPPFLAGS)
-I
/usr/local/include
libofpm_pdata_a_CFLAGS
=
.cu.o
:
$(NVCC)
$(NVCCFLAGS)
-o
$@
-c
$<
src/SubdomainGraphNodes.hpp
View file @
d058871d
#ifndef SUBDOMAIN_NODES_HPP
#define SUBDOMAIN_NODES_HPP
#include <boost/fusion/container/vector.hpp>
#include <boost/fusion/include/at_c.hpp>
#include "Grid/Encap.hpp"
/* In a decomposition graph each node represent a sub-domain while an edge represent
* an interaction between sub-domain (it mean that they have to communicate).
*
...
...
@@ -32,9 +36,6 @@ struct nm_v
//! The node contain 3 unsigned long integer for communication computation memory and id
typedef
boost
::
fusion
::
vector
<
float
,
float
,
float
,
size_t
,
size_t
,
size_t
,
size_t
,
long
int
>
type
;
typedef
typename
memory_traits_inte
<
type
>::
type
memory_int
;
typedef
typename
memory_traits_lin
<
type
>::
type
memory_lin
;
//! type of the positional field
typedef
float
s_type
;
...
...
@@ -87,8 +88,6 @@ struct nm_v
};
const
std
::
string
nm_v
::
attributes
::
name
[]
=
{
"x"
,
"y"
,
"z"
,
"communication"
,
"computation"
,
"memory"
,
"id"
,
"sub_id"
};
/*! \brief sub-domain edge graph node
*
*/
...
...
@@ -98,9 +97,6 @@ struct nm_e
//! The node contain 3 unsigned long integer for comunication computation and memory
typedef
boost
::
fusion
::
vector
<
size_t
>
type
;
typedef
typename
memory_traits_inte
<
type
>::
type
memory_int
;
typedef
typename
memory_traits_lin
<
type
>::
type
memory_lin
;
//! Attributes name
struct
attributes
{
...
...
@@ -116,7 +112,6 @@ struct nm_e
static
const
unsigned
int
max_prop
=
1
;
};
const
std
::
string
nm_e
::
attributes
::
name
[]
=
{
"communication"
};
/*! \brief Reduced sub-domain vertex graph node
*
...
...
@@ -129,9 +124,6 @@ struct nm_part_v
//! The node contain 3 unsigned long integer for comunication computation and memory
typedef
boost
::
fusion
::
vector
<
size_t
,
size_t
>
type
;
typedef
typename
memory_traits_inte
<
type
>::
type
memory_int
;
typedef
typename
memory_traits_lin
<
type
>::
type
memory_lin
;
typedef
float
s_type
;
//! Attributes name
...
...
@@ -166,9 +158,6 @@ struct nm_part_v
};
const
std
::
string
nm_part_v
::
attributes
::
name
[]
=
{
"id"
,
"sub_id"
};
/*! \brief Reduced edge graph node
*
* It contain only the communication between nodes
...
...
@@ -180,9 +169,6 @@ struct nm_part_e
//! The node contain 3 unsigned long integer for comunication computation and memory
typedef
boost
::
fusion
::
vector
<>
type
;
typedef
typename
memory_traits_inte
<
type
>::
type
memory_int
;
typedef
typename
memory_traits_lin
<
type
>::
type
memory_lin
;
//! The data
type
data
;
...
...
@@ -197,6 +183,4 @@ struct nm_part_e
};
};
const
std
::
string
nm_part_e
::
attributes
::
name
[]
=
{
"id"
};
#endif
src/Vector/vector_dist_unit_test.hpp
View file @
d058871d
...
...
@@ -1149,12 +1149,6 @@ BOOST_AUTO_TEST_CASE( vector_dist_cell_verlet_test )
correct
&=
(
first_NN
==
6
);
correct
&=
(
second_NN
==
12
);
correct
&=
(
third_NN
==
8
);
if
(
correct
==
false
)
{
int
debug
=
0
;
debug
++
;
}
}
BOOST_REQUIRE_EQUAL
(
correct
,
true
);
...
...
vtk/Makefile.am
View file @
d058871d
...
...
@@ -2,17 +2,17 @@
LINKLIBS
=
$(METIS_LIB)
$(PTHREAD_LIBS)
$(OPT_LIBS)
$(BOOST_LDFLAGS)
$(BOOST_IOSTREAMS_LIB)
$(CUDA_LIBS)
noinst_PROGRAMS
=
cart_dec metis_dec dom_box
cart_dec_SOURCES
=
CartDecomposition_gen_vtk.cpp ../openfpm_devices/src/memory/HeapMemory.cpp ../openfpm_devices/src/memory/PtrMemory.cpp ../openfpm_vcluster/src/VCluster.cpp ../openfpm_devices/src/Memleak_check.cpp
cart_dec_SOURCES
=
CartDecomposition_gen_vtk.cpp ../
src/lib/pdata.cpp ../
openfpm_devices/src/memory/HeapMemory.cpp ../openfpm_devices/src/memory/PtrMemory.cpp ../openfpm_vcluster/src/VCluster.cpp ../openfpm_devices/src/Memleak_check.cpp
cart_dec_CXXFLAGS
=
$(CUDA_CFLAGS)
$(INCLUDES_PATH)
$(METIS_INCLUDE)
$(BOOST_CPPFLAGS)
-I
../src
-Wno-unused-function
-Wno-unused-local-typedefs
cart_dec_CFLAGS
=
$(CUDA_CFLAGS)
cart_dec_LDADD
=
$(LINKLIBS)
-lmetis
metis_dec_SOURCES
=
Metis_gen_vtk.cpp ../openfpm_devices/src/memory/HeapMemory.cpp ../openfpm_devices/src/memory/PtrMemory.cpp ../openfpm_vcluster/src/VCluster.cpp ../openfpm_devices/src/Memleak_check.cpp
metis_dec_SOURCES
=
Metis_gen_vtk.cpp ../
src/lib/pdata.cpp ../
openfpm_devices/src/memory/HeapMemory.cpp ../openfpm_devices/src/memory/PtrMemory.cpp ../openfpm_vcluster/src/VCluster.cpp ../openfpm_devices/src/Memleak_check.cpp
metis_dec_CXXFLAGS
=
$(CUDA_CFLAGS)
$(INCLUDES_PATH)
$(METIS_INCLUDE)
$(BOOST_CPPFLAGS)
-I
../src
-Wno-unused-function
-Wno-unused-local-typedefs
metis_dec_CFLAGS
=
$(CUDA_CFLAGS)
metis_dec_LDADD
=
$(LINKLIBS)
-lmetis
dom_box_SOURCES
=
domain_gen_vtk.cpp ../openfpm_devices/src/memory/HeapMemory.cpp ../openfpm_devices/src/memory/PtrMemory.cpp ../openfpm_vcluster/src/VCluster.cpp ../openfpm_devices/src/Memleak_check.cpp
dom_box_SOURCES
=
domain_gen_vtk.cpp ../
src/lib/pdata.cpp ../
openfpm_devices/src/memory/HeapMemory.cpp ../openfpm_devices/src/memory/PtrMemory.cpp ../openfpm_vcluster/src/VCluster.cpp ../openfpm_devices/src/Memleak_check.cpp
dom_box_CXXFLAGS
=
$(CUDA_CFLAGS)
$(INCLUDES_PATH)
$(METIS_INCLUDE)
$(BOOST_CPPFLAGS)
-I
../src
-Wno-unused-function
-Wno-unused-local-typedefs
dom_box_CFLAGS
=
$(CUDA_CFLAGS)
dom_box_LDADD
=
$(LINKLIBS)
...
...
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