17 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
18 MPI_Comm_size(MPI_COMM_WORLD, &num_pes);
22 int nnnnnn[] = {n,n,n,n,n,n};
23 int shapeNS4[] = {
NS,
NS,
NS,NS};
24 int nnnn[] = {n,n,n,n};
27 Tensor<> W(4, nnnn, shapeNS4, dw,
"W", 1);
28 Tensor<> T(4, nnnn, shapeNS4, dw,
"T", 1);
29 Tensor<> Z(6, nnnnnn, shapeNS6, dw,
"Z", 1);
31 Z[
"hijmno"] += W[
"hijk"]*T[
"kmno"];
39 char ** itr = std::find(begin, end, option);
40 if (itr != end && ++itr != end){
47 int main(
int argc,
char ** argv){
49 int const in_num = argc;
50 char ** input_str = argv;
52 MPI_Init(&argc, &argv);
53 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
54 MPI_Comm_size(MPI_COMM_WORLD, &np);
57 n = atoi(
getCmdOption(input_str, input_str+in_num,
"-n"));
61 if (
getCmdOption(input_str, input_str+in_num,
"-niter")){
62 niter = atoi(
getCmdOption(input_str, input_str+in_num,
"-niter"));
63 if (niter < 0) niter = 3;
char * getCmdOption(char **begin, char **end, const std::string &option)
an instance of the CTF library (world) on a MPI communicator
int ccsdt_map_test(int n, World &dw)
an instance of a tensor within a CTF world
int main(int argc, char **argv)