Opened 9 months ago

Closed 3 days ago

#2933 closed defect (done)

Parallel experiment execution can lead to identical seeds

Reported by: abeham Owned by: jkarder
Priority: medium Milestone: HeuristicLab 3.3.16
Component: Optimization Version: trunk
Keywords: Cc:

Description (last modified by abeham)

In #2822 it was possible that multiple optimizers in an experiment were started in parallel. This led to problems that many random seeds were initialized to the same value. For instance, if you have 4 algorithms in an experiment and you execute that with 4 workers each run is likely started with the same random seed resulting in identical runs.

To fix the issue it was suggested to introduce a small timelag, e.g. 20ms when starting the workers. This does not impact the performance a lot and should resolve the problem.

The issue is fixed by implementing a static class RandomSeedGenerator which returns one seed after another from a static instance of System.Random that is guarded by a lock.

Change History (7)

comment:1 Changed 8 months ago by jkarder

  • Owner set to jkarder
  • Status changed from new to accepted

comment:2 Changed 8 months ago by jkarder

  • Version set to trunk

r16071: added RandomSeedGenerator

comment:3 Changed 8 months ago by jkarder

  • Owner changed from jkarder to gkronber
  • Status changed from accepted to reviewing

comment:4 Changed 6 weeks ago by gkronber

r16661: use RandomSeedGenerator in CrossValidation

comment:5 Changed 6 weeks ago by gkronber

  • Owner changed from gkronber to jkarder
  • Status changed from reviewing to readytorelease

reviewed r16071. looks good.

comment:6 Changed 6 weeks ago by abeham

  • Description modified (diff)

comment:7 Changed 3 days ago by gkronber

  • Resolution set to done
  • Status changed from readytorelease to closed

r16835: merged r16071 and r16661 from trunk to stable

Note: See TracTickets for help on using tickets.