123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- #include "mpi_cholesky.h"
- int main(int argc, char **argv)
- {
-
- float ***bmat;
- int rank, nodes, ret;
- double timing, flops;
- #ifndef STARPU_SIMGRID
- int correctness=1;
- #endif
- ret = starpu_mpi_init_conf(&argc, &argv, 1, MPI_COMM_WORLD, NULL);
- STARPU_CHECK_RETURN_VALUE(ret, "starpu_mpi_init_conf");
- starpu_mpi_comm_rank(MPI_COMM_WORLD, &rank);
- starpu_mpi_comm_size(MPI_COMM_WORLD, &nodes);
- starpu_cublas_init();
- parse_args(argc, argv, nodes);
- if (check)
- {
- fprintf(stderr,"can't check in distributed mode\n");
- check = 0;
- }
- matrix_init(&bmat, rank, nodes, 0);
- dw_cholesky(bmat, size/nblocks, rank, nodes, &timing, &flops);
- matrix_free(&bmat, rank, nodes, 0);
- starpu_cublas_shutdown();
- starpu_mpi_shutdown();
- if (rank == 0)
- {
- FPRINTF(stdout, "Computation time (in ms): %2.2f\n", timing/1000);
- FPRINTF(stdout, "Synthetic GFlops : %2.2f\n", (flops/timing/1000.0f));
- }
- return 0;
- }
|