SamW
YaBB Newbies
Offline
Feed your monkey!
Posts: 18
|
Hello Sergei,
If I create a random number in a HyPhy script and then loop it using a bash submission to HYPHYMP, it appears that the seed does not change (i.e. I get the same random number every time. However, if I loop within HyPhy, I get a different random number each time.
For example, I bashed nullrandomtest.h (cut and pasted below msg) using the nullrandomtest.sh bash file (cut and pasted below msg) and I got back 10 identical values. However, when I HYPHYMP the file nullrandomtest_loop.h (cut and pasted below this msg) I get 10 different random numbers.
Am I missing something or is there a way around this?
Respectfully, Sam
nullrandomtest.sh: #!/bin/bash bigcount="0" while [ $bigcount -lt 10 ] do HYPHYMP ./nullrandomtest.h let bigcount=$bigcount+1 done
nullrandomtest.h: test = Random(0,1); fprintf(stdout,test,"\n");
nullrandomtest_loop.h: for(i=0;i<10;i=i+1) { test = Random(0,1); fprintf(stdout,test,"\n"); }
|