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
2907f1ce
Commit
2907f1ce
authored
11 years ago
by
Edgar Solomonik
Browse files
Options
Download
Plain Diff
Merge branch 'master' of ../ctf-g
parents
54e0f21e
d9810b13
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
13 deletions
+12
-13
examples/ccsdt_map_test.cxx
examples/ccsdt_map_test.cxx
+5
-3
src/dist_tensor/dist_tensor_map.cxx
src/dist_tensor/dist_tensor_map.cxx
+5
-5
src/dist_tensor/dt_aux_permute.hxx
src/dist_tensor/dt_aux_permute.hxx
+2
-5
No files found.
examples/ccsdt_map_test.cxx
View file @
2907f1ce
...
...
@@ -25,15 +25,17 @@ int ccsdt_map_test(int const n,
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
rank
);
MPI_Comm_size
(
MPI_COMM_WORLD
,
&
num_pes
);
int
shapeAS6
[]
=
{
N
S
,
AS
,
NS
,
N
S
,
N
S
,
NS
};
int
shapeAS6
[]
=
{
A
S
,
AS
,
NS
,
A
S
,
A
S
,
NS
};
int
mmmnnn
[]
=
{
m
,
m
,
m
,
n
,
n
,
n
};
int
shapeNS4
[]
=
{
NS
,
NS
,
NS
,
NS
};
int
mnmn
[]
=
{
m
,
n
,
m
,
n
};
//* Creates distributed tensors initialized with zeros
CTF_
Matrix
W
(
n
,
n
,
NS
,
dw
,
"W"
,
1
);
CTF_
Tensor
W
(
4
,
mnmn
,
shape
NS
4
,
dw
,
"W"
,
1
);
CTF_Tensor
T
(
6
,
mmmnnn
,
shapeAS6
,
dw
,
"T"
,
1
);
CTF_Tensor
Z
(
6
,
mmmnnn
,
shapeAS6
,
dw
,
"Z"
,
1
);
Z
[
"
abcijk
"
]
+=
W
[
"
mj
"
]
*
T
[
"
abcimk
"
];
Z
[
"
612745
"
]
+=
W
[
"
6307
"
]
*
T
[
"
012345
"
];
return
1
;
}
...
...
This diff is collapsed.
Click to expand it.
src/dist_tensor/dist_tensor_map.cxx
View file @
2907f1ce
...
...
@@ -156,8 +156,8 @@ int dist_tensor<dtype>::map_tensor_pair( const int tid_A,
uint64_t
size
;
uint64_t
min_size
=
UINT64_MAX
;
/* Attempt to map to all possible permutations of processor topology */
for
(
i
=
global_comm
.
rank
;
i
<
2
*
(
int
)
topovec
.
size
();
i
+=
global_comm
.
np
){
//
for (i=global_comm.rank*topovec.size(); i<(int)topovec.size(); i++){
//
for (i=global_comm.rank; i<2*(int)topovec.size(); i+=global_comm.np){
for
(
i
=
global_comm
.
rank
*
topovec
.
size
();
i
<
(
int
)
topovec
.
size
();
i
++
){
clear_mapping
(
tsr_A
);
clear_mapping
(
tsr_B
);
set_padding
(
tsr_A
);
...
...
@@ -544,7 +544,7 @@ int dist_tensor<dtype>::
if
(
!
check_self_mapping
(
tid_B
,
idx_B
))
pass
=
0
;
if
(
pass
==
0
)
DPRINTF
(
3
,
"failed confirmation here
\n
"
);
DPRINTF
(
4
,
"failed confirmation here
\n
"
);
for
(
i
=
0
;
i
<
ndim_tot
;
i
++
){
iA
=
idx_arr
[
2
*
i
];
...
...
@@ -552,7 +552,7 @@ int dist_tensor<dtype>::
if
(
iA
!=
-
1
&&
iB
!=
-
1
)
{
if
(
!
comp_dim_map
(
&
tsr_A
->
edge_map
[
iA
],
&
tsr_B
->
edge_map
[
iB
])){
pass
=
0
;
DPRINTF
(
3
,
"failed confirmation here i=%d
\n
"
,
i
);
DPRINTF
(
4
,
"failed confirmation here i=%d
\n
"
,
i
);
}
}
if
(
iA
!=
-
1
)
{
...
...
@@ -1186,7 +1186,7 @@ int dist_tensor<dtype>::map_tensors(CTF_ctr_type_t const * type,
if
(
comm_vol
<
bcomm_vol
)
{
bcomm_vol
=
comm_vol
;
bmemuse
=
memuse
;
bnvirt
=
nvirt
;
bnvirt
=
1
;
//
nvirt;
btopo
=
6
*
i
+
j
;
}
delete
sctr
;
...
...
This diff is collapsed.
Click to expand it.
src/dist_tensor/dt_aux_permute.hxx
View file @
2907f1ce
...
...
@@ -2546,9 +2546,6 @@ int cyclic_reshuffle(int const ndim,
old_nvirt
=
1
;
old_np
=
1
;
new_np
=
1
;
if
(
ord_glb_comm
.
rank
==
0
){
DPRINTF
(
3
,
"is_cyclic = %d, was_cyclic = %d
\n
"
,
is_cyclic
,
was_cyclic
);
}
idx_lyr
=
ord_glb_comm
.
rank
;
for
(
i
=
0
;
i
<
ndim
;
i
++
)
{
buf_lda
[
i
]
=
nbuf
;
...
...
@@ -2953,7 +2950,7 @@ void block_reshuffle(int const ndim,
blk_idx
+=
(
idx
[
i
]
+
new_rank
[
i
]
*
new_virt_dim
[
i
])
*
phase_lda
[
i
];
prc_idx
+=
((
idx
[
i
]
+
new_rank
[
i
]
*
new_virt_dim
[
i
])
/
old_virt_dim
[
i
])
*
old_pe_lda
[
i
];
}
DPRINTF
(
3
,
"proc %d receiving blk %d (loc %d, size "
PRId64
") from proc %d
\n
"
,
DPRINTF
(
4
,
"proc %d receiving blk %d (loc %d, size "
PRId64
") from proc %d
\n
"
,
glb_comm
.
rank
,
blk_idx
,
loc_idx
,
blk_sz
,
prc_idx
);
MPI_Irecv
(
tsr_cyclic_data
+
loc_idx
*
blk_sz
,
blk_sz
*
sizeof
(
dtype
),
MPI_CHAR
,
prc_idx
,
blk_idx
,
glb_comm
.
cm
,
reqs
+
loc_idx
);
...
...
@@ -2980,7 +2977,7 @@ void block_reshuffle(int const ndim,
blk_idx
+=
(
idx
[
i
]
+
old_rank
[
i
]
*
old_virt_dim
[
i
])
*
phase_lda
[
i
];
prc_idx
+=
((
idx
[
i
]
+
old_rank
[
i
]
*
old_virt_dim
[
i
])
/
new_virt_dim
[
i
])
*
new_pe_lda
[
i
];
}
DPRINTF
(
3
,
"proc %d sending blk %d (loc %d) to proc %d
\n
"
,
DPRINTF
(
4
,
"proc %d sending blk %d (loc %d) to proc %d
\n
"
,
glb_comm
.
rank
,
blk_idx
,
loc_idx
,
prc_idx
);
MPI_Isend
(
tsr_data
+
loc_idx
*
blk_sz
,
blk_sz
*
sizeof
(
dtype
),
MPI_CHAR
,
prc_idx
,
blk_idx
,
glb_comm
.
cm
,
reqs
+
num_new_virt
+
loc_idx
);
...
...
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