[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [modeller_usage] Identical output for different batches



On 6/6/20 3:00 AM, ZHANG Cheng wrote:
Thank you very much! Does it mean that I need to change "env = environ()" to e.g. "env = environ(rand_seed=-81)", or "env = environ(rand_seed=-775)", just anything that between -2 and -50000?

Yes.

That is doable. But I have 100 jobs to run. In order to have the same code for different jobs, can I do like this?

random_integer = random.randint(-50000, -2)
env = environ(rand_seed=random_integer)

I wouldn't recommend this as there's a small but non-zero chance of multiple jobs getting the same seed. Normally we use an environment variable that is guaranteed to be different for each run. For example if you run your jobs as tasks with something based on Sun Grid Engine (SGE)
this environment variable would be $SGE_TASK_ID.

	Ben Webb, Modeller Caretaker
--
             https://salilab.org/modeller/
Modeller mail list: https://salilab.org/mailman/listinfo/modeller_usage