Hello, I would welcome some help to this problem. I am trying to have a random no generator in a way that will create random no different for each process in the MPI run. I tried to seed with something that will take the rank of the process as below so I can take different numbers but are the same every time I run the program.
HOW CAN I TAKE DIFFERENT?
Many thanks on behalf
int main(int argc, char *argv)
seed = 123456789 + id*100;
random_val = (double)rand()/(double)RAND_MAX;
printf("Hello, world from process number %d with rand no %f\n", id, random_val);