Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TurTLE
TurTLE
Commits
2c9f5a9f
Commit
2c9f5a9f
authored
Mar 11, 2020
by
Berenger Bramas
Browse files
Debug when partitioning rhs in P2P distr
parent
10fcb49b
Changes
2
Hide whitespace changes
Inline
Side-by-side
cpp/particles/p2p_distr_mpi.hpp
View file @
2c9f5a9f
...
...
@@ -277,7 +277,7 @@ public:
void
compute_distr
(
computer_class
&
in_computer
,
const
partsize_t
current_my_nb_particles_per_partition
[],
real_number
particles_positions
[],
real_number
particles_current_rhs
[],
std
::
unique_ptr
<
real_number
[]
>
particles_current_rhs
[],
const
int
nb_rhs
,
partsize_t
inout_index_particles
[]){
TIMEZONE
(
"compute_distr"
);
...
...
@@ -341,12 +341,14 @@ public:
part_to_sort
.
data
(),
particles_positions
,
&
buffer
);
permute_copy
<
real_number
,
size_particle_rhs
>
(
current_offset_particles_for_partition
[
idxPartition
],
current_my_nb_particles_per_partition
[
idxPartition
],
part_to_sort
.
data
(),
particles_current_rhs
,
&
buffer
);
for
(
int
idx_rhs
=
0
;
idx_rhs
<
nb_rhs
;
++
idx_rhs
){
permute_copy
<
real_number
,
size_particle_rhs
>
(
current_offset_particles_for_partition
[
idxPartition
],
current_my_nb_particles_per_partition
[
idxPartition
],
part_to_sort
.
data
(),
particles_current_rhs
[
idx_rhs
].
get
(),
&
buffer
);
}
permute_copy
<
partsize_t
,
1
>
(
current_offset_particles_for_partition
[
idxPartition
],
current_my_nb_particles_per_partition
[
idxPartition
],
...
...
@@ -681,7 +683,7 @@ public:
&
descriptor
.
results
[(
idxPart
+
idx_p1
)
*
size_particle_rhs
],
inout_index_particles
[((
*
neighbors
[
idx_neighbor
])[
idx_2
].
first
+
idx_p2
)],
&
particles_positions
[((
*
neighbors
[
idx_neighbor
])[
idx_2
].
first
+
idx_p2
)
*
size_particle_positions
],
&
particles_current_rhs
[((
*
neighbors
[
idx_neighbor
])[
idx_2
].
first
+
idx_p2
)
*
size_particle_rhs
],
&
particles_current_rhs
[
0
][
((
*
neighbors
[
idx_neighbor
])[
idx_2
].
first
+
idx_p2
)
*
size_particle_rhs
],
dist_r2
,
cutoff_radius_compute
,
shift
[
idx_neighbor
][
IDXC_X
],
...
...
@@ -730,7 +732,7 @@ public:
NeighborDescriptor
&
descriptor
=
neigDescriptors
[
releasedAction
.
second
];
assert
(
descriptor
.
isRecv
==
false
);
assert
(
descriptor
.
toRecvAndMerge
!=
nullptr
);
computer_thread
.
template
reduce_particles_rhs
<
size_particle_rhs
>(
&
particles_current_rhs
[
particles_offset_layers
[
my_nb_cell_levels
-
descriptor
.
nbLevelsToExchange
]
*
size_particle_rhs
],
computer_thread
.
template
reduce_particles_rhs
<
size_particle_rhs
>(
&
particles_current_rhs
[
0
][
particles_offset_layers
[
my_nb_cell_levels
-
descriptor
.
nbLevelsToExchange
]
*
size_particle_rhs
],
descriptor
.
toRecvAndMerge
.
get
(),
descriptor
.
nbParticlesToExchange
);
delete
[]
descriptor
.
toRecvAndMerge
.
release
();
}
...
...
@@ -770,10 +772,10 @@ public:
computer_thread
.
template
compute_interaction
<
size_particle_positions
,
size_particle_rhs
>(
inout_index_particles
[(
intervals
[
idx_1
].
first
+
idx_p1
)],
&
particles_positions
[(
intervals
[
idx_1
].
first
+
idx_p1
)
*
size_particle_positions
],
&
particles_current_rhs
[(
intervals
[
idx_1
].
first
+
idx_p1
)
*
size_particle_rhs
],
&
particles_current_rhs
[
0
][
(
intervals
[
idx_1
].
first
+
idx_p1
)
*
size_particle_rhs
],
inout_index_particles
[(
intervals
[
idx_1
].
first
+
idx_p2
)],
&
particles_positions
[(
intervals
[
idx_1
].
first
+
idx_p2
)
*
size_particle_positions
],
&
particles_current_rhs
[(
intervals
[
idx_1
].
first
+
idx_p2
)
*
size_particle_rhs
],
&
particles_current_rhs
[
0
][
(
intervals
[
idx_1
].
first
+
idx_p2
)
*
size_particle_rhs
],
dist_r2
,
cutoff_radius_compute
,
0
,
0
,
0
);
}
}
...
...
@@ -794,10 +796,10 @@ public:
computer_thread
.
template
compute_interaction
<
size_particle_positions
,
size_particle_rhs
>(
inout_index_particles
[(
intervals
[
idx_1
].
first
+
idx_p1
)],
&
particles_positions
[(
intervals
[
idx_1
].
first
+
idx_p1
)
*
size_particle_positions
],
&
particles_current_rhs
[(
intervals
[
idx_1
].
first
+
idx_p1
)
*
size_particle_rhs
],
&
particles_current_rhs
[
0
][
(
intervals
[
idx_1
].
first
+
idx_p1
)
*
size_particle_rhs
],
inout_index_particles
[(
intervals
[
idx_2
].
first
+
idx_p2
)],
&
particles_positions
[(
intervals
[
idx_2
].
first
+
idx_p2
)
*
size_particle_positions
],
&
particles_current_rhs
[(
intervals
[
idx_2
].
first
+
idx_p2
)
*
size_particle_rhs
],
&
particles_current_rhs
[
0
][
(
intervals
[
idx_2
].
first
+
idx_p2
)
*
size_particle_rhs
],
dist_r2
,
cutoff_radius_compute
,
0
,
0
,
0
);
}
}
...
...
@@ -830,10 +832,10 @@ public:
computer_thread
.
template
compute_interaction
<
size_particle_positions
,
size_particle_rhs
>(
inout_index_particles
[(
intervals
[
idx_1
].
first
+
idx_p1
)],
&
particles_positions
[(
intervals
[
idx_1
].
first
+
idx_p1
)
*
size_particle_positions
],
&
particles_current_rhs
[(
intervals
[
idx_1
].
first
+
idx_p1
)
*
size_particle_rhs
],
&
particles_current_rhs
[
0
][
(
intervals
[
idx_1
].
first
+
idx_p1
)
*
size_particle_rhs
],
inout_index_particles
[((
*
neighbors
[
idx_neighbor
])[
idx_2
].
first
+
idx_p2
)],
&
particles_positions
[((
*
neighbors
[
idx_neighbor
])[
idx_2
].
first
+
idx_p2
)
*
size_particle_positions
],
&
particles_current_rhs
[((
*
neighbors
[
idx_neighbor
])[
idx_2
].
first
+
idx_p2
)
*
size_particle_rhs
],
&
particles_current_rhs
[
0
][
((
*
neighbors
[
idx_neighbor
])[
idx_2
].
first
+
idx_p2
)
*
size_particle_rhs
],
dist_r2
,
cutoff_radius_compute
,
shift
[
idx_neighbor
][
IDXC_X
],
shift
[
idx_neighbor
][
IDXC_Y
],
shift
[
idx_neighbor
][
IDXC_Z
]);
}
}
...
...
cpp/particles/particles_system.hpp
View file @
2c9f5a9f
...
...
@@ -279,7 +279,7 @@ public:
TIMEZONE
(
"particles_system::compute_p2p"
);
distr_p2p
.
template
compute_distr
<
p2p_computer_class
,
size_particle_positions
,
size_particle_rhs
>(
computer_p2p
,
current_my_nb_particles_per_partition
.
get
(),
my_particles_positions
.
get
(),
my_particles_rhs
.
front
().
get
(
),
my_particles_positions
.
get
(),
my_particles_rhs
.
data
(),
int
(
my_particles_rhs
.
size
()
),
my_particles_positions_indexes
.
get
());
}
}
...
...
Write
Preview
Supports
Markdown
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