Commit 2907f1ce authored by Edgar Solomonik's avatar Edgar Solomonik
Browse files

Merge branch 'master' of ../ctf-g

parents 54e0f21e d9810b13
No related merge requests found
......@@ -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[] = {NS,AS,NS,NS,NS,NS};
int shapeAS6[] = {AS,AS,NS,AS,AS,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, shapeNS4, 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;
}
......
......@@ -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;
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment