~ubuntu-branches/ubuntu/trusty/nwchem/trusty-proposed

« back to all changes in this revision

Viewing changes to src/tools/ga-5-2/armci/src-gemini/armci-onesided.h

  • 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
#ifndef __ARMCI_ONESIDED_H__
 
2
#define __ARMCI_ONESIDED_H__
 
3
 
 
4
#include "onesided.h"
 
5
 
 
6
#define NUM_SERV_BUFS           1
 
7
#define MAX_MEM_REGIONS         30
 
8
 
 
9
#define ARMCI_BUF_SIZE          262144
 
10
#define ARMCI_SMALL_BUF_SIZE    2048
 
11
 
 
12
#define ARMCI_MAX_BUFS          4
 
13
#define ARMCI_MAX_SMALL_BUFS    8
 
14
 
 
15
#define ARMCI_MAX_DESCRIPTORS   (ARMCI_MAX_BUFS+ARMCI_MAX_SMALL_BUFS)
 
16
#define ARMCI_MAX_REQUEST_SIZE  ARMCI_SMALL_BUF_SIZE
 
17
 
 
18
/*
 
19
 There is a problem with ga_transpose when CRAY_REGISTER_ARMCI_MALLOC
 
20
 is defined.
 
21
 
 
22
 The fix is a special hook in ga_transpose to turn off the direct puts
 
23
 during the transpose.  This may indicate a race condition in the 
 
24
 transpose code or a problem with the direct fencing.
 
25
*/
 
26
#define CRAY_REGISTER_ARMCI_MALLOC
 
27
#define ARMCI_LIMIT_REMOTE_REQUESTS_BY_NODE_TURNED_OFF
 
28
#define MAX_OUTSTANDING_ONESIDED_GETS 64
 
29
 
 
30
#define ARMCI_ONESIDED_GETS_USES_NBGETS
 
31
 
 
32
/* typedefs */
 
33
 
 
34
typedef struct armci_onesided_msg_tag_s {
 
35
        int msgid;
 
36
        cos_mdesc_t response_mdesc;
 
37
} armci_onesided_msg_tag_t;
 
38
 
 
39
 
 
40
typedef struct remote_mdh_node {
 
41
        void **ptrs;
 
42
        cos_mdesc_t *mdhs;
 
43
        struct remote_mdh_node *next;
 
44
} remote_mdh_node_t;
 
45
 
 
46
// linked-list of remote mdhs
 
47
// a new node is created on each ARMCI_Malloc operation
 
48
// not an ideal scenario -- perhaps use Abhinav's new dreg routines
 
49
// to store this data ... it would require two pieces of info ...
 
50
// remote target and remote virtual addr ... and return the mdh
 
51
// for now: manually look up the mdh in ARMCI_GetS and ARMCI_PutS
 
52
extern remote_mdh_node_t *remote_mdh_base_node;
 
53
 
 
54
/* functions */
 
55
int armci_onesided_init();
 
56
void armci_transport_cleanup();
 
57
void armci_rcv_req(void *,void *,void *,void *,int *);
 
58
 
 
59
void print_data(void *);
 
60
 
 
61
void armci_onesided_search_remote_mdh_list(void* tgt_ptr, int proc, cos_mdesc_t *mdh);
 
62
void armci_onesided_remove_from_remote_mdh_list(void *tgt_ptr);
 
63
 
 
64
#if defined CRAY_REGISTER_ARMCI_MALLOC && HAVE_ONESIDED_FADD
 
65
void armci_onesided_fadd(void *ploc, void *prem, int extra, int proc);
 
66
#endif
 
67
 
 
68
extern int armci_onesided_direct_get_enabled;
 
69
extern int armci_onesided_direct_put_enabled;
 
70
extern cos_desc_t __global_1sided_direct_comm_desc;
 
71
extern cos_desc_t __global_1sided_direct_get_comm_desc;
 
72
 
 
73
 
 
74
/* set up internals */
 
75
 
 
76
#ifdef MAX_BUFS
 
77
#error "MAX_BUFS should not be defined yet"
 
78
#else
 
79
#define MAX_BUFS                ARMCI_MAX_BUFS
 
80
#endif
 
81
 
 
82
#ifdef MAX_SMALL_BUFS
 
83
#error "MAX_SMALL_BUFS should not be defined yet"
 
84
#else
 
85
#define MAX_SMALL_BUFS          ARMCI_MAX_SMALL_BUFS
 
86
#endif
 
87
 
 
88
#ifdef MSG_BUFLEN_DBL
 
89
#error "MSG_BUFLEN_DBL should not be defined yet"
 
90
#else
 
91
#define MSG_BUFLEN_DBL          ARMCI_BUF_SIZE
 
92
#endif
 
93
 
 
94
 
 
95
/* for buffers */
 
96
 
 
97
extern char **client_buf_ptrs;
 
98
#define BUF_ALLOCATE armci_portals_client_buf_allocate
 
99
//define BUF_EXTRA_FIELD_T comp_desc* 
 
100
//define INIT_SEND_BUF(_field,_snd,_rcv) _snd=1;_rcv=1;_field=NULL
 
101
#define GET_SEND_BUFFER _armci_buf_get
 
102
#define FREE_SEND_BUFFER _armci_buf_release
 
103
 
 
104
//define CLEAR_SEND_BUF_FIELD(_field,_snd,_rcv,_to,_op) if((_op==UNLOCK || _op==PUT || ARMCI_ACC(_op)) && _field!=NULL)x_buf_wait_ack((request_header_t *)((void **)&(_field)+1),((char *)&(_field)-sizeof(BUF_INFO_T)));_field=NULL;
 
105
//define TEST_SEND_BUF_FIELD(_field,_snd,_rcv,_to,_op,_ret)
 
106
 
 
107
#define CLEAR_SEND_BUF_FIELD(_field,_snd,_rcv,_to,_op)
 
108
#define TEST_SEND_BUF_FIELD(_field,_snd,_rcv,_to,_op,_ret)
 
109
 
 
110
#define COMPLETE_HANDLE _armci_buf_complete_nb_request
 
111
 
 
112
//define NB_CMPL_T comp_desc*
 
113
#if 0
 
114
#define ARMCI_NB_WAIT(_cntr) if(_cntr){\
 
115
        int rc;\
 
116
        if(nb_handle->tag)\
 
117
          if(nb_handle->tag==_cntr->tag)\
 
118
          rc = armci_client_complete(0,nb_handle->proc,nb_handle->tag,_cntr);\
 
119
} else{\
 
120
printf("\n%d:wait null ctr\n",armci_me);}
 
121
#endif
 
122
#define ARMCI_NB_WAIT(_cntr)
 
123
 
 
124
 
 
125
 
 
126
#endif