Professional Documents
Culture Documents
}
lock Advantage
lock Lock
lock Bucket • Take a block of entries called bucket and
associate a lock with that bucket, now
cache can be used
Dis Advantage
}
Th-1 Th-2
So here what it says … hist[1] ++ hist[2] ++
Following memory update, will be perform
atomically, for this memory location These are 2 different memory
location, hence allowed
/* Histogram Updation with atomic */
#define INP_SIZE (1 <<26)
----- #define HIST_SIZE (1<<20)
mpicc in C
mpic++ or mpixx in C++
Note: -np is for number of processors. While running the program in the multiple
machines it is neccessary to store all files at the same location in all machines.
MPI Basic function/subroutine
#include <mpi.h>