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
ee2cb6ae
Commit
ee2cb6ae
authored
Dec 13, 2018
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inducing a crash
parent
e0aef9d0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
10 deletions
+28
-10
example/Vector/7_SPH_dlb_gpu_opt/Makefile
example/Vector/7_SPH_dlb_gpu_opt/Makefile
+2
-2
example/Vector/7_SPH_dlb_gpu_opt/main.cu
example/Vector/7_SPH_dlb_gpu_opt/main.cu
+3
-3
src/Vector/cuda/vector_dist_cuda_func_test.cu
src/Vector/cuda/vector_dist_cuda_func_test.cu
+19
-1
src/Vector/cuda/vector_dist_cuda_funcs.cuh
src/Vector/cuda/vector_dist_cuda_funcs.cuh
+4
-4
No files found.
example/Vector/7_SPH_dlb_gpu_opt/Makefile
View file @
ee2cb6ae
...
...
@@ -12,10 +12,10 @@ sph_dlb_test: OPT += -DTEST_RUN
sph_dlb_test
:
sph_dlb
%.o
:
%.cu
nvcc
-O
3
-g
-c
-isystem
=
/home/i-bird/MPI/include
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH_NVCC)
nvcc
-O
0
-g
-c
-isystem
=
/home/i-bird/MPI/include
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH_NVCC)
%.o
:
%.cpp
$(CC)
-O
3
$(OPT)
-g
-c
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH)
$(CC)
-O
0
$(OPT)
-g
-c
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH)
sph_dlb
:
$(OBJ)
$(CC)
-o
$@
$^
$(CFLAGS)
$(LIBS_PATH)
$(LIBS)
...
...
example/Vector/7_SPH_dlb_gpu_opt/main.cu
View file @
ee2cb6ae
...
...
@@ -390,7 +390,7 @@ template<typename CellList> inline void calc_forces(particles & vd, CellList & N
vd
.
merge_sort
<
force
,
drho
,
red
>
(
NN
);
max_visc
=
reduce
<
red
,
_max_
>
(
vd
);
max_visc
=
reduce
_local
<
red
,
_max_
>
(
vd
);
}
template
<
typename
vector_type
>
...
...
@@ -412,8 +412,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
);
...
...
src/Vector/cuda/vector_dist_cuda_func_test.cu
View file @
ee2cb6ae
...
...
@@ -1094,10 +1094,28 @@ void vector_dist_remove_marked_type()
// Boundary conditions
size_t
bc
[
3
]
=
{
PERIODIC
,
PERIODIC
,
PERIODIC
};
vector_dist_gpu
<
3
,
float
,
aggregate
<
float
,
float
,
int
,
int
>>
vd
(
5000
*
v_cl
.
size
(),
domain
,
bc
,
g
);
vector_dist_gpu
<
3
,
float
,
aggregate
<
float
,
float
,
int
,
int
>>
vd
(
50000
*
v_cl
.
size
(),
domain
,
bc
,
g
);
// Fill the position
auto
it
=
vd
.
getDomainIterator
();
while
(
it
.
isNext
())
{
auto
p
=
it
.
get
();
vd
.
getPos
(
p
)[
0
]
=
(
float
)
rand
()
/
RAND_MAX
;
vd
.
getPos
(
p
)[
1
]
=
(
float
)
rand
()
/
RAND_MAX
;
vd
.
getPos
(
p
)[
2
]
=
(
float
)
rand
()
/
RAND_MAX
;
++
it
;
}
vd
.
map
();
vd
.
template
ghost_get
<
>();
it
=
vd
.
getDomainIterator
();
float
fc
=
1.0
;
float
dc
=
1.0
;
int
ic
=
1
;
...
...
src/Vector/cuda/vector_dist_cuda_funcs.cuh
View file @
ee2cb6ae
...
...
@@ -104,11 +104,11 @@ __global__ void find_buffer_offsets(vector_type vd, int * cnt, vector_type_offs
}
template
<
unsigned
int
prp_off
,
typename
vector_type
,
typename
vector_type_offs
>
__global__
void
find_buffer_offsets_no_prc
(
vector_type
vd
,
int
*
cnt
,
vector_type_offs
offs
)
__global__
void
find_buffer_offsets_no_prc
(
vector_type
vd
,
int
*
cnt
,
vector_type_offs
offs
,
int
g_m
)
{
int
p
=
threadIdx
.
x
+
blockIdx
.
x
*
blockDim
.
x
;
if
(
p
>=
(
int
)
vd
.
size
()
-
1
)
return
;
if
(
p
>=
(
int
)
g_m
-
1
)
return
;
if
(
vd
.
template
get
<
prp_off
>(
p
)
!=
vd
.
template
get
<
prp_off
>(
p
+
1
))
{
...
...
@@ -367,12 +367,12 @@ void remove_marked(vector_type & vd)
// mark point, particle that stay and to remove
find_buffer_offsets_no_prc
<
prp
,
decltype
(
vd
.
getPropVector
().
toKernel
()),
decltype
(
mark
.
toKernel
())
><<<
ite
.
wthr
,
ite
.
thr
>>>
(
vd
.
getPropVector
().
toKernel
(),(
int
*
)
mem
.
getDevicePointer
(),
mark
.
toKernel
());
(
vd
.
getPropVector
().
toKernel
(),(
int
*
)
mem
.
getDevicePointer
(),
mark
.
toKernel
()
,
vd
.
size_local
()
);
mem
.
deviceToHost
();
// we have no particles to remove
if
(
*
(
int
*
)
mem
.
getPointer
()
==
0
)
if
(
*
(
int
*
)
mem
.
getPointer
()
!=
1
)
{
return
;}
// Get the mark point
...
...
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