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

    r32289cd r38d77eb  
    4545      ntlms=nmsml(nml)
    4646      if (ntlms.eq.0) then
    47         write (*,'(a,i4)')
     47        write (logString, '(a,i4)')
    4848     &           ' mklist> No mov. sets defined in molecule #',nml
    4949        nvwml(nml)=0
     
    107107                n2i=n2i+1
    108108                if (n2i.gt.mx2) then
    109                   write (*,'(a,i3,2a)')  ' mklist> Molecule # ',nml,
     109                  write(logString, '(a,i3,2a)')  ' mklist> Molecule # ',
     110     &                nml,
    110111     &                ': too many atoms bound to ',nmat(iob)
    111112                  stop
     
    125126                    n2i=n2i+1
    126127                    if (n2i.gt.mx2) then
    127                       write (*,'(a,i3,a)')  ' mklist> Molecule # '
     128                      write (logString, '(a,i3,a)') 
     129     &                         ' mklist> Molecule # '
    128130     &                         ,nml,': too many atoms in list L2I'
    129131                      stop
     
    141143                n2i=n2i+1
    142144                if (n2i.gt.mx2) then
    143                   write (*,'(a,i3,2a)')  ' mklist> Molecule # '
     145                  write (logString, '(a,i3,2a)')  ' mklist> Molecule # '
    144146     &             ,nml,': too many atoms bound to ',nmat(iob)
    145147                  stop
     
    165167              n1i=n1i+1
    166168              if (n1i.gt.mxbd) then
    167                 write (*,'(a,i3,2a)')  ' mklist> Molecule # ',nml,
     169                write (logString, '(a,i3,2a)')  ' mklist> Molecule # ',
     170     &              nml,
    168171     &             ': too many atoms bound to ',nmat(ib)
    169172                stop
     
    177180                  n2i=n2i+1
    178181                  if (n2i.gt.mx2) then
    179                     write (*,'(a,i3,2a)')  ' mklist> Molecule # ',nml,
    180      &              ': too many atoms bound to branches of ',nmat(ib)
     182                    write (logString, '(a,i3,2a)') 
     183     &                 ' mklist> Molecule # ',nml,
     184     &                 ': too many atoms bound to branches of ',nmat(ib)
    181185                    stop
    182186                  endif
     
    194198                n2i=n2i+1
    195199                if (n2i.gt.mx2) then
    196                   write (*,'(a,i3,a)')  ' mklist> Molecule # ',nml,
    197      &            ': too many atoms n list L2I '
     200                  write (logString, '(a,i3,a)')  ' mklist> Molecule # ',
     201     &               nml,
     202     &               ': too many atoms n list L2I '
    198203                  stop
    199204                endif
     
    207212! ________________________________________ Current 2ND list -> VdW-interact.
    208213              if ((nvw+n2nd).gt.mxvw) then
    209                 write (*,'(a,i4,a,i5)') ' mklist> Molecule # ',nml,
     214                write (logString, '(a,i4,a,i5)') ' mklist> Molecule # ',
     215     &            nml,
    210216     &            ': Number of vdw-domains > ',mxvw
    211217                stop
     
    273279! ____________________________________________ Summary
    274280!      do i=ifiat,ilaat
    275 !        write (*,'(3a,i5,a)') ' ######## atom ',nmat(i),'(',i,')'
     281!        write (logString, '(3a,i5,a)') ' ######## atom ',nmat(i),'(',i,')'
    276282!        iv1=ivwat1(i)
    277283!        iv2=ivwat2(i)
    278284!        if (iv1.le.iv2) then
    279 !          write(*,'(a)') ' ---> vdW :'
     285!          write (logString, '(a)') ' ---> vdW :'
    280286!          do j=iv1,iv2
    281 !            write (*,'(i5,a,i5)') lvwat1(j),'-',lvwat2(j)
     287!            write (logString, '(i5,a,i5)') lvwat1(j),'-',lvwat2(j)
    282288!          enddo
    283289!        endif
     
    285291!        i42=i14at2(i)
    286292!        if (i41.le.i42) then
    287 !          write(*,'(a)') ' ---> 1-4 :'
    288 !          write(*,'(10i5)') (l14at(j),j=i41,i42)
     293!          write (logString, '(a)') ' ---> 1-4 :'
     294!          write (logString, '(10i5)') (l14at(j),j=i41,i42)
    289295!        endif
    290296!      enddo
     
    292298      return
    293299
    294     1 write (*,'(a,i4,a,i5)') ' mklist> Molecule # ',nml,
     300    1 write (logString, '(a,i4,a,i5)') ' mklist> Molecule # ',nml,
    295301     &                     ': Number of 1-4 interactions > ',mx14
    296302      stop
     
    312318      implicit none
    313319      integer mx, j, n, j1, l1, j2, l2, i1, i2, ja, k
    314 
     320      character(255) logString
    315321      dimension l1(mx),l2(mx)
    316322
     
    334340              n=n+1
    335341              if (n.gt.mx) then
    336                 write (*,'(a)') ' quench> too many sets'
     342                write (logString, '(a)') ' quench> too many sets'
    337343                stop
    338344              endif
Note: See TracChangeset for help on using the changeset viewer.