~ubuntu-branches/ubuntu/utopic/nwchem/utopic

« back to all changes in this revision

Viewing changes to src/tools/ga-5-2/pario/dra/global.unsup.c

  • Committer: Package Import Robot
  • Author(s): Michael Banck, Daniel Leidert, Andreas Tille, Michael Banck
  • Date: 2013-07-04 12:14:55 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20130704121455-5tvsx2qabor3nrui
Tags: 6.3-1
* New upstream release.
* Fixes anisotropic properties (Closes: #696361).
* New features include:
  + Multi-reference coupled cluster (MRCC) approaches
  + Hybrid DFT calculations with short-range HF 
  + New density-functionals including Minnesota (M08, M11) and HSE hybrid
    functionals
  + X-ray absorption spectroscopy (XAS) with TDDFT
  + Analytical gradients for the COSMO solvation model
  + Transition densities from TDDFT 
  + DFT+U and Electron-Transfer (ET) methods for plane wave calculations
  + Exploitation of space group symmetry in plane wave geometry optimizations
  + Local density of states (LDOS) collective variable added to Metadynamics
  + Various new XC functionals added for plane wave calculations, including
    hybrid and range-corrected ones
  + Electric field gradients with relativistic corrections 
  + Nudged Elastic Band optimization method
  + Updated basis sets and ECPs 

[ Daniel Leidert ]
* debian/watch: Fixed.

[ Andreas Tille ]
* debian/upstream: References

[ Michael Banck ]
* debian/upstream (Name): New field.
* debian/patches/02_makefile_flags.patch: Refreshed.
* debian/patches/06_statfs_kfreebsd.patch: Likewise.
* debian/patches/07_ga_target_force_linux.patch: Likewise.
* debian/patches/05_avoid_inline_assembler.patch: Removed, no longer needed.
* debian/patches/09_backported_6.1.1_fixes.patch: Likewise.
* debian/control (Build-Depends): Added gfortran-4.7 and gcc-4.7.
* debian/patches/10_force_gcc-4.7.patch: New patch, explicitly sets
  gfortran-4.7 and gcc-4.7, fixes test suite hang with gcc-4.8 (Closes:
  #701328, #713262).
* debian/testsuite: Added tests for COSMO analytical gradients and MRCC.
* debian/rules (MRCC_METHODS): New variable, required to enable MRCC methods.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#if HAVE_CONFIG_H
 
2
#   include "config.h"
 
3
#endif
 
4
 
 
5
/** @file
 
6
 * This file contains some data parallel GA operations that are not part of 
 
7
 * the official GA distribution.
 
8
 * 
 
9
 * Date:   05.10.95
 
10
 * Author: Jarek Nieplocha
 
11
 */
 
12
 
 
13
#if HAVE_STDIO_H
 
14
#   include <stdio.h>
 
15
#endif
 
16
 
 
17
#include "global.h"
 
18
#include "macommon.h"
 
19
 
 
20
#define ga_idot_ F77_FUNC_(ga_idot,GA_IDOT)
 
21
 
 
22
#define DRA_TYPE_GSM 32760 - 6
 
23
 
 
24
/**
 
25
 * Integer version of ga_ddot 
 
26
 */
 
27
Integer ga_idot_(Integer *g_a, Integer *g_b)
 
28
{
 
29
    Integer  atype, adim1, adim2, btype, bdim1, bdim2, ald, bld;
 
30
    Integer  ailo,aihi, ajlo, ajhi, bilo, bihi, bjlo, bjhi;
 
31
    register Integer i,j;
 
32
    Integer  me, sum;
 
33
    Integer  index_a, index_b;
 
34
 
 
35
    pnga_sync();
 
36
 
 
37
    me = ga_nodeid_();
 
38
 
 
39
    ga_check_handle(g_a, "ga_idot");
 
40
    ga_check_handle(g_b, "ga_idot");
 
41
 
 
42
    ga_inquire_(g_a,  &atype, &adim1, &adim2);
 
43
    ga_inquire_(g_b,  &btype, &bdim1, &bdim2);
 
44
 
 
45
    if(atype != btype || atype != MT_F_INT)
 
46
        ga_error("ga_idot: types not correct", 0L);
 
47
 
 
48
    if (adim1!=bdim1 || adim2 != bdim2)
 
49
        ga_error("ga_idot: arrays not conformant", 0L);
 
50
 
 
51
    if (DBL_MB == (DoublePrecision*)0 || INT_MB == (Integer*)0)
 
52
        ga_error("ga_idot: null pointer for base array",0L);
 
53
 
 
54
    ga_distribution_(g_a, &me, &ailo, &aihi, &ajlo, &ajhi);
 
55
    ga_distribution_(g_b, &me, &bilo, &bihi, &bjlo, &bjhi);
 
56
 
 
57
    if (ailo!=bilo || aihi != bihi || ajlo!=bjlo || ajhi != bjhi){
 
58
        /*
 
59
           fprintf(stderr,"\nme =%d: %d-%d %d-%d vs %d-%d %d-%d dim:%dx%d\n",me,
 
60
           ailo,aihi, ajlo, ajhi, bilo, bihi, bjlo, bjhi,adim1,adim2);
 
61
           */
 
62
        ga_error("ga_idot: distributions not identical",0L);
 
63
    }
 
64
 
 
65
    sum = 0.;
 
66
    if (  aihi>0 && ajhi>0 ){
 
67
        ga_access_(g_a, &ailo, &aihi, &ajlo, &ajhi,  &index_a, &ald);
 
68
        if(g_a == g_b){
 
69
            index_b = index_a; bld =ald;
 
70
        }else
 
71
            ga_access_(g_b, &bilo, &bihi, &bjlo, &bjhi,  &index_b, &bld);
 
72
 
 
73
        index_a --;  /* Fortran to C correction of starting address */
 
74
        index_b --;  /* Fortran to C correction of starting address */
 
75
 
 
76
 
 
77
        /* compute "local" contribution to the dot product */
 
78
        for(j=0; j<ajhi-ajlo+1; j++)
 
79
            for(i=0; i<aihi-ailo+1; i++)
 
80
                sum += INT_MB[index_a +j*ald + i]  *
 
81
                    INT_MB[index_b +j*bld + i];
 
82
 
 
83
        /* release access to the data */
 
84
        ga_release_(g_a, &ailo, &aihi, &ajlo, &ajhi);
 
85
        ga_release_(g_b, &bilo, &bihi, &bjlo, &bjhi);
 
86
    }
 
87
 
 
88
    ga_igop((Integer)DRA_TYPE_GSM, &sum, (Integer)1, "+");
 
89
 
 
90
    pnga_sync();
 
91
 
 
92
    return (sum);
 
93
}