Skip to content

Commit

Permalink
Merge pull request #47 from jeffhammond/jeff-ccsd-cleanup
Browse files Browse the repository at this point in the history
CCSD cleanup
  • Loading branch information
edoapra authored Aug 10, 2018
2 parents 84968b2 + cc2d933 commit 64aee90
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 63 deletions.
2 changes: 1 addition & 1 deletion src/ccsd/ccsd_idx2.F
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ subroutine ccsd_idx2_omp(snsi,sisn,cmo,lscr,
call qexit('idx2',0)
endif
return
end
end
subroutine ccsd_idx2(snsi,sisn,cmo,scra,scrb,lscr,
& nfi,nfk,ncor,nocc,nact,nbf,
& ilo,ihi,klo,khi,offik,offki,
Expand Down
52 changes: 0 additions & 52 deletions src/ccsd/ccsd_itm_omp.F
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,6 @@ subroutine ccsd_itm_omp(nocc,nvir,nact,hiu,giu,habe,gabe,
enddo
!$omp end do
!
#if 0
!$omp single
if (iprt.gt.5.and.iam.eq.0)print *,'forming aitm'
!$omp end single
#endif
!
!$omp do collapse(2) schedule(static)
do k=1,nocc
do l=1,nocc
Expand Down Expand Up @@ -1045,51 +1039,6 @@ subroutine ccsd_itm_omp(nocc,nvir,nact,hiu,giu,habe,gabe,
& call errquit('ga_dest g_tmt fail',0, GA_ERR)
call ga_sync()
!
#if 0
!
! There is absolutely no good reason to use NXTVAL to
! load-balance such a trivial loop...
!
! term s1 n**3
inode=-1
next=nxtask(nodes, 1)
do a=1,nvir
do b=1,nvir
inode=inode+1
if (inode.eq.next)then
if (dos(1).ne.0)then
do k=1,nocc
ht1(k,b) = ht1(k,b) + habe(b,a) * t1(k,a)
enddo
endif
!$omp critical
next=nxtask(nodes, 1)
!$omp end critical
endif
enddo
enddo
call ga_sync()
!
inode=-1
next=nxtask(-nodes, 1)
call ga_sync()
! -- add some trivial terms to ht1 (nothing to ht2)
! term s2 n**3
do a=1,nvir
do i=1,nocc
inode=inode+1
if (mod(inode,nodes).eq.iam)then
if (dos(2).ne.0)then
temp = 0.0d0
do k=1,nocc
temp = temp + hiu(k,i) * t1(k,a)
enddo
ht1(i,a) = ht1(i,a) - temp
endif
endif
enddo
enddo
#else
! -- add some trivial terms to ht1 (nothing to ht2)
! term s1 n**3
if (iam.eq.0) then
Expand Down Expand Up @@ -1138,7 +1087,6 @@ subroutine ccsd_itm_omp(nocc,nvir,nact,hiu,giu,habe,gabe,
endif ! dos(2)
endif ! iam.eq.0
call ga_sync()
#endif
call ga_dgop(msg_cc_term6,ht1,lnov, '+')
!
deallocate( bufa, stat=alloc_error)
Expand Down
27 changes: 17 additions & 10 deletions src/ccsd/rddcom.F
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
subroutine rddcom()
C $Id$
! $Id$
Implicit NONE
C
!
Integer I
Logical NonStd
C
!
#include "ccsd_debug.fh"
#include "global.fh"
#include "util.fh"
#include "stdio.fh"
C
C Check for any non-standard setting of the debugging switches
C
!
! Check for any non-standard setting of the debugging switches
!
NonStd = .FALSE.
do i=1,15
NonStd = NonStd .or. doa(i) .ne. 2
Expand All @@ -22,10 +22,14 @@ subroutine rddcom()
NonStd = NonStd .or. dos(i) .ne. 1
NonStd = NonStd .or. dod(i) .ne. 1
enddo
c
C Print term switches if requested or if anything is non-standard
C
!
! Print term switches if requested or if anything is non-standard
!
#ifdef USE_GA_MSG_SYNC
call ga_msg_sync()
#else
call ga_sync()
#endif
if ( (NonStd .OR. Util_Print('term debug switches', Print_Debug) )
$ .AND. ga_nodeid().eq.0)then
Write (LuOut, '(A)')
Expand All @@ -43,8 +47,11 @@ subroutine rddcom()
write(LuOut,57)' dod ',dod
57 format(1x,a6,1x,15i2)
endif
#ifdef USE_GA_MSG_SYNC
call ga_msg_sync()
#else
call ga_sync()
c
#endif
return
end

0 comments on commit 64aee90

Please sign in to comment.