/*Copyright (c) 2011, Edgar Solomonik, all rights reserved.*/ #include #include #include #include #include #include #include #include #include "../src/shared/util.h" int diag_sym(int const n, CTF_World &dw){ int rank, i, num_pes, pass; int64_t np; double * pairs; int64_t * indices; MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &num_pes); int shapeN4[] = {SY,NS,SY,NS}; int sizeN4[] = {n,n,n,n}; //* Creates distributed tensors initialized with zeros CTF_Tensor A(4, sizeN4, shapeN4, dw); CTF_Tensor B(4, sizeN4, shapeN4, dw); CTF_Tensor C(4, sizeN4, shapeN4, dw); srand48(13*rank); CTF_Matrix mA(n,n,NS,dw); CTF_Matrix mB(n,n,NS,dw); mA.get_local_data(&np, &indices, &pairs); for (i=0; i