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
2a41cfe6
Commit
2a41cfe6
authored
Dec 23, 2018
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Latest modules
parent
5b3fd9bd
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
45 additions
and
37 deletions
+45
-37
CMakeLists.txt
CMakeLists.txt
+4
-0
example/Debugging/0_classes/main.cpp
example/Debugging/0_classes/main.cpp
+4
-4
example/Debugging/1_classes/main.cpp
example/Debugging/1_classes/main.cpp
+1
-1
example/Grid/0_simple/main.cpp
example/Grid/0_simple/main.cpp
+1
-1
example/Grid/2_solve_eq/main.cpp
example/Grid/2_solve_eq/main.cpp
+1
-1
example/Numerics/Vortex_in_cell/main_vic_petsc_opt.cpp
example/Numerics/Vortex_in_cell/main_vic_petsc_opt.cpp
+3
-3
example/VCluster/0_simple/main.cpp
example/VCluster/0_simple/main.cpp
+1
-1
example/VCluster/1_semantic/main.cpp
example/VCluster/1_semantic/main.cpp
+1
-1
example/VCluster/2_serial_and_parallel/main.cpp
example/VCluster/2_serial_and_parallel/main.cpp
+1
-1
example/Vector/1_celllist/main.cpp
example/Vector/1_celllist/main.cpp
+1
-1
example/Vector/3_molecular_dynamic_gpu_opt/Makefile
example/Vector/3_molecular_dynamic_gpu_opt/Makefile
+8
-4
example/Vector/4_complex_prop/Makefile
example/Vector/4_complex_prop/Makefile
+1
-1
example/Vector/4_complex_prop/main.cpp
example/Vector/4_complex_prop/main.cpp
+1
-1
example/Vector/4_complex_prop/main_ser.cpp
example/Vector/4_complex_prop/main_ser.cpp
+1
-1
example/Vector/4_multiphase_celllist_verlet/main.cpp
example/Vector/4_multiphase_celllist_verlet/main.cpp
+1
-1
example/Vector/4_reorder/main_comp_ord.cpp
example/Vector/4_reorder/main_comp_ord.cpp
+1
-1
example/Vector/4_reorder/main_data_ord.cpp
example/Vector/4_reorder/main_data_ord.cpp
+1
-1
example/Vector/5_molecular_dynamic_sym/main.cpp
example/Vector/5_molecular_dynamic_sym/main.cpp
+1
-1
example/Vector/5_molecular_dynamic_sym_crs/main.cpp
example/Vector/5_molecular_dynamic_sym_crs/main.cpp
+1
-1
example/Vector/7_SPH_dlb_gpu/Makefile
example/Vector/7_SPH_dlb_gpu/Makefile
+1
-1
example/Vector/7_SPH_dlb_gpu/main.cu
example/Vector/7_SPH_dlb_gpu/main.cu
+3
-3
example/Vector/7_SPH_dlb_gpu_opt/Makefile
example/Vector/7_SPH_dlb_gpu_opt/Makefile
+1
-1
example/Vector/7_SPH_dlb_opt/main.cpp
example/Vector/7_SPH_dlb_opt/main.cpp
+4
-4
example/Vector/8_DEM/main.cpp
example/Vector/8_DEM/main.cpp
+1
-1
openfpm_numerics
openfpm_numerics
+1
-1
No files found.
CMakeLists.txt
View file @
2a41cfe6
...
...
@@ -153,6 +153,10 @@ else()
message
(
FATAL_ERROR
"LibHilbert is required in order to install OpenFPM"
)
endif
()
if
(
SUITESPARSE_FOUND
)
set
(
DEFINE_HAVE_SUITESPARSE
"#define HAVE_SUITESPARSE"
)
endif
()
if
(
APPLE
)
set
(
DEFINE_HAVE_OSX
"#define HAVE_OSX"
)
endif
()
...
...
example/Debugging/0_classes/main.cpp
View file @
2a41cfe6
...
...
@@ -43,7 +43,7 @@ int main(int argc, char* argv[])
// randomly in the domain, we create a Box that define our domain, boundary conditions and ghost
//
openfpm_init
(
&
argc
,
&
argv
);
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
typedef
Point
<
2
,
float
>
s
;
...
...
@@ -87,7 +87,7 @@ int main(int argc, char* argv[])
// decomposition
//
{
vector_dist
<
2
,
float
,
Point_test
<
float
>
,
CartDecomposition
<
2
,
float
>
>
vd
(
4096
,
box
,
bc
,
g
);
vector_dist
<
2
,
float
,
Point_test
<
float
>
>
vd
(
4096
,
box
,
bc
,
g
);
//
// ### WIKI 6 ###
...
...
@@ -112,8 +112,8 @@ int main(int argc, char* argv[])
// we create, now two of them using new
//
vector_dist
<
2
,
float
,
Point_test
<
float
>
,
CartDecomposition
<
2
,
float
>
>
*
vd1
=
new
vector_dist
<
2
,
float
,
Point_test
<
float
>
,
CartDecomposition
<
2
,
float
>
>
(
4096
,
box
,
bc
,
g
);
vector_dist
<
2
,
float
,
Point_test
<
float
>
,
CartDecomposition
<
2
,
float
>
>
*
vd2
=
new
vector_dist
<
2
,
float
,
Point_test
<
float
>
,
CartDecomposition
<
2
,
float
>
>
(
4096
,
box
,
bc
,
g
);
vector_dist
<
2
,
float
,
Point_test
<
float
>
>
*
vd1
=
new
vector_dist
<
2
,
float
,
Point_test
<
float
>
,
CartDecomposition
<
2
,
float
>
>
(
4096
,
box
,
bc
,
g
);
vector_dist
<
2
,
float
,
Point_test
<
float
>
>
*
vd2
=
new
vector_dist
<
2
,
float
,
Point_test
<
float
>
,
CartDecomposition
<
2
,
float
>
>
(
4096
,
box
,
bc
,
g
);
//
// ### WIKI 8 ###
...
...
example/Debugging/1_classes/main.cpp
View file @
2a41cfe6
...
...
@@ -36,7 +36,7 @@ int main(int argc, char* argv[])
// * throw_on_allocation throw when one allocation is reached, producing the termination of the program and a core dump (if no try catch is set-up)
//
openfpm_init
(
&
argc
,
&
argv
);
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
throw_on_alloc
(
10
);
// message_on_alloc(10);
...
...
example/Grid/0_simple/main.cpp
View file @
2a41cfe6
...
...
@@ -270,7 +270,7 @@ PX,Y Processor X, sub-domain Y</pre><p>The point # has</p>
//! \cond [reduce] \endcond
// Get the VCluster object
Vcluster
&
vcl
=
create_vcluster
();
Vcluster
<>
&
vcl
=
create_vcluster
();
// queue an operation of sum for the counter count
vcl
.
sum
(
count
);
...
...
example/Grid/2_solve_eq/main.cpp
View file @
2a41cfe6
...
...
@@ -393,7 +393,7 @@ int main(int argc, char* argv[])
// Get the maximum across processor to calculate the norm infinity of the error
// Norm infinity of the error is the maximum error across all the grid points
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
v_cl
.
max
(
error
);
v_cl
.
execute
();
...
...
example/Numerics/Vortex_in_cell/main_vic_petsc_opt.cpp
View file @
2a41cfe6
...
...
@@ -406,7 +406,7 @@ void comp_vel(grid_type_s & gr_ps,
solError
serr
;
serr
=
solver
.
get_residual_error
(
phi_s
[
i
],
b
);
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
if
(
v_cl
.
getProcessUnitID
()
==
0
)
{
std
::
cout
<<
"Solved component "
<<
i
<<
" Error: "
<<
serr
.
err_inf
<<
std
::
endl
;}
...
...
@@ -665,7 +665,7 @@ template<typename vector, typename grid> void check_point_and_save(vector & part
grid
&
g_dvort
,
size_t
i
)
{
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
if
(
v_cl
.
getProcessingUnits
()
<
24
)
{
...
...
@@ -775,7 +775,7 @@ int main(int argc, char* argv[])
Vector
<
double
,
PETSC_BASE
>
x_
;
// Parallel object
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
// print out the spacing of the grid
if
(
v_cl
.
getProcessUnitID
()
==
0
)
...
...
example/VCluster/0_simple/main.cpp
View file @
2a41cfe6
...
...
@@ -61,7 +61,7 @@ int main(int argc, char* argv[])
//! \cond [create] \endcond
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
long
int
N_prc
=
v_cl
.
getProcessingUnits
();
//! \cond [create] \endcond
...
...
example/VCluster/1_semantic/main.cpp
View file @
2a41cfe6
...
...
@@ -39,7 +39,7 @@ int main(int argc, char* argv[])
//! \cond [initialization] \endcond
openfpm_init
(
&
argc
,
&
argv
);
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
//! \cond [initialization] \endcond
...
...
example/VCluster/2_serial_and_parallel/main.cpp
View file @
2a41cfe6
...
...
@@ -124,7 +124,7 @@ int main(int argc, char* argv[])
//! \cond [initialization] \endcond
openfpm_init
(
&
argc
,
&
argv
);
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
//! \cond [initialization] \endcond
...
...
example/Vector/1_celllist/main.cpp
View file @
2a41cfe6
...
...
@@ -34,7 +34,7 @@ int main(int argc, char* argv[])
//! \cond [Initialization and parameters] \endcond
openfpm_init
(
&
argc
,
&
argv
);
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
// we will place the particles on a grid like way with 128 particles on each direction
size_t
sz
[
3
]
=
{
128
,
128
,
128
};
...
...
example/Vector/3_molecular_dynamic_gpu_opt/Makefile
View file @
2a41cfe6
...
...
@@ -5,6 +5,7 @@ CC=nvcc #${CC_SCOREP}
CC_MPI
=
mpic++
LDIR
=
OPT
=
OBJ_GPU
=
main_gpu.o
OBJ_CPU
=
main_cpu.o
...
...
@@ -12,14 +13,17 @@ OBJ_CPU_BEST = main_cpu_best.o
all
:
md_dyn_gpu md_dyn_cpu md_dyn_cpu_best
md_dyn_gpu_test
:
OPT += -DTEST_RUN
md_dyn_gpu_test
:
all
%.o
:
%.cu
$(CC)
-O3
-g
-c
-isystem
=
/home/i-bird/MPI/include
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH_NVCC)
$(CC)
$(OPT)
-O3
-g
-c
-isystem
=
/home/i-bird/MPI/include
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH_NVCC)
%.o
:
%.cpp
$(CC_MPI)
-O3
-g
-c
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH)
$(CC_MPI)
$(OPT)
-O3
-g
-c
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH)
md_dyn_gpu
:
$(OBJ_GPU)
$(CC)
-o
$@
$^
$(CFLAGS)
$(LIBS_PATH
_NVCC
)
$(LIBS)
-L
/home/i-bird/MPI/lib
-L
/usr/local/cuda/lib64
-lcudart
-lmpi
-L
/usr/local/cuda/extras/CUPTI/lib64
-lhdf5
$(CC)
-o
$@
$^
$(CFLAGS)
$(LIBS_PATH)
$(LIBS)
-L
/home/i-bird/MPI/lib
-L
/usr/local/cuda/lib64
-lcudart
-lmpi
-L
/usr/local/cuda/extras/CUPTI/lib64
-lhdf5
md_dyn_cpu
:
$(OBJ_CPU)
$(CC_MPI)
-o
$@
$^
$(CFLAGS)
$(LIBS_PATH)
$(LIBS)
...
...
@@ -27,7 +31,7 @@ md_dyn_cpu: $(OBJ_CPU)
md_dyn_cpu_best
:
$(OBJ_CPU_BEST)
$(CC_MPI)
-o
$@
$^
$(CFLAGS)
$(LIBS_PATH)
$(LIBS)
run
:
all
run
:
md_dyn_gpu_test
mpirun
-np
3 ./md_dyn_gpu
&&
mpirun
-np
3 ./md_dyn_cpu
&&
mpirun
-np
3 ./md_dyn_cpu_best
;
.PHONY
:
clean all run
...
...
example/Vector/4_complex_prop/Makefile
View file @
2a41cfe6
...
...
@@ -10,7 +10,7 @@ OBJ_SER = main_ser.o
all
:
vect_cp vect_ser
%.o
:
%.cpp
$(CC)
-O
0
-c
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH)
$(CC)
-O
3
-c
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH)
vect_cp
:
$(OBJ)
$(CC)
-o
$@
$^
$(CFLAGS)
$(LIBS_PATH)
$(LIBS)
...
...
example/Vector/4_complex_prop/main.cpp
View file @
2a41cfe6
...
...
@@ -284,7 +284,7 @@ int main(int argc, char* argv[])
size_t
fg
=
vd
.
size_local
();
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
if
(
v_cl
.
getProcessUnitID
()
==
0
)
{
for
(
;
fg
<
vd
.
size_local
()
+
4
;
fg
++
)
...
...
example/Vector/4_complex_prop/main_ser.cpp
View file @
2a41cfe6
...
...
@@ -504,7 +504,7 @@ int main(int argc, char* argv[])
size_t
fg
=
vd
.
size_local
();
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
// Only the master processor print
if
(
v_cl
.
getProcessUnitID
()
==
0
)
...
...
example/Vector/4_multiphase_celllist_verlet/main.cpp
View file @
2a41cfe6
...
...
@@ -43,7 +43,7 @@ int main(int argc, char* argv[])
openfpm_init
(
&
argc
,
&
argv
);
// Vcluster for general usage
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
// The domain
Box
<
3
,
float
>
box
({
0.0
,
0.0
,
0.0
},{
1.0
,
1.0
,
1.0
});
...
...
example/Vector/4_reorder/main_comp_ord.cpp
View file @
2a41cfe6
...
...
@@ -235,7 +235,7 @@ int main(int argc, char* argv[])
openfpm
::
vector
<
openfpm
::
vector
<
double
>>
y
;
openfpm_init
(
&
argc
,
&
argv
);
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
// we will use it do place particles on a 40x40x40 Grid like
size_t
sz
[
3
]
=
{
40
,
40
,
40
};
...
...
example/Vector/4_reorder/main_data_ord.cpp
View file @
2a41cfe6
...
...
@@ -50,7 +50,7 @@ int main(int argc, char* argv[])
openfpm
::
vector
<
openfpm
::
vector
<
double
>>
y
;
openfpm_init
(
&
argc
,
&
argv
);
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
// we will use it do place particles on a 10x10x10 Grid like
size_t
sz
[
3
]
=
{
40
,
40
,
40
};
...
...
example/Vector/5_molecular_dynamic_sym/main.cpp
View file @
2a41cfe6
...
...
@@ -284,7 +284,7 @@ int main(int argc, char* argv[])
openfpm
::
vector
<
openfpm
::
vector
<
double
>>
y
;
openfpm_init
(
&
argc
,
&
argv
);
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
// we will use it do place particles on a 10x10x10 Grid like
size_t
sz
[
3
]
=
{
10
,
10
,
10
};
...
...
example/Vector/5_molecular_dynamic_sym_crs/main.cpp
View file @
2a41cfe6
...
...
@@ -357,7 +357,7 @@ int main(int argc, char* argv[])
openfpm
::
vector
<
openfpm
::
vector
<
double
>>
y
;
openfpm_init
(
&
argc
,
&
argv
);
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
// we will use it do place particles on a 10x10x10 Grid like
size_t
sz
[
3
]
=
{
10
,
10
,
10
};
...
...
example/Vector/7_SPH_dlb_gpu/Makefile
View file @
2a41cfe6
...
...
@@ -12,7 +12,7 @@ sph_dlb_test: OPT += -DTEST_RUN
sph_dlb_test
:
sph_dlb
%.o
:
%.cu
nvcc
-O3
-g
-c
-isystem
=
/home/i-bird/MPI/include
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH_NVCC)
nvcc
-O3
$(OPT)
-g
-c
-isystem
=
/home/i-bird/MPI/include
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH_NVCC)
%.o
:
%.cpp
$(CC)
-O3
$(OPT)
-g
-c
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH)
...
...
example/Vector/7_SPH_dlb_gpu/main.cu
View file @
2a41cfe6
...
...
@@ -438,7 +438,7 @@ template<typename CellList> inline void calc_forces(particles & vd, CellList & N
calc_forces_gpu
<<<
part
.
wthr
,
part
.
thr
>>>
(
vd
.
toKernel
(),
NN
.
toKernel
(),
W_dap
,
cbar
);
max_visc
=
reduce
<
red
,
_max_
>
(
vd
);
max_visc
=
reduce
_local
<
red
,
_max_
>
(
vd
);
}
template
<
typename
vector_type
>
...
...
@@ -460,8 +460,8 @@ void max_acceleration_and_velocity(particles & vd, real_number & max_acc, real_n
max_acceleration_and_velocity_gpu
<<<
part
.
wthr
,
part
.
thr
>>>
(
vd
.
toKernel
());
max_acc
=
reduce
<
red
,
_max_
>
(
vd
);
max_vel
=
reduce
<
red2
,
_max_
>
(
vd
);
max_acc
=
reduce
_local
<
red
,
_max_
>
(
vd
);
max_vel
=
reduce
_local
<
red2
,
_max_
>
(
vd
);
Vcluster
<>
&
v_cl
=
create_vcluster
();
v_cl
.
max
(
max_acc
);
...
...
example/Vector/7_SPH_dlb_gpu_opt/Makefile
View file @
2a41cfe6
...
...
@@ -12,7 +12,7 @@ sph_dlb_test: OPT += -DTEST_RUN
sph_dlb_test
:
sph_dlb
%.o
:
%.cu
nvcc
-O3
-g
-c
-isystem
=
/home/i-bird/MPI/include
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH_NVCC)
nvcc
-O3
$(OPT)
-g
-c
-isystem
=
/home/i-bird/MPI/include
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH_NVCC)
%.o
:
%.cpp
$(CC)
-O3
$(OPT)
-g
-c
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH)
...
...
example/Vector/7_SPH_dlb_opt/main.cpp
View file @
2a41cfe6
...
...
@@ -641,7 +641,7 @@ void max_acceleration_and_velocity(particles & vd, double & max_acc, double & ma
max_acc
=
sqrt
(
max_acc
);
max_vel
=
sqrt
(
max_vel
);
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
v_cl
.
max
(
max_acc
);
v_cl
.
max
(
max_vel
);
v_cl
.
execute
();
...
...
@@ -757,7 +757,7 @@ void verlet_int(particles & vd, double dt, double & max_disp)
/*! \cond [max_across_proc] \endcond */
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
v_cl
.
max
(
max_disp
);
v_cl
.
execute
();
...
...
@@ -848,7 +848,7 @@ void euler_int(particles & vd, double dt, double & max_disp)
++
part
;
}
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
v_cl
.
max
(
max_disp
);
v_cl
.
execute
();
...
...
@@ -1040,7 +1040,7 @@ int main(int argc, char* argv[])
double
max_disp
;
while
(
t
<=
t_end
)
{
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
timer
it_time
;
/*! \cond [update_verlet] \endcond */
...
...
example/Vector/8_DEM/main.cpp
View file @
2a41cfe6
...
...
@@ -194,7 +194,7 @@ int main(int argc, char* argv[])
#endif
double
mu
=
0.5
;
double
max_vel
;
Vcluster
&
v_cl
=
create_vcluster
();
Vcluster
<>
&
v_cl
=
create_vcluster
();
Box
<
3
,
double
>
domain
({
0.0
,
0.0
,
0.0
},{
17.04
,
6.0
,
6.6
});
Ghost
<
3
,
double
>
g
(
cutoff
+
skin
);
...
...
openfpm_numerics
@
1f2e7ab7
Subproject commit
e9a2083b6c4d9ce84519bc8163fbff032db4ff1c
Subproject commit
1f2e7ab78f971a280cdeba27105beeafd88c7ab1
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