Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
cc4s
Cyclops Tensor Framework
Commits
a092db6d
Commit
a092db6d
authored
11 years ago
by
Ducky
Browse files
Options
Download
Email Patches
Plain Diff
Add clean-up, add more debugging spam
parent
ee5d2f19
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
include/ctf.hpp
include/ctf.hpp
+7
-0
src/interface/ctf_schedule.cxx
src/interface/ctf_schedule.cxx
+9
-3
No files found.
include/ctf.hpp
View file @
a092db6d
...
...
@@ -1210,6 +1210,13 @@ public:
*/
int
dependency_left
;
/**
* Debugging Helpers
*/
const
char
*
name
()
{
return
lhs
->
parent
->
name
;
}
protected:
tCTF_TensorOperationTypes
op
;
tCTF_Idx_Tensor
<
dtype
>*
lhs
;
...
...
This diff is collapsed.
Click to expand it.
src/interface/ctf_schedule.cxx
View file @
a092db6d
...
...
@@ -45,8 +45,6 @@ void tCTF_Schedule<dtype>::partition_and_execute() {
MPI_Comm_rank
(
world
->
comm
,
&
rank
);
MPI_Comm_size
(
world
->
comm
,
&
size
);
std
::
cout
<<
rank
<<
" / "
<<
size
<<
" partition_execute"
<<
std
::
endl
;
// Partition operations into worlds, and do split
std
::
vector
<
tCTF_PartitionOps
<
dtype
>
>
comm_ops
;
// operations for each subcomm
int
my_color
=
rank
%
ready_tasks
.
size
();
...
...
@@ -100,7 +98,7 @@ void tCTF_Schedule<dtype>::partition_and_execute() {
// Run my tasks
if
(
comm_ops
.
size
()
>
my_color
)
{
for
(
auto
&
op
:
comm_ops
[
my_color
].
ops
)
{
std
::
cout
<<
rank
<<
"Exec
"
<<
std
::
endl
;
std
::
cout
<<
rank
<<
"Exec
"
<<
op
->
name
()
<<
std
::
endl
;
op
->
execute
(
&
comm_ops
[
my_color
].
remap
);
}
}
...
...
@@ -112,6 +110,14 @@ void tCTF_Schedule<dtype>::partition_and_execute() {
}
}
// Clean up local tensors & world
if
(
comm_ops
.
size
()
>
my_color
)
{
for
(
auto
&
local_tensor
:
comm_ops
[
my_color
].
local_tensors
)
{
delete
local_tensor
;
}
delete
comm_ops
[
my_color
].
world
;
}
// Update ready tasks
for
(
auto
&
comm_op
:
comm_ops
)
{
for
(
auto
&
op
:
comm_op
.
ops
)
{
...
...
This diff is collapsed.
Click to expand it.
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