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

« back to all changes in this revision

Viewing changes to src/tools/ga-5-2/armci/tcgmsg/ipcv4.0/waitall.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
/* $Header: /tmp/hpctools/ga/tcgmsg/ipcv4.0/waitall.c,v 1.3 1995-02-24 02:18:05 d3h325 Exp $ */
 
6
 
 
7
#include <stdio.h>
 
8
#if defined(SUN) || defined(ALLIANT) || defined(ENCORE) || defined(SEQUENT) || \
 
9
    defined(AIX) || defined(NEXT)    || defined(DECOSF) || defined(LINUX)
 
10
#include <sys/wait.h>
 
11
#endif
 
12
 
 
13
int WaitAll(nchild)
 
14
     long nchild;
 
15
/*
 
16
  Wait for all children to finish and return appropriate status
 
17
  0 = OK
 
18
  1 = bad news
 
19
*/
 
20
{
 
21
  int status, pid, child, stat=0, lo, hi;
 
22
  
 
23
#if defined(ALLIANT) || defined(ENCORE) || defined(SEQUENT) || defined(NEXT)
 
24
  union wait ustatus;
 
25
#endif
 
26
 
 
27
  for (child=0; child<nchild; child++) {
 
28
#if defined(ALLIANT) || defined(ENCORE) || defined(SEQUENT) || defined(NEXT)
 
29
      pid = wait(&ustatus);
 
30
      status = ustatus.w_status;
 
31
#else
 
32
      pid = wait(&status);
 
33
#endif
 
34
/*
 
35
(void) printf("Child finished pid=%d, status=0x%x\n",pid, status);
 
36
(void) fflush(stdout);
 
37
*/
 
38
      if ( pid < 0 ) {
 
39
        (void) fprintf(stderr,"WaitAll: No children or error in wait?\n");
 
40
                return 1;
 
41
      }
 
42
 
 
43
      if (status != 0) {
 
44
        (void) fprintf(stderr, "WaitAll: Child (%d) finished, status=0x%x ",
 
45
                       pid, status);
 
46
 
 
47
        lo = status & 0xff;
 
48
        hi = (status >> 8) & 0xff;
 
49
        
 
50
        if ( lo == 0177 )
 
51
          (void) fprintf(stderr, "(stopped by signal %d).\n", hi);
 
52
        else if ( (lo != 0) && (lo & 0200) )
 
53
          (void) fprintf(stderr, "(killed by signal %d, dumped core).\n", 
 
54
                         lo & 0100);
 
55
        else if ( lo != 0 )
 
56
          (void) fprintf(stderr, "(killed by signal %d).\n",lo);
 
57
        else
 
58
          (void) fprintf(stderr, "(exited with code %d).\n",hi);
 
59
 
 
60
        (void) fflush(stderr);
 
61
        stat = 1;
 
62
      }
 
63
 
 
64
    }
 
65
 
 
66
  return stat;
 
67
}