title: Why won't node zero execute some of the write statements to a log file
body: <p>I have a production job where I use two nodes (0=master and 1=slave) via OPENMPI and all the threads on each node via OPENMP.</p>
  <p>I submit the job on the master.<br />
  Job opens a disk file on master to log some info.  ( I see same file is opened on slave as well during the run)</p>
  <p>I have statements like</p>
  <pre><code>write(lu,*) 'pid=',pid,' some text'
  </code></pre>
  <p>and</p>
  <pre><code>write(6, *) 'pid=',pid,' some text'
  </code></pre>
  <p>one after the other.  (unit 6 is the stdout -screen- in gfortran).
  I see on screen that both statements are printed one after the other ( pid=0 and pid=1 ).<br />
  Strangely enough  most (not all) of master prints (pid=0) on the log file are absent.</p>
  <p>This is puzzling.  I would like to learn the rule. I thought both master and slave share the logfile.</p>
  <p>I have a host file with two hosts each requesting 32 threads ( via slots and max-slots commands )  and I am running the following command as a script</p>
  <pre><code>miprun --hostfile hostfile --map-by node:pe32  myexecutable
  </code></pre>
  <p>I will appreciate if some expert can shed light on the issue.</p>