From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Received: by 10.236.133.82 with SMTP id p58mr15937113yhi.37.1394657780963; Wed, 12 Mar 2014 13:56:20 -0700 (PDT) Path: border1.nntp.dca3.giganews.com!backlog4.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!hw13no3885884qab.1!news-out.google.com!bw18ni10198qab.1!nntp.google.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!rt.uk.eu.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: OT: Amusing(!) bug Date: Wed, 12 Mar 2014 21:55:59 +0100 Organization: cbb software GmbH Message-ID: <1dfqs6f9n2kzf.gs2r5jwtcqrl$.dlg@40tude.net> References: Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: cTj7CVEwmZyjrFPUnpIvWg.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 X-Received-Bytes: 1999 X-Received-Body-CRC: 3767143504 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Original-Bytes: 2380 Xref: number.nntp.dca.giganews.com comp.lang.ada:185159 Date: 2014-03-12T21:55:59+01:00 List-Id: On Wed, 12 Mar 2014 20:30:30 +0000 (UTC), tmoran@acm.org wrote: > Seen on a recent FAQ: > >>Q: Why do all workers in my distributed MATLAB jobs (e.g. Monte Carlo >>simulations) use the same sequence of random numbers? >> >>A: By default MATLAB initializes its random number generator at startup >>based on the system time. Since all nodes in the cluster have >>synchronized clocks, if your job starts up simultaneously on multiple >>nodes those jobs will proceed through the same sequence of random numbers. Hmm, the clocks must have extremely poor precision for this to happen. Typically on an Intel board the clock resolution is around few nanoseconds. Without special hardware one could synchronize clocks over the LAN, with tight round trip times, down to microseconds. But clocks deviate at the speed about 5 microseconds per second and must be resynchronized periodically. The explanation given, if true, means that they use the time services brain-dead wrong. However, I have a much simpler theory. The user probably runs his model in the simulation time, which naturally starts at 0 in all nodes... -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de