Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pairs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
software
pairs
Commits
fdda6f89
Commit
fdda6f89
authored
2 years ago
by
Rafael Ravedutti
Browse files
Options
Downloads
Patches
Plain Diff
Debug communication buffers
Signed-off-by:
Rafael Ravedutti
<
rafaelravedutti@gmail.com
>
parent
efa97a25
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
runtime/pairs.hpp
+52
-0
52 additions, 0 deletions
runtime/pairs.hpp
with
52 additions
and
0 deletions
runtime/pairs.hpp
+
52
−
0
View file @
fdda6f89
...
...
@@ -26,6 +26,8 @@
#endif
#define PAIRS_ERROR(...) fprintf(stderr, __VA_ARGS__)
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define MAX(a,b) ((a) > (b) ? (a) : (b))
namespace
pairs
{
...
...
@@ -527,6 +529,56 @@ public:
real_t
*
recv_buf
,
const
int
*
recv_offsets
,
const
int
*
nrecv
)
{
this
->
getDomainPartitioner
()
->
communicateData
(
dim
,
elem_size
,
send_buf
,
send_offsets
,
nsend
,
recv_buf
,
recv_offsets
,
nrecv
);
const
int
elems_to_print
=
5
;
// Send buffer debug
for
(
int
i
=
0
;
i
<
2
;
i
++
)
{
int
nsnd
=
nsend
[
dim
*
2
+
i
];
PAIRS_DEBUG
(
"send_buf=["
);
for
(
int
j
=
0
;
j
<
MIN
(
elems_to_print
,
nsnd
);
j
++
)
{
for
(
int
k
=
0
;
k
<
elem_size
;
k
++
)
{
PAIRS_DEBUG
(
"%f,"
,
send_buf
[(
send_offsets
[
dim
*
2
+
i
]
+
j
)
*
elem_size
+
k
]);
}
}
if
(
elems_to_print
*
2
<
nsnd
)
{
PAIRS_DEBUG
(
"
\b
... "
);
}
for
(
int
j
=
MAX
(
elems_to_print
,
nsnd
-
elems_to_print
);
j
<
nsnd
;
j
++
)
{
for
(
int
k
=
0
;
k
<
elem_size
;
k
++
)
{
PAIRS_DEBUG
(
"%f,"
,
send_buf
[(
send_offsets
[
dim
*
2
+
i
]
+
j
)
*
elem_size
+
k
]);
}
}
PAIRS_DEBUG
(
"
\b
]
\n
"
);
}
// Receive buffer debug
for
(
int
i
=
0
;
i
<
2
;
i
++
)
{
int
nrec
=
nrecv
[
dim
*
2
+
i
];
PAIRS_DEBUG
(
"recv_buf=["
);
for
(
int
j
=
0
;
j
<
MIN
(
elems_to_print
,
nrec
);
j
++
)
{
for
(
int
k
=
0
;
k
<
elem_size
;
k
++
)
{
PAIRS_DEBUG
(
"%f,"
,
recv_buf
[(
recv_offsets
[
dim
*
2
+
i
]
+
j
)
*
elem_size
+
k
]);
}
}
if
(
elems_to_print
*
2
<
nrec
)
{
PAIRS_DEBUG
(
"
\b
... "
);
}
for
(
int
j
=
MAX
(
elems_to_print
,
nrec
-
elems_to_print
);
j
<
nrec
;
j
++
)
{
for
(
int
k
=
0
;
k
<
elem_size
;
k
++
)
{
PAIRS_DEBUG
(
"%f,"
,
recv_buf
[(
recv_offsets
[
dim
*
2
+
i
]
+
j
)
*
elem_size
+
k
]);
}
}
PAIRS_DEBUG
(
"
\b
]
\n
"
);
}
}
void
fillCommunicationArrays
(
int
neighbor_ranks
[],
int
pbc
[],
real_t
subdom
[])
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment