Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Francois Tessier
TAPIOCA
Commits
6cd428fa
Commit
6cd428fa
authored
Aug 16, 2017
by
Francois Tessier
Browse files
Fix debug messages. Aggregation on HBM working.
parent
8e32bf2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
architectures/linux-sles_12-x86_64/tp_memory.hpp
View file @
6cd428fa
...
...
@@ -7,7 +7,7 @@
#include
"tp_utils.hpp"
#include
"tp_memory_interface.hpp"
#include
<
pmi
.h>
#include
<
hbwmalloc
.h>
class
Memory
:
public
iMemory
{
public:
...
...
@@ -29,12 +29,24 @@ public:
{
case
DDR
:
if
(
this
->
masterRank_
)
{
printMsg
(
DEBUG
,
"Allocate memory on DDR (%s:%d)
\n
"
,
__FILE__
,
__LINE__
);
this
->
buffer_
=
malloc
(
this
->
buffSize_
);
MPI_Win_create
(
this
->
buffer_
,
this
->
buffSize_
,
1
,
MPI_INFO_NULL
,
this
->
comm_
,
&
this
->
RMAWin_
);
}
else
MPI_Win_create
(
NULL
,
0
,
1
,
MPI_INFO_NULL
,
this
->
comm_
,
&
this
->
RMAWin_
);
MPI_Win_fence
(
0
,
this
->
RMAWin_
);
break
;
case
HBM
:
if
(
this
->
masterRank_
)
{
printMsg
(
DEBUG
,
"Allocate memory on HBM (%s:%d)
\n
"
,
__FILE__
,
__LINE__
);
this
->
buffer_
=
hbw_malloc
(
this
->
buffSize_
);
MPI_Win_create
(
this
->
buffer_
,
this
->
buffSize_
,
1
,
MPI_INFO_NULL
,
this
->
comm_
,
&
this
->
RMAWin_
);
}
else
MPI_Win_create
(
NULL
,
0
,
1
,
MPI_INFO_NULL
,
this
->
comm_
,
&
this
->
RMAWin_
);
MPI_Win_fence
(
0
,
this
->
RMAWin_
);
break
;
default:
...
...
@@ -51,8 +63,17 @@ public:
{
case
DDR
:
MPI_Win_free
(
&
this
->
RMAWin_
);
if
(
this
->
masterRank_
)
if
(
this
->
masterRank_
)
{
printMsg
(
DEBUG
,
"Free memory on DDR (%s:%d)
\n
"
,
__FILE__
,
__LINE__
);
free
(
this
->
buffer_
);
}
break
;
case
HBM
:
MPI_Win_free
(
&
this
->
RMAWin_
);
if
(
this
->
masterRank_
)
{
printMsg
(
DEBUG
,
"Free memory on HBM (%s:%d)
\n
"
,
__FILE__
,
__LINE__
);
hbw_free
(
this
->
buffer_
);
}
break
;
default:
printMsg
(
ERROR
,
"Unable to free memory (mem = %s)
\n
"
,
this
->
memName
()
);
...
...
@@ -70,6 +91,7 @@ public:
switch
(
this
->
mem_
)
{
case
DDR
:
case
HBM
:
err
=
MPI_Put
(
srcBuffer
,
srcSize
,
MPI_BYTE
,
destRank
,
offset
,
srcSize
,
MPI_BYTE
,
this
->
RMAWin_
);
break
;
default:
...
...
@@ -87,6 +109,7 @@ public:
switch
(
this
->
mem_
)
{
case
DDR
:
case
HBM
:
err
=
MPI_Get
(
srcBuffer
,
srcSize
,
MPI_BYTE
,
destRank
,
offset
,
srcSize
,
MPI_BYTE
,
this
->
RMAWin_
);
break
;
default:
...
...
@@ -104,6 +127,7 @@ public:
switch
(
this
->
mem_
)
{
case
DDR
:
case
HBM
:
MPI_Win_fence
(
0
,
this
->
RMAWin_
);
break
;
default:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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