~ubuntu-branches/ubuntu/vivid/adios/vivid-proposed

« back to all changes in this revision

Viewing changes to examples/C/compression_test/genarray3D.c

  • Committer: Package Import Robot
  • Author(s): Alastair McKinstry
  • Date: 2014-06-16 23:06:38 UTC
  • mfrom: (15.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20140616230638-cxryhot6b8ge32l6
Tags: 1.7.0-1
* New upstream release.
* Add adios.pc pkgconfig file. adios_config now uses this.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include <stdio.h>
2
2
#include <stdlib.h>
3
3
#include <string.h>
 
4
#include <sys/time.h>
 
5
 
4
6
#include "mpi.h"
5
7
#include "adios.h"
6
8
 
55
57
    MPI_Comm_rank (comm, &rank);
56
58
    MPI_Comm_size (comm, &nproc);
57
59
 
58
 
    double t1 = 0.0;
59
 
    double t2 = 0.0;
60
 
    double t3 = 0.0;
61
 
    double t4 = 0.0;
 
60
    //double t1 = 0.0;
 
61
    //double t2 = 0.0;
 
62
    //double t3 = 0.0;
 
63
    //double t4 = 0.0;
62
64
 
63
65
    // variable dimensions
64
66
    int gndx = DIM_GLOBAL;
91
93
    int offy = posy * ndy;
92
94
    int offz = posz * ndz;
93
95
 
94
 
    int timesteps = 0;
95
96
 
96
97
    srand(0); // all procs generate the same random datasets
97
98
 
101
102
        double_xyz[i] = (double) rand () / RAND_MAX;
102
103
    }
103
104
 
104
 
    int adios_err;
105
105
    uint64_t adios_groupsize, adios_totalsize;
106
106
    int64_t adios_handle;
107
107
 
108
 
    if(rank == 0)
109
 
        t3 = dclock();
 
108
    //if(rank == 0)
 
109
    //    t3 = dclock();
110
110
 
111
111
    MPI_Barrier(comm);
112
112
 
113
 
    t1 = dclock();
 
113
    //t1 = dclock();
114
114
 
115
115
    adios_init (xml_file_name, comm);
116
116
    adios_open (&adios_handle, GROUP_NAME, bp_file_name, "w", comm);