Changeset 38d77eb for redseq.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
  • redseq.f

    r32289cd r38d77eb  
    3636
    3737      if (iopfil(lunseq,seqfil,'old','formatted').le.izero) then
    38         write (*,'(a,/,a,i3,2a)')
     38        write (logString, '(a,/,a,i3,2a)')
    3939     &    ' redseq> ERROR opening sequence file:',
    4040     &      ' LUN=',lunseq,' FILE=',seqfil(1:iendst(seqfil))
     
    6767
    6868            if ((nrs-irsml1(ntlml)+1).eq.0) then
    69               write(*,'(2a)') ' redseq> IGNORE molecule: ',
     69              write (logString, '(2a)') ' redseq> IGNORE molecule: ',
    7070     &                        nmml(ntlml)(1:iendst(nmml(ntlml)))
    7171              ntlml=ntlml-1
     
    7474          ntlml=ntlml+1
    7575          if (ntlml.gt.mxml) then
    76             write(*,'(a,i4,2a)')' redseq> NUMBER of molecules > '
     76            write (logString, '(a,i4,2a)')
     77     &                          ' redseq> NUMBER of molecules > '
    7778     &                          ,mxml,' in ',seqfil(1:iendst(seqfil))
    7879            close(lunseq)
     
    124125
    125126          if (id.gt.4) then
    126             write (*,'(4a)') ' redseq> INVALID residue NAME >',
     127            write (logString, '(4a)') ' redseq> INVALID residue NAME >',
    127128     &                       line(ib:ii),'< in ',
    128129     &      seqfil(1:iendst(seqfil))
     
    133134            nrs=nrs+1
    134135            if (nrs.gt.mxrs) then
    135               write(*,'(a,i4,2a)') ' redseq> NUMBER of residues > '
     136              write (logString, '(a,i4,2a)')
     137     &                       ' redseq> NUMBER of residues > '
    136138     &                       ,mxrs,' in ',seqfil(1:iendst(seqfil))
    137139              close(lunseq)
     
    162164
    163165      if (nrs.eq.0) then
    164         write (*,'(2a)') ' redseq> no residues found in ',
     166        write (logString, '(2a)') ' redseq> no residues found in ',
    165167     &                   seqfil(1:iendst(seqfil))
    166168        stop
     
    179181          if (i.eq.ntlml) then   ! Check last molecule
    180182            if ((nrs-ifirs+1).eq.0) then
    181               write(*,'(2a)') ' redseq> IGNORE molecule '
     183              write (logString, '(2a)') ' redseq> IGNORE molecule '
    182184     &                        ,nmml(ntlml)(1:iendst(nmml(ntlml)))
    183185              ntlml=ntlml-1
    184186              if (ntlml.eq.0) then
    185                 write (*,'(2a)') ' redseq> no residues found in ',
    186      &          seqfil(1:iendst(seqfil))
     187                write (logString, '(2a)')
     188     &             ' redseq> no residues found in ',
     189     &             seqfil(1:iendst(seqfil))
    187190                stop
    188191              endif
     
    192195          endif
    193196
    194 !          write (*,'(/,a,i4,2a)') ' redseq> ',irsml2(i)-irsml1(i)+1,
     197!          write (logString, '(/,a,i4,2a)') ' redseq> ',irsml2(i)-irsml1(i)+1,
    195198!     &           ' residue(s) in molecule: ',
    196199!     &           nmml(i)(1:iendst(nmml(i)))
    197 !          write (*,'(15(1x,a))') (seq(j),j=irsml1(i),irsml2(i))
     200!          write (logString, '(15(1x,a))') (seq(j),j=irsml1(i),irsml2(i))
    198201
    199202        enddo
     
    203206! _______________________________________________ error
    204207
    205     4 write (*,'(a,i4,2a)') ' redseq> ERROR reading line No. ',nln,
     208    4 write (logString, '(a,i4,2a)') ' redseq> ERROR reading line No. ',nln,
    206209     & ' in ',seqfil(1:iendst(seqfil))
    207210      close(lunseq)
Note: See TracChangeset for help on using the changeset viewer.