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

« back to all changes in this revision

Viewing changes to src/tools/ga-5-2/armci/src/include/semaphores.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 _SEMAPHORES_H_
 
2
#define _SEMAPHORES_H_
 
3
 
 
4
#if HAVE_SYS_TYPES_H
 
5
#   include <sys/types.h>
 
6
#endif
 
7
#if HAVE_SYS_IPC_H
 
8
#   include <sys/ipc.h>
 
9
#endif
 
10
#if HAVE_SYS_SEM_H
 
11
#   include <sys/sem.h>
 
12
#endif
 
13
 
 
14
#if !HAVE_UNION_SEMUN
 
15
union semun {
 
16
        int val;                    /* value for SETVAL */
 
17
        struct semid_ds *buf;       /* buffer for IPC_STAT, IPC_SET */
 
18
        unsigned short int *array;  /* array for GETALL, SETALL */
 
19
        struct seminfo *__buf;      /* buffer for IPC_INFO */
 
20
};
 
21
#endif
 
22
 
 
23
/* how many semaphores are available ? */
 
24
#ifndef SEMMSL
 
25
#   ifdef AIX
 
26
#         define SEMMSL 8094
 
27
#   else
 
28
#         define SEMMSL 16
 
29
#   endif
 
30
#endif
 
31
 
 
32
/* on HPUX 10.2 SEMMSL is much bigger than realistically we can allocate */  
 
33
#ifdef HPUX
 
34
#undef SEMMSL
 
35
#define SEMMSL 64
 
36
#endif
 
37
 
 
38
extern struct sembuf sops;
 
39
extern int semaphoreID;
 
40
int semop();
 
41
#define ALL_SEMS -1
 
42
 
 
43
#define _P_code      -1
 
44
#define _V_code       1
 
45
#define P_semaphore(s)  \
 
46
{\
 
47
  sops.sem_num = (s);\
 
48
  sops.sem_op  =  _P_code;\
 
49
  sops.sem_flg =  0; \
 
50
  semop(semaphoreID,&sops,1);\
 
51
}
 
52
#define V_semaphore(s) \
 
53
{\
 
54
  sops.sem_num = (s);\
 
55
  sops.sem_op  =  _V_code;\
 
56
  sops.sem_flg =  0; \
 
57
  semop(semaphoreID,&sops,1);\
 
58
}
 
59
 
 
60
typedef int lockset_t;
 
61
 
 
62
#endif