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

« back to all changes in this revision

Viewing changes to src/tools/ga-5-2/global/testing/unit-tests/ga_create3.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
/*
 
2
 * Test Program for GA
 
3
 * This is to test GA_Create (is a collective operation)
 
4
 * GA_Create -- used to create a global array using handles like 'g_A' 
 
5
 * Here used GA_Inquire to verify that g_A hanle returns the right values of created_array
 
6
 */
 
7
 
 
8
#include<stdio.h>
 
9
 
 
10
#include"mpi.h"
 
11
#include"ga.h"
 
12
#include"macdecls.h"
 
13
#include"ga_unit.h"
 
14
 
 
15
#define SIZE 10
 
16
#define MAX_DIM 7
 
17
 
 
18
//#define NUM_TYPES 3
 
19
 
 
20
void create_ga(int ndim, int datatypes)
 
21
{
 
22
  int g_A;                                              
 
23
  int dims[MAX_DIM], i, val=4;                  
 
24
 
 
25
  for(i=0; i<ndim; i++) dims[i]=SIZE;
 
26
   
 
27
  g_A = NGA_Create(datatypes, ndim, dims, "array_A", NULL);     
 
28
    
 
29
  if(!g_A)
 
30
    GA_Error("GA Error: no global array exists \n", ndim);
 
31
  GA_Destroy(g_A);                                                      
 
32
}
 
33
 
 
34
main(int argc, char **argv)                             
 
35
{                                                       
 
36
  int rank, nprocs, i, j;                                       
 
37
  //  int datatypes[NUM_TYPES] = {C_INT, C_DBL, C_LONG};
 
38
 
 
39
  MPI_Init(&argc, &argv);                               
 
40
                                                        
 
41
  MPI_Comm_rank(MPI_COMM_WORLD, &rank);                 
 
42
  MPI_Comm_size(MPI_COMM_WORLD, &nprocs);               
 
43
                                                        
 
44
  //MA_init(C_INT, 1000, 1000);                         
 
45
  GA_Initialize();      
 
46
  
 
47
  for(i=1; i<=MAX_DIM; i++)
 
48
    {
 
49
      for(j=0; j<NUM_TYPES; j++)
 
50
        create_ga(i, TYPES[j]);
 
51
    }
 
52
  GA_Sync();
 
53
  if(rank == 0)
 
54
    GA_PRINT_MSG();
 
55
  GA_Terminate();
 
56
  MPI_Finalize();
 
57
}
 
58
 
 
59
/* 
 
60
 * TO-DO : assign SIZE to a bigger value
 
61
 */