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

« back to all changes in this revision

Viewing changes to src/tools/ga-5-1/tascel/examples/scf/main.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
 
#include <mpi.h>
6
 
 
7
 
#include "ga.h"
8
 
 
9
 
#define SCF F77_FUNC(scf,SCF)
10
 
#define TIMER F77_FUNC_(timer,TIMER)
11
 
#define UTIL_TIME F77_FUNC_(util_time,UTIL_TIME)
12
 
#define UTIL_MTIME F77_FUNC_(util_mtime,UTIL_MTIME)
13
 
 
14
 
double UTIL_TIME()
15
 
{
16
 
    static int first_call = 1;
17
 
    static double first_time, last_time, cur_time;
18
 
    double diff;
19
 
 
20
 
    if (first_call) {
21
 
        first_time = MPI_Wtime();
22
 
        first_call = 0;
23
 
        last_time  = -1e-9;
24
 
    }
25
 
 
26
 
    cur_time = MPI_Wtime();
27
 
    diff = cur_time - first_time;
28
 
 
29
 
    /* address crappy MPI_Wtime: consectutive calls must be at least 1ns apart  */
30
 
    if(diff - last_time < 1e-9) {
31
 
        diff +=1e-9;
32
 
    }
33
 
    last_time = diff;
34
 
 
35
 
    return diff; /* Add logic here for clock wrap */
36
 
}
37
 
 
38
 
 
39
 
double TIMER()
40
 
{
41
 
    return UTIL_TIME()*0.01;
42
 
}
43
 
 
44
 
 
45
 
int main(int argc, char **argv)
46
 
{
47
 
    MPI_Init(&argc, &argv);
48
 
    GA_Initialize();
49
 
 
50
 
    SCF();
51
 
 
52
 
    GA_Terminate();
53
 
    MPI_Finalize();
54
 
    return 0;
55
 
}