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

« back to all changes in this revision

Viewing changes to src/tools/ga-5-1/armci/src/devices/dcmf/dcmf2/armcix_impl.h

  • 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
/* begin_generated_IBM_copyright_prolog                             */
 
2
/*                                                                  */
 
3
/* ---------------------------------------------------------------- */
 
4
/* (C)Copyright IBM Corp.  2007, 2008                               */
 
5
/* IBM BSD License                                                  */
 
6
/* ---------------------------------------------------------------- */
 
7
/*                                                                  */
 
8
/* end_generated_IBM_copyright_prolog                               */
 
9
/**
 
10
 * \file armci/src/x/dcmf/armcix_impl.h
 
11
 * \brief DCMF ARMCI Extension implementation interface.
 
12
 */
 
13
#ifndef __armci_src_x_armcix_impl_h
 
14
#define __armci_src_x_armcix_impl_h
 
15
 
 
16
#if HAVE_STDIO_H
 
17
#   include <stdio.h>
 
18
#endif
 
19
#if HAVE_STRING_H
 
20
#   include <string.h>
 
21
#endif
 
22
#if HAVE_ASSERT_H
 
23
#   include <assert.h>
 
24
#endif
 
25
#include "dcmf.h"
 
26
#include "armcix.h"
 
27
 
 
28
/*
 
29
#define BLOCKING_OPERATIONS_REQUIRE_FENCE
 
30
#warning remove the previous #define if blocking put/acc operations do not require a fence
 
31
*/
 
32
typedef struct ARMCIX_DCMF_Connection_t
 
33
{
 
34
  DCMF_Request_t request;      /**< \todo lazy allocate the request object?  */
 
35
  unsigned active;             /**< Number of active messages to this peer   */
 
36
  unsigned peer;               /**< Maximum system size = 2^32               */
 
37
  struct
 
38
  {
 
39
    unsigned origin;
 
40
    unsigned target;
 
41
  } sequence;
 
42
  struct
 
43
  {
 
44
    unsigned watermark;
 
45
    unsigned origin     :1;
 
46
    unsigned target     :1;
 
47
    unsigned unused     :30;
 
48
  } fence;
 
49
  unsigned unused0;
 
50
  unsigned unused1;
 
51
  DCMF_Memregion_t local_mem_region;
 
52
  DCMF_Memregion_t remote_mem_region;
 
53
}
 
54
ARMCIX_DCMF_Connection_t __attribute__ ((__aligned__ (16)));
 
55
 
 
56
typedef struct ARMCIX_DCMF_Request_t
 
57
{
 
58
  DCMF_Request_t                 request;
 
59
  DCQuad                         quad[7];
 
60
} ARMCIX_DCMF_Request_t __attribute__ ((__aligned__ (16)));
 
61
 
 
62
 
 
63
typedef struct armcix_dcmf_opaque_t
 
64
{
 
65
  ARMCIX_DCMF_Connection_t * connection;
 
66
  unsigned                   active;
 
67
}
 
68
armcix_dcmf_opaque_t;
 
69
 
 
70
 
 
71
static inline void armcix_dcmf_compile_time_assert ()
 
72
{
 
73
  COMPILE_TIME_ASSERT(sizeof(armcix_dcmf_opaque_t)<=sizeof(armcix_opaque_t));
 
74
}
 
75
 
 
76
extern ARMCIX_DCMF_Connection_t __global_connection;
 
77
extern ARMCIX_DCMF_Connection_t * __connection;
 
78
 
 
79
static inline size_t armcix_dcmf_va_to_offset (DCMF_Memregion_t * mr, void * va)
 
80
{
 
81
  size_t bytes;
 
82
  void * base;
 
83
  DCMF_Memregion_query (mr, &bytes, &base);
 
84
  return ((size_t)va) - ((size_t)base);
 
85
}
 
86
 
 
87
 
 
88
 
 
89
/**
 
90
 * \brief Generic decrement callback
 
91
 *
 
92
 * \param[in] clientdata The variable to decrement
 
93
 */
 
94
void ARMCIX_DCMF_cb_decrement (void * clientdata);
 
95
 
 
96
/**
 
97
 * \brief Callback function for non-blocking operations
 
98
 *
 
99
 * \param[in] clientdata The non-blocking handle to complete
 
100
 */
 
101
void ARMCIX_DCMF_NbOp_cb_done (void * clientdata);
 
102
 
 
103
/**
 
104
 * \brief Allocate a request from the free request pool
 
105
 *
 
106
 * Attempt to increase the size of the request pool if a free request is not
 
107
 * available. Otherwise, if the maximum request pool size has been reached,
 
108
 * block until a request completes and becomes available.
 
109
 *
 
110
 * \param[in] cb_free Callback to invoke with the request is free'd
 
111
 *
 
112
 * \return A free request
 
113
 *
 
114
 * \see ARMCIX_DCMF_request_free
 
115
 */
 
116
ARMCIX_DCMF_Request_t * ARMCIX_DCMF_request_allocate (DCMF_Callback_t cb_free);
 
117
 
 
118
/**
 
119
 * \brief Release a request into the free request pool
 
120
 *
 
121
 * The callback associated with the request is invoked before the
 
122
 * request is released.
 
123
 *
 
124
 * \see ARMCIX_DCMF_request_allocate
 
125
 */
 
126
void ARMCIX_DCMF_request_free (ARMCIX_DCMF_Request_t * request);
 
127
 
 
128
 
 
129
/**
 
130
 * \brief Register the DCMF ARMCI Extention get operation.
 
131
 *
 
132
 * \see DCMF_Get_register
 
133
 */
 
134
void ARMCIX_DCMF_Get_register ();
 
135
 
 
136
/**
 
137
 * \brief Register the DCMF ARMCI Extention put operation.
 
138
 *
 
139
 * \param[in]  connection_array Connection array
 
140
 *
 
141
 * \see DCMF_Send_register
 
142
 */
 
143
void ARMCIX_DCMF_Put_register (ARMCIX_DCMF_Connection_t * connection_array);
 
144
 
 
145
/**
 
146
 * \brief Register the DCMF ARMCI Extention accumulate operation.
 
147
 *
 
148
 * \param[in]  connection_array Connection array
 
149
 *
 
150
 * \see DCMF_Send_register
 
151
 */
 
152
void ARMCIX_DCMF_Acc_register (ARMCIX_DCMF_Connection_t * connection_array);
 
153
 
 
154
/**
 
155
 * \brief Register the DCMF ARMCI Extention fence operation.
 
156
 *
 
157
 * \param[in]  connection_array Connection array
 
158
 *
 
159
 * \see DCMF_Control_register
 
160
 */
 
161
void ARMCIX_DCMF_Fence_register (ARMCIX_DCMF_Connection_t * connection_array);
 
162
 
 
163
 
 
164
/**
 
165
 * \brief Register the DCMF ARMCI Extention rmw operation.
 
166
 *
 
167
 * \see DCMF_Control_register
 
168
 * \see DCMF_Send_register
 
169
 */
 
170
void ARMCIX_DCMF_Rmw_register ();
 
171
 
 
172
 
 
173
 
 
174
 
 
175
 
 
176
 
 
177
 
 
178
#endif