Changeset 38d77eb for getmol.f


Ignore:
Timestamp:
11/19/09 11:29:48 (14 years ago)
Author:
baerbaer <baerbaer@…>
Branches:
master
Children:
7137e5d
Parents:
32289cd
Message:

Redirected standard out to logString.

SMMP produced a lot of log messages. This became an issue when run in massively
parallel environments. I replaced all writes to standard out to a write to logString.
The next step is to pass this string to a function that writes the messages to a log
file according to their importance and the chosen log level.

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/smmp/trunk@34 26dc1dd8-5c4e-0410-9ffe-d298b4865968

File:
1 edited

Legend:

Unmodified
Added
Removed
  • getmol.f

    r32289cd r38d77eb  
    4949
    5050      if (iopfil(lunlib,reslib,'old','formatted').le.izero) then
    51         write (*,'(a,/,a,i3,2a)')
     51        write (logString, '(a,/,a,i3,2a)')
    5252     &    ' getmol> ERROR opening library of residues:',
    5353     &    ' LUN=',lunlib,' FILE=',reslib(1:iendst(reslib))
     
    7474
    7575        if (res(:3).eq.'nme'.and.nrs.ne.ilars) then
    76           write (*,'(3a)') ' getmol> residue >',res,
     76          write (logString, '(3a)') ' getmol> residue >',res,
    7777     &                     '< allowed at C-terminus only !'
    7878          close(lunlib)
    7979          stop
    8080        elseif (res(:3).eq.'ace'.and.nrs.ne.ifirs) then
    81           write (*,'(3a)') ' getmol> residue >',res,
     81          write (logString, '(3a)') ' getmol> residue >',res,
    8282     &                     '< allowed at N-terminus only !'
    8383          close(lunlib)
     
    8888
    8989        if ((nat+ntlat).gt.mxat) then
    90           write (*,'(a,i5)') ' getmol> number of atoms > ',mxat
     90          write (logString, '(a,i5)') ' getmol> number of atoms > ',mxat
    9191          close(lunlib)
    9292          stop
    9393        endif
    9494        if ((nvr+ntlvr).gt.mxvr) then
    95           write (*,'(a,i5)') ' getmol> number of variables > ',mxvr
     95          write (logString, '(a,i5)') ' getmol> number of variables > '
     96     &       ,mxvr
    9697          close(lunlib)
    9798          stop
     
    139140              nbd=nbdat(nh)
    140141              if (nbd.eq.mxbd) then
    141                 write(*,'(a,i2,a,i4,2a,i4,a)')
     142                write (logString, '(a,i2,a,i4,2a,i4,a)')
    142143     &           ' getmol> need ',(mxbd+2),
    143144     &           'th bond to connect residues ',
     
    154155
    155156                  if (t.eq.0.0) then
    156                     write (*,'(3a,/,2a)')
     157                    write (logString, '(3a,/,2a)')
    157158     &               ' getmol> DIHEDRAL for atom ',nmat(nj),
    158159     &               ' should be PHASE angle with respect to atom ',
     
    312313
    313314        if (nat.gt.mxath) then
    314           write (*,'(a,i5)') ' redres> number of atoms > ',mxath
     315          write (logString, '(a,i5)') ' redres> number of atoms > ',mxath
    315316          close(lunlib)
    316317          stop
     
    340341          if (iexcp.eq.0.and.i.le.jow) then
    341342            if (i.eq.jow) then
    342               write (*,'(5a)') ' redres> atom ',nmath(i),' of ',
     343              write(logString,'(5a)') ' redres> atom ',nmath(i),' of ',
    343344     &                          resl,' cannot preceed itself '
    344345            else
    345               write (*,'(5a,i4)') ' redres> atom ',nmath(i),' of ',
     346              write (logString, '(5a,i4)')
     347     &                    ' redres> atom ',nmath(i),' of ',
    346348     &                    resl,' should be placed AFTER atom #',jow
    347349            endif
     
    394396
    395397              if (nvrr.gt.mxvrh) then
    396                 write (*,'(a,i5)') ' redres> number of variables > ',
     398                write (logString, '(a,i5)')
     399     &           ' redres> number of variables > ',
    397400     &                             mxvrh
    398401                close(lunlib)
     
    423426
    424427! ____________________________________________________________ ERRORS
    425     2 write (*,'(4a)') ' redres> residue >',resl,'< NOT FOUND in ',
     428    2 write (logString, '(4a)') ' redres> residue >',resl,
     429     &      '< NOT FOUND in ',
    426430     &reslib(1:iendst(reslib))
    427431      close(lunlib)
    428432      stop
    429433
    430     3 write (*,'(a,i4,2a)') ' redres> ERROR reading line No. ',nln,
    431      &' in ',reslib(1:iendst(reslib))
     434    3 write (logString, '(a,i4,2a)') ' redres> ERROR reading line No. ',
     435     &   nln,
     436     &   ' in ',reslib(1:iendst(reslib))
    432437      close(lunlib)
    433438      stop
    434439
    435     4 write (*,'(4a)') ' redres> Incorrect order of bonds for atom ',
     440    4 write (logString, '(4a)')
     441     &   ' redres> Incorrect order of bonds for atom ',
    436442     &                      nmath(i),' of ',resl
    437443
    438     5 write (*,'(8x,2a)') '... must correct ',
     444    5 write (logString, '(8x,2a)') '... must correct ',
    439445     &                      reslib(1:iendst(reslib))
    440446      close(lunlib)
    441447      stop
    442448
    443     6 write (*,'(a,i2,4a)') ' redres> unknown type :',ity,
     449    6 write (logString, '(a,i2,4a)') ' redres> unknown type :',ity,
    444450     &                   ': for atom ',nmath(i),' in residue ',resl
    445451      close(lunlib)
    446452      stop
    447453
    448     7 write (*,'(a,i2,4a)') ' redres> unknown class :',ic,
     454    7 write (logString, '(a,i2,4a)') ' redres> unknown class :',ic,
    449455     &                   ': for variable ',nm(j),' in residue ',resl
    450456      close(lunlib)
Note: See TracChangeset for help on using the changeset viewer.