Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Philippe SWARTVAGHER
memory-contention
Commits
18177375
Commit
18177375
authored
Nov 29, 2021
by
Philippe SWARTVAGHER
Browse files
Fix error when --bind_memory_comp is not given
parent
ba033659
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/openmp_memset.c
View file @
18177375
...
...
@@ -125,7 +125,9 @@ static int memset_init()
#pragma omp parallel for
for
(
int
i
=
0
;
i
<
nb_threads
;
i
++
)
{
a
[
i
]
=
data_malloc
(
array_size
*
sizeof
(
MEMSET_TYPE
),
get_numa_node_comp_for_id
(
i
%
params
.
memory_comp_numa_nodes_nb
));
a
[
i
]
=
data_malloc
(
array_size
*
sizeof
(
MEMSET_TYPE
),
params
.
memory_comp_numa_nodes_nb
==
0
?
-
1
:
get_numa_node_comp_for_id
(
i
%
params
.
memory_comp_numa_nodes_nb
));
for
(
int
j
=
0
;
j
<
array_size
;
j
++
)
{
...
...
@@ -298,7 +300,10 @@ static void memset_release()
{
for
(
int
i
=
0
;
i
<
nb_threads
;
i
++
)
{
data_free
(
a
[
i
],
array_size
*
sizeof
(
MEMSET_TYPE
),
get_numa_node_comp_for_id
(
i
%
params
.
memory_comp_numa_nodes_nb
));
data_free
(
a
[
i
],
array_size
*
sizeof
(
MEMSET_TYPE
),
params
.
memory_comp_numa_nodes_nb
==
0
?
-
1
:
get_numa_node_comp_for_id
(
i
%
params
.
memory_comp_numa_nodes_nb
));
}
free
(
a
);
...
...
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