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

« back to all changes in this revision

Viewing changes to src/tools/ga-5-2/global/src/sclstubs.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
#include "globalp.h"
 
6
#include "ga-papi.h"
 
7
#include "ga-wapi.h"
 
8
 
 
9
#define _MAX_PROB_SIZE_ 10000 /* 100x100 */
 
10
 
 
11
#if ENABLE_F77
 
12
#   define gai_lu_solve_alt_ F77_FUNC_(gai_lu_solve_alt,GAI_LU_SOLVE_ALT)
 
13
#   define gai_llt_solve_ F77_FUNC_(gai_llt_solve,GAI_LLT_SOLVE)
 
14
#   define gai_solve_ F77_FUNC_(gai_solve,GAI_SOLVE)
 
15
#   define gai_spd_invert_ F77_FUNC_(gai_spd_invert,GAI_SPD_INVERT)
 
16
#endif
 
17
 
 
18
#ifdef SCALAPACK_I8
 
19
#   if   SIZEOF_SHORT == 8
 
20
#       define SL_INT short
 
21
#   elif SIZEOF_INT == 8
 
22
#       define SL_INT int
 
23
#   elif SIZEOF_LONG == 8
 
24
#       define SL_INT long
 
25
#   elif SIZEOF_LONG_LONG == 8
 
26
#       define SL_INT long long
 
27
#   else
 
28
#       error
 
29
#   endif
 
30
#else
 
31
#   if   SIZEOF_SHORT == 4
 
32
#       define SL_INT short
 
33
#   elif SIZEOF_INT == 4
 
34
#       define SL_INT int
 
35
#   elif SIZEOF_LONG == 4
 
36
#       define SL_INT long
 
37
#   elif SIZEOF_LONG_LONG == 4
 
38
#       define SL_INT long long
 
39
#   else
 
40
#       error
 
41
#   endif
 
42
#endif
 
43
 
 
44
#if HAVE_SYS_WEAK_ALIAS_PRAGMA
 
45
#   pragma weak wnga_lu_solve_alt = pnga_lu_solve_alt
 
46
#endif
 
47
void pnga_lu_solve_alt(Integer tran, Integer g_a, Integer g_b) {
 
48
#if HAVE_SCALAPACK
 
49
#   if ENABLE_F77
 
50
    gai_lu_solve_alt_(&tran, &g_a, &g_b);
 
51
#   else
 
52
    pnga_error("ga_lu_solve:scalapack interfaced, need configure --enable-f77",0L);
 
53
#   endif
 
54
#else
 
55
    pnga_error("ga_lu_solve:scalapack not interfaced",0L);
 
56
#endif
 
57
}
 
58
 
 
59
#if HAVE_SYS_WEAK_ALIAS_PRAGMA
 
60
#   pragma weak wnga_lu_solve = pnga_lu_solve
 
61
#endif
 
62
void pnga_lu_solve(char *tran, Integer g_a, Integer g_b) {
 
63
 
 
64
  Integer dimA1, dimA2, typeA;
 
65
  Integer dimB1, dimB2, typeB;
 
66
  Integer dimsA[2], dimsB[2], ndim;
 
67
 
 
68
  /** check GA info for input arrays */
 
69
  pnga_check_handle(g_a, "ga_lu_solve: a");
 
70
  pnga_check_handle(g_b, "ga_lu_solve: b");
 
71
  pnga_inquire (g_a, &typeA, &ndim, dimsA);
 
72
  pnga_inquire (g_b, &typeB, &ndim, dimsB);
 
73
  dimA1 = dimsA[0];
 
74
  dimA2 = dimsA[1];
 
75
  dimB1 = dimsB[0];
 
76
  dimB2 = dimsB[1];
 
77
  
 
78
  if( (dimA1*dimA2 > _MAX_PROB_SIZE_) || (dimB1*dimB2 > _MAX_PROB_SIZE_) )
 
79
    pnga_error("ga_lu_solve:Array size too large. Use scalapack for optimum performance. configure --with-scalapack or --with-scalapack-i8 for ga_lu_solve to use Scalapack interface",0L);
 
80
 
 
81
  pnga_lu_solve_seq(tran, g_a, g_b);
 
82
}
 
83
 
 
84
#if HAVE_SYS_WEAK_ALIAS_PRAGMA
 
85
#   pragma weak wnga_llt_solve = pnga_llt_solve
 
86
#endif
 
87
Integer pnga_llt_solve(Integer g_a, Integer g_b) {
 
88
#if HAVE_SCALAPACK
 
89
#   if ENABLE_F77
 
90
    return gai_llt_solve_(&g_a, &g_b);
 
91
#   else
 
92
    pnga_error("ga_lu_solve:scalapack interfaced, need configure --enable-f77",0L);
 
93
    return FALSE;
 
94
#   endif
 
95
#else
 
96
    pnga_error("ga_lu_solve:scalapack not interfaced",0L);
 
97
    return FALSE;
 
98
#endif
 
99
}
 
100
 
 
101
#if HAVE_SYS_WEAK_ALIAS_PRAGMA
 
102
#   pragma weak wnga_solve = pnga_solve
 
103
#endif
 
104
Integer pnga_solve(Integer g_a, Integer g_b) {
 
105
#if HAVE_SCALAPACK
 
106
#   if ENABLE_F77
 
107
    return gai_solve_(&g_a, &g_b);
 
108
#   else
 
109
    pnga_error("ga_lu_solve:scalapack interfaced, need configure --enable-f77",0L);
 
110
    return FALSE;
 
111
#   endif
 
112
#else
 
113
    pnga_error("ga_lu_solve:scalapack not interfaced",0L);
 
114
    return FALSE;
 
115
#endif
 
116
}
 
117
 
 
118
#if HAVE_SYS_WEAK_ALIAS_PRAGMA
 
119
#   pragma weak wnga_spd_invert = pnga_spd_invert
 
120
#endif
 
121
Integer pnga_spd_invert(Integer g_a) {
 
122
#if HAVE_SCALAPACK
 
123
#   if ENABLE_F77
 
124
    return gai_spd_invert_(&g_a);
 
125
#   else
 
126
    pnga_error("ga_lu_solve:scalapack interfaced, need configure --enable-f77",0L);
 
127
    return FALSE;
 
128
#   endif
 
129
#else
 
130
    pnga_error("ga_lu_solve:scalapack not interfaced",0L);
 
131
    return FALSE;
 
132
#endif
 
133
}
 
134