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

« back to all changes in this revision

Viewing changes to src/tools/ga-5-1/armci/tcgmsg/ipcv4.0/sndrcvP.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
 
/* $Header: /tmp/hpctools/ga/tcgmsg/ipcv4.0/sndrcvP.h,v 1.17 2002-05-14 22:12:14 d3h325 Exp $ */
2
 
 
3
 
/*
4
 
  This include file contains definitions PRIVATE to the message
5
 
  passing routines and not for public use. These items should not
6
 
  be directly manipulated even in the message passing routines, except
7
 
  by the appropriate lowlevel routines.
8
 
 
9
 
  Actual instances of the extern data items are declared in defglobals.h
10
 
  which is included by cluster.c.
11
 
*/
12
 
 
13
 
#define SNDRCVP
14
 
 
15
 
#ifndef MSGTYPES
16
 
#include "msgtypesc.h"
17
 
#endif
18
 
 
19
 
/******************************
20
 
  Defines and macro definitions
21
 
  *****************************/
22
 
 
23
 
#define MAX_CLUSTER 128          /* Maximum no. of clusters */
24
 
#define MAX_SLAVE   512           /* Maximum no. of slaves per cluster */
25
 
#define MAX_PROCESS 8192          /* Maximum no. of processes */
26
 
 
27
 
#define TYPE_SETUP 32768         /* used for setup communication */
28
 
#define TYPE_CHECK 32769         /* used for checking communication */
29
 
#define TYPE_END   32770         /* used for propagating end message */
30
 
#define TYPE_NXTVAL (MSGINT | 32771) /* Used in nxtval */
31
 
#define TYPE_CONNECT (MSGINT | 32772) /* Used in RemoteConnect */
32
 
#define TYPE_BEGIN 32773         /* Used in pbegin and parallel */
33
 
#define TYPE_CLOCK_SYNCH 32774;  /* Used to synch clocks */
34
 
 
35
 
#ifdef BIG_MESSAGE_PROTECTION
36
 
#define BIG_MESSAGE 41943040ul   /* 40Mb max message only for safety check.
37
 
                                    Change as needed.*/
38
 
#else
39
 
#define BIG_MESSAGE  2147483647ul  /* 2GB */
40
 
#endif
41
 
 
42
 
/* Shared memory allocated per process .. make even multiple of
43
 
   page size ... usually 4096 */
44
 
#if defined(SGI) || defined(SGITFP)
45
 
#define SHMEM_BUF_SIZE 262144
46
 
#endif
47
 
#ifdef KSR
48
 
#define SHMEM_BUF_SIZE 524288
49
 
#endif
50
 
#ifdef ALLIANT
51
 
#define SHMEM_BUF_SIZE 524288
52
 
#endif
53
 
#ifdef ENCORE
54
 
#define SHMEM_BUF_SIZE 4096
55
 
#endif
56
 
#ifdef SEQUENT
57
 
#define SHMEM_BUF_SIZE 16384
58
 
#endif
59
 
#ifdef HPUX
60
 
#define SHMEM_BUF_SIZE 262144
61
 
#endif
62
 
#ifdef MACX
63
 
#define SHMEM_BUF_SIZE 65536
64
 
#endif
65
 
#if defined(SOLARIS)
66
 
#define SHMEM_BUF_SIZE 253952 
67
 
#endif
68
 
#ifdef KSR_NATIVE
69
 
#include "ksr.h"
70
 
#undef SHMEM_BUF_SIZE
71
 
#define SHMEM_BUF_SIZE KSR_SHMEM_BUF_SIZE
72
 
#endif
73
 
#if !defined(SHMEM_BUF_SIZE)
74
 
#define SHMEM_BUF_SIZE 131072
75
 
#endif
76
 
 
77
 
#if defined(PARTIALSPIN) && !defined(NOSPIN)
78
 
#define NOSPIN
79
 
#endif
80
 
 
81
 
#define SR_SOCK_BUF_SIZE  32768       /* Size that system buffers set to */
82
 
 
83
 
#define PACKET_SIZE SR_SOCK_BUF_SIZE  /* Internal packet size over sockets */
84
 
 
85
 
#define TIMEOUT_ACCEPT 180         /* timeout for connection in secs */
86
 
 
87
 
#define TRUE 1
88
 
