~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_inquire.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_Inquire (is a local operation)
 
4
 * GA_Create -- used to create a global array using handles like 'g_A' 
 
5
 * GA_Inquire --  to verify that g_A handle returns the right spec. of _array created under it.
 
6
 * This is one method used to verify the created array. Here to test the specified function _inquire
 
7
 */
 
8
 
 
9
#include<stdio.h>
 
10
 
 
11
#include"mpi.h"
 
12
#include"ga.h"
 
13
#include"macdecls.h"
 
14
 
 
15
#define DIM 2
 
16
 
 
17
int main(int argc, char **argv)
 
18
{
 
19
  int rank, nprocs, i;
 
20
  double g_A;
 
21
  int dims[DIM]={5,5}, dims2[DIM], ndim, type;
 
22
  double value=5;
 
23
 
 
24
  MPI_Init(&argc, &argv);
 
25
 
 
26
  MPI_Comm_rank(MPI_COMM_WORLD, &rank);
 
27
  MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
 
28
 
 
29
  MA_init(C_DBL, 1000, 1000);
 
30
 
 
31
  GA_Initialize();
 
32
  
 
33
  g_A = NGA_Create(C_DBL, DIM, dims, "array_A", NULL);
 
34
 
 
35
  GA_Fill(g_A, &value);
 
36
  GA_Print(g_A);
 
37
 
 
38
  if(!g_A) printf("ERROR : \n");
 
39
 
 
40
  NGA_Inquire(g_A, &type, &ndim, dims2);
 
41
  printf(" %d -- %d,,\n", type, ndim);
 
42
 
 
43
  for(i=0; i<DIM; i++)
 
44
    printf("%d: %d[ %d] ...* \n", rank, i, dims2[i]);
 
45
  
 
46
  GA_Sync();
 
47
  if(rank == 0)
 
48
    printf("Test Completed \n");
 
49
 
 
50
  GA_Terminate();
 
51
  MPI_Finalize();
 
52
 
 
53
  return 0;
 
54
}