Free cookie consent management tool by TermsFeed Policy Generator

Opened 6 years ago

Closed 5 years 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 6 years ago by jkarder

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

comment:2 Changed 6 years ago by jkarder

  • Version set to trunk

r16071: added RandomSeedGenerator

comment:3 Changed 6 years ago by jkarder

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

comment:4 Changed 5 years ago by gkronber

r16661: use RandomSeedGenerator in CrossValidation

comment:5 Changed 5 years ago by gkronber

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

reviewed r16071. looks good.

comment:6 Changed 5 years ago by abeham

  • Description modified (diff)

comment:7 Changed 5 years 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.