#define FALSE 0
89
 
#define DEBUG_ SR_debug           /* substitute name of debug flag */
90
 
 
91
 
/*********************************************************
92
 
  Global information and structures ... all begin with SR_
93
 
  ********************************************************/
94
 
 
95
 
extern long SR_n_clus;                   /* No. of clusters */
96
 
extern long SR_n_proc;                   /* No. of processes excluding dummy
97
 
                                     master process */
98
 
 
99
 
extern long SR_clus_id;                  /* Logical id of current cluster */
100
 
extern long SR_proc_id;                  /* Logical id of current process */
101
 
 
102
 
extern long SR_debug;                    /* flag for debug output */
103
 
 
104
 
extern long SR_parallel;                /* True if job started with parallel */
105
 
extern long SR_exit_on_error;            /* flag to exit on error */
106
 
extern long SR_error;                    /* flag indicating error has been called
107
 
                                     with SR_exit_on_error == FALSE */
108
 
 
109
 
extern long SR_numchild;                   /* no. of forked processes */
110
 
extern long SR_pids[MAX_SLAVE];          /* pids of forked processes */
111
 
extern int  SR_socks[MAX_PROCESS]; /* Sockets used for each process */
112
 
extern int SR_socks_proc[MAX_PROCESS]; /* Process associated with a given socket */
113
 
extern int SR_nsock;            /* No. of sockets in the list */
114
 
extern long SR_using_shmem;     /* 1=if shmem is used for an process, 0 if all
115
 
                                 processes are connected to this one by sockets */
116
 
 
117
 
 
118
 
/* This is used to store info from the PROCGRP file about each
119
 
   cluster of processes */
120
 
 
121
 
struct cluster_info_struct {
122
 
  char *user;                     /* user name */
123
 
  char *hostname;                 /* hostname */
124
 
  long nslave;                    /* no. slave on this host */
125
 
  char *image;                    /* path executable image */
126
 
  char *workdir;                  /* work directory */
127
 
  long masterid;                  /* process no. of cluster master */
128
 
  int  swtchport;                 /* Switch port for alliant hippi */
129
 
};
130
 
 
131
 
extern struct cluster_info_struct SR_clus_info[MAX_CLUSTER];
132
 
 
133
 
typedef struct message_header_struct {
134
 
  long nodefrom;                  /* originating node of message */
135
 
  long nodeto;                    /* target node of message */
136
 
  long type;                      /* user defined type */
137
 
  long length;                    /* length of message in bytes */
138
 
  long tag;                       /* No. of this message for id */
139
 
} MessageHeader;
140
 
 
141
 
/* This is used to store all info about processes */
142
 
 
143
 
struct process_info_struct {
144
 
  long clusid;                     /* cluster no. for this process */
145
 
  long slaveid;                    /* slave no. in cluster 0,1,...,nslave */
146
 
  long local;                      /* boolean flag for local/remote */
147
 
  int sock;                        /* socket to remote process */
148
 
  char *shmem;                     /* shared memory region */
149
 
  long shmem_size;                 /* shared memory region size */
150
 
  long shmem_id;                   /* shared memory region id */
151
 
  char *buffer;                    /* shared memory message buffer */
152
 
  long buflen;                     /* shared memory message buffer size */
153
 
  MessageHeader *header;           /* shared memory message header */
154
 
  long semid;                      /* semaphore group id */
155
 
  long sem_pend;                   /* semaphore no. posted when data pending */
156
 
  long sem_read;                   /* semaphore no. posted when data read */
157
 
  long sem_written;                /* semaphore no. posted when data written */
158
 
  long n_rcv;                      /* No. of messages received */
159
 
  double nb_rcv;                   /* No. of bytes received */
160
 
  double t_rcv;                    /* Time spent receiving in sec */
161
 
  long n_snd;                      /* No. of messages sent */
162
 
  double nb_snd;                   /* No. of bytes sent */
163
 
  double t_snd;                    /* Time spent sending in sec */
164
 
  long peeked;                     /* True if have peeked at socket */
165
 
  MessageHeader head_peek;         /* Header that we peeked at */
166
 
  long *buffer_full;               /* Flag indicating full buffer */
167
 
};
168
 
 
169
 
extern struct process_info_struct SR_proc_info[MAX_PROCESS];