I use some random numbers as initial values for my 'metaheuristics optimization' calculations. I run my same optimization program on different computers using MPI. I surprisingly obtained a lot of same results. For example I use 40 host computers, the results have few different values. Almost 6-7 values are the same. Actually, my results can be similar but they must not be same because I give random numbers as initials to them in the beginning of program (In my above example I must get 40 different values). If I run the program repeatedly and sequentially on a same computer, it produces different results as it should be.
I suspect that this situation is caused by insufficient quality of random number generation. How can I solve this problem. I open other ideas, may be different things cause this problem.
P. S. I use srand( (unsigned) time(NULL) )
once in the beginning of my program for generating random-like numbers. Then, I generate my random numbers in the range of [0, 1] by using (float)rand()/32767
One example of my results which I complained:
15.42161751
19.83328438
3.43446541
23.50453377
23.50453377
3.43446541
19.83328438
23.50453377
3.43446541
7.52127457
7.52127457
23.50453377
7.52127457
7.52127457
23.50453377
19.83328438
19.83328438
19.83328438
7.52127457
15.42161751
3.43446541
19.83328438
19.83328438
15.42161751
23.50453377
23.50453377
5.29145241
19.83328438
19.83328438
19.83328438
19.83328438
7.52127457
23.50453377
3.43446541
19.83328438
23.50453377
7.52127457
3.43446541
7.52127457
5.29145241