¡@

Home 

c++ Programming Glossary: hostrank

Creating a counter that stays synchronized across MPI processes

http://stackoverflow.com/questions/4948788/creating-a-counter-that-stays-synchronized-across-mpi-processes

#include unistd.h struct mpi_counter_t MPI_Win win int hostrank int myval int data int rank size struct mpi_counter_t create_counter.. data int rank size struct mpi_counter_t create_counter int hostrank struct mpi_counter_t count count struct mpi_counter_t malloc.. mpi_counter_t malloc sizeof struct mpi_counter_t count hostrank hostrank MPI_Comm_rank MPI_COMM_WORLD count rank MPI_Comm_size..