~ubuntu-branches/ubuntu/saucy/nwchem/saucy

« back to all changes in this revision

Viewing changes to src/mp2_grad/mp2_back_transform.F

  • Committer: Package Import Robot
  • Author(s): Michael Banck, Michael Banck, Daniel Leidert
  • Date: 2012-02-09 20:02:41 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120209200241-jgk03qfsphal4ug2
Tags: 6.1-1
* New upstream release.

[ Michael Banck ]
* debian/patches/02_makefile_flags.patch: Updated.
* debian/patches/02_makefile_flags.patch: Use internal blas and lapack code.
* debian/patches/02_makefile_flags.patch: Define GCC4 for LINUX and LINUX64
  (Closes: #632611 and LP: #791308).
* debian/control (Build-Depends): Added openssh-client.
* debian/rules (USE_SCALAPACK, SCALAPACK): Removed variables (Closes:
  #654658).
* debian/rules (LIBDIR, USE_MPIF4, ARMCI_NETWORK): New variables.
* debian/TODO: New file.
* debian/control (Build-Depends): Removed libblas-dev, liblapack-dev and
  libscalapack-mpi-dev.
* debian/patches/04_show_testsuite_diff_output.patch: New patch, shows the
  diff output for failed tests.
* debian/patches/series: Adjusted.
* debian/testsuite: Optionally run all tests if "all" is passed as option.
* debian/rules: Run debian/testsuite with "all" if DEB_BUILD_OPTIONS
  contains "checkall".

[ Daniel Leidert ]
* debian/control: Used wrap-and-sort. Added Vcs-Svn and Vcs-Browser fields.
  (Priority): Moved to extra according to policy section 2.5.
  (Standards-Version): Bumped to 3.9.2.
  (Description): Fixed a typo.
* debian/watch: Added.
* debian/patches/03_hurd-i386_define_path_max.patch: Added.
  - Define MAX_PATH if not defines to fix FTBFS on hurd.
* debian/patches/series: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
     $     irs_a, irs_b,
11
11
     $     c_a, c_b,            ! Better left in a GA to conserve memory
12
12
     $     nva_lo_local, nva_hi_local, 
13
 
     $     tunita, tunitb, grad)
 
13
     $     tunita, tunitb, grad,
 
14
     P     p_file_size)
14
15
*
15
 
* $Id: mp2_back_transform.F,v 1.29 2003-10-17 22:55:29 carlfahl Exp $
 
16
* $Id: mp2_back_transform.F 21424 2011-11-07 19:21:05Z edo $
16
17
*
17
18
      implicit none
18
19
#include "errquit.fh"
59
60
c
60
61
      integer k_scr, l_scr, k_lab, l_lab, k_eri, l_eri, leneri, lenscr
61
62
      integer k_bftosh, l_bftosh, k_bftoce, l_bftoce, k_pdm, l_pdm
 
63
      integer eaftype,eaf_size_in_mb,inntsize
 
64
      double precision p_file_size
62
65
c
63
66
      character*(nw_max_path_len) fname
64
67
c
65
68
      double precision tol2e
 
69
      inntsize=MA_sizeof(MT_INT,1,MT_BYTE)
66
70
c
67
71
      if (.not. rtdb_get(rtdb, 'mp2:backtol', mt_dbl, 1, tol2e))
68
72
     $     tol2e = 1d-9
137
141
     &       GA_ERR)
138
142
c     
139
143
      call util_file_name('2pdm', .true., .true., fname)
140
 
      if (eaf_open(fname,eaf_rw,twopdmunit) .ne. 0)
 
144
#ifdef EAFHACK
 
145
         if (.not. rtdb_get(rtdb, 'mp2:eaf_size_in_mb',
 
146
     $        MT_INT, 1, eaf_size_in_mb)) eaf_size_in_mb = 0
 
147
             if(eaf_size_in_mb.ne.0) then
 
148
                eaftype=1000000+eaf_size_in_mb*1024*1024
 
149
             else
 
150
                eaftype=1000000+inntsize*p_file_size*11/10
 
151
             endif
 
152
             if(ga_nodeid().eq.0) then
 
153
                write(6,*)' EAF nonsep ',
 
154
     A            eaf_size_in_mb, eaftype
 
155
                call util_flush(6)
 
156
             endif
 
157
#else
 
158
             eaftype=eaf_rw
 
159
#endif
 
160
      if (eaf_open(fname,eaftype,twopdmunit) .ne. 0)
141
161
     $     call errquit('mp2: backt: failed to open file',0, DISK_ERR)
142
162
c     
143
163
c     Now do the back transformation
176
196
     $     l_t, k_t)) call errquit
177
197
     $     ('mp2: backt: failed ma for nonsep test', tdim, MA_ERR)
178
198
      tdim = shmax*shmax*nbf
179
 
      if (.not. ma_push_get(mt_dbl, tdim, 'mp2:back tbuf',
 
199
      if (.not. ma_push_get(mt_dbl, tdim*ninseg, 'mp2:back tbuf',
180
200
     $     l_tmp, k_tmp)) call errquit
181
201
     $     ('mp2: backt: failed ma for nonsep test', tdim, MA_ERR)
182
202
      if (.not. ma_push_get(mt_dbl, ninseg*nbf, 'mp2:back c_t',
783
803
c     
784
804
c     Read this in and transpose to in core structure t(i,x,v,u)
785
805
c     
 
806
        if (eaf_read(twopdmunit, fileptr, tbuf, ninseg*count*8).ne.0)
 
807
     $       call errquit('mp2: ao test: failed reading density', 0,
 
808
     &     DISK_ERR)
786
809
         do i = 1, ninseg
787
 
            if (eaf_read(twopdmunit, fileptr, tbuf, count*8).ne.0)
788
 
     $           call errquit('mp2: ao test: failed reading density', 0,
789
 
     &       DISK_ERR)
790
 
            fileptr = fileptr + count*8.0d0
791
 
            call dcopy(count, tbuf, 1, t(i), ninseg)
 
810
            call dcopy(count, tbuf(count*(i-1)+1), 1, t(i), ninseg)
792
811
         end do
 
812
            fileptr = fileptr + ninseg*count*8.0d0
793
813
c     
794
814
         xsh_start = 1          ! For braindead multipassing
795
815
         ysh_start = 1