<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <font face="Times New Roman">FYI<br>
      <br>
      -----------------------------------------</font><font face="Times
      New Roman"><font face="Times New Roman"><br>
      </font>Problem: Compiling txspec with -C (check bounds) in WIEN2k
      14.1 results in an ifort forrtl runtime error<br>
      Effects: Can prevent complete debugging of txspec with check
      bounds<br>
      Fix: txspec.patch (attached)<br>
      Previous discussion and alternate fixes:
<a class="moz-txt-link-freetext" href="http://zeus.theochem.tuwien.ac.at/pipermail/wien/2011-September/015365.html">http://zeus.theochem.tuwien.ac.at/pipermail/wien/2011-September/015365.html</a><br>
      <br>
      Description of Fix<br>
      <br>
      Adds an if statement between lines 172 and 173 in SRC_txspec:<br>
      <br>
      i=i+1<br>
      IF (i.GT.IEMAX) goto 2<br>
      IF (LC.EQ.0) then<br>
      <br>
      Test Case<br>
      <br>
      username@computername:~/WIEN2k/SRC_txspec$ sed -n 24p Makefile<br>
      FOPT     = -FR -mp1 -w -prec_div -pc80 -pad -ip -DINTEL_VML
      -traceback -assume buffered_io <br>
      username@computername:~/WIEN2k/SRC_txspec$ gedit Makefile<br>
      username@computername:~/WIEN2k/SRC_txspec$ sed -n 24p Makefile<br>
      FOPT     = -FR -mp1 -w -prec_div -pc80 -pad -ip -DINTEL_VML
      -traceback -assume buffered_io -C<br>
      username@computername:~/WIEN2k/SRC_txspec$ make<br>
      ...<br>
      username@computername:~/WIEN2k/SRC_txspec$ cp txspec ..<br>
      username@computername:~/WIEN2k/SRC_txspec$ cd ~/wiendata/TiC<br>
      username@computername:~/wiendata/TiC$ x txspec<br>
      forrtl: severe (408): fort: (2): Subscript #1 of the array ENE has
      value 822 which is greater than the upper bound of 821<br>
      Image              PC        Routine            Line       
      Source             <br>
      txspec             08060449  MAIN__                    176 
      txspec.f<br>
      txspec             08049BC7  Unknown               Unknown 
      Unknown<br>
      libc.so.6          55617A83  Unknown               Unknown 
      Unknown<br>
      0.0u 0.0s 0:00.01 100.0% 0+0k 0+32io 0pf+0w<br>
      error: command   /home/username/WIEN2k/txspec txspec.def   failed<br>
      username@computername:~/wiendata/TiC$ cd $WIENROOT/SRC_txspec<br>
      username@computername:~/WIEN2k/SRC_txspec$ patch -b txspec.f
      txspec.patch <br>
      patching file txspec.f<br>
      username@computername:~/WIEN2k/SRC_txspec$ make<br>
      ...<br>
      username@computername:~/WIEN2k/SRC_txspec$ cp txspec ..<br>
      username@computername:~/WIEN2k/SRC_txspec$ cd ~/wiendata/TiC<br>
      username@computername:~/wiendata/TiC$ x txspec<br>
                 1         821<br>
       ABS  LC=           1  LL=           2<br>
       angular multiplication factor W=   0.400000000000000     <br>
       ABS  LC=           1  LL=           0<br>
       angular multiplication factor W=    1.00000000000000     <br>
      TXSPEC DONE<br>
      0.3u 0.0s 0:00.37 94.5% 0+0k 32+344io 0pf+0w<br>
    </font>
  </body>
</html>