<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<blockquote cite="mid:mailman.0.1251269949.22131.pw_forum@pwscf.org"
 type="cite">
  <hr size="4" width="90%"><br>
  <table class="header-part1" border="0" cellpadding="0" cellspacing="0"
 width="100%">
    <tbody>
      <tr>
        <td>
        <div class="headerdisplayname" style="display: inline;">Sujet: </div>
Re: [Pw_forum] output redirection with gipaw.x</td>
      </tr>
      <tr>
        <td>
        <div class="headerdisplayname" style="display: inline;">Exp&eacute;diteur:
        </div>
Davide Ceresoli <a class="moz-txt-link-rfc2396E" href="mailto:ceresoli@MIT.EDU">&lt;ceresoli@MIT.EDU&gt;</a></td>
      </tr>
      <tr>
        <td>
        <div class="headerdisplayname" style="display: inline;">Date: </div>
Tue, 25 Aug 2009 11:07:54 -0400</td>
      </tr>
      <tr>
        <td>
        <div class="headerdisplayname" style="display: inline;">Destinataire:
        </div>
PWSCF Forum <a class="moz-txt-link-rfc2396E" href="mailto:pw_forum@pwscf.org">&lt;pw_forum@pwscf.org&gt;</a></td>
      </tr>
    </tbody>
  </table>
  <table class="header-part2" border="0" cellpadding="0" cellspacing="0"
 width="100%">
    <tbody>
      <tr>
        <td>
        <div class="headerdisplayname" style="display: inline;">Destinataire:
        </div>
PWSCF Forum <a class="moz-txt-link-rfc2396E" href="mailto:pw_forum@pwscf.org">&lt;pw_forum@pwscf.org&gt;</a></td>
      </tr>
    </tbody>
  </table>
  <br>
Sylvian Cadars wrote:
  <br>
  <blockquote type="cite">Hi,
    <br>
A few weeks ago, Paolo gave me a useful trick (see below) to redirect
PW outputs when the "redirection doesn't work one's system".&nbsp;
Specifically, the redirection using "&gt;" does not work on my system,
such that the output is written instead in the output file that is
automatically generated by the submission system (OAR in this case).
    <br>
    <br>
The trick was to go to PW/startup.f90 and change
    <br>
    <br>
&nbsp; IF ( me_image /= root_image ) &amp;
    <br>
&nbsp;&nbsp;&nbsp;&nbsp; OPEN( UNIT = stdout, FILE = '/dev/null', STATUS = 'UNKNOWN' )
    <br>
    <br>
into
    <br>
  </blockquote>
Is this in PW/startup.f90?
  <br>
  <blockquote type="cite"><br>
&nbsp; IF ( me_image /= root_image ) THEN
    <br>
&nbsp;&nbsp;&nbsp;&nbsp; OPEN( UNIT = stdout, FILE = '/dev/null', STATUS = 'UNKNOWN' )
    <br>
&nbsp; ELSE
    <br>
&nbsp;&nbsp;&nbsp;&nbsp; OPEN( UNIT = stdout, FILE = 'some_file_name', STATUS = 'UNKNOWN' )
    <br>
&nbsp; END IF
    <br>
  </blockquote>
Then you don't need to care about GIPAW. GIPAW calls the same
  <br>
startup routine as PW does.
  <br>
  <br>
</blockquote>
Dear Davide,<br>
<br>
Thank you for your answer.&nbsp; If GIPAW calls the same
startup routine as PW does, then something else does not work the same
way between the pw and gipaw, since whereas pw.x now automatically
writes the output into the default file ("some_file_name" in the
example below) , gipaw.x does not, and keeps writing the files into the
output of the submission system (OAR in my case).&nbsp; Is there something
else I can try?<br>
<br>
Another problem I have with GIPAW is that is does not seem to use the
environment variable "ESPRESSO_TMPDIR" when the "outdir" variable is
not defined in the "&amp;control" section, as PW does.&nbsp;&nbsp; This is
particularly ennoying because I am trying to run both the 'scf' and
'nmr' calculations in a single job, in which the the temporary output
(including "prefix.save") is a directory whose name includes the jobID&nbsp;
(e.g., /work/login/espresso_tmp/jobID).<br>
This works very well for pw, but then the gipaw module does not locate
the /work/login/espresso_tmp/jobID/prefix.save file, or so it seems to
since I get the following error:<br>
<br>
&nbsp;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>
&nbsp;&nbsp;&nbsp;&nbsp; from pp_check_file : error #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2<br>
&nbsp;&nbsp;&nbsp;&nbsp; file ./scratch/test02.save not found<br>
&nbsp;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>
<br>
Is this observation (namely that GIPAW does use the environment
variable "ESPRESSO_TMPDIR" when "outdir" is not defined) correct?&nbsp; Is
there another environment variable that plays the same role in the
GIPAW module?<br>
Thanks.<br>
<br>
Sylvian.<br>
<br>
<br>
<div class="moz-signature"><b>Dr. Sylvian CADARS</b><br>
CEMHTI-CNRS<br>
1D, Av. de la Recherche Scientifique<br>
45071 Orl&eacute;ans Cedex 2, France<br>
email: <a class="moz-txt-link-abbreviated" href="mailto:sylvian.cadars@cnrs-orleans.fr">sylvian.cadars@cnrs-orleans.fr</a><br>
<br>
</div>
</body>
</html>