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

« back to all changes in this revision

Viewing changes to src/tools/ga-4-3/pario/dra/global.unsup.c

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