Skip to content
Snippets Groups Projects
Select Git revision
  • e5e58f1cad7bddeeb861fcbc05917ef9bef94ddd
  • 2023 default protected
2 results

MATLAB-2023a-GCCcore-11.3.0.eb

Blame
  • task2.c 436 B
    #include <mpi.h>
    #include <stdio.h>
    
    int main(int argc, char** argv) {
        MPI_Init(NULL, NULL);
    
        int world_size;
        MPI_Comm_size(MPI_COMM_WORLD, &world_size);
    
        int world_rank;
        MPI_Comm_rank(MPI_COMM_WORLD, &world_rank);
        
    /**This segment will need to be filled by the participants.**/
        //TODO:  
    
        if (world_rank == 0) {
            printf("Global sum: %f\n", global_sum);
        }
    
        MPI_Finalize();
        return 0;
    }