~ubuntu-branches/debian/stretch/adios/stretch

« back to all changes in this revision

Viewing changes to src/core/adios_read_v1.c

  • Committer: Package Import Robot
  • Author(s): Alastair McKinstry
  • Date: 2014-06-16 23:06:38 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20140616230638-5a0z7ylxx8i0edrg
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:
47
47
#undef adios_type_to_string
48
48
#undef adios_type_size
49
49
#undef adios_print_groupinfo
50
 
//#undef adios_print_fileinfo
 
50
#undef adios_print_fileinfo
51
51
 
52
52
 
53
53
#include "core/common_read.h"
54
54
 
55
55
 
56
56
#include "public/adios_error.h"
 
57
#include "core/bp_utils.h"
57
58
#define BYTE_ALIGN 8
58
59
 
59
60
static enum ADIOS_READ_METHOD lastmethod = ADIOS_READ_METHOD_BP;
224
225
        v->value = vi->value; 
225
226
             
226
227
        /* TIME dimension should be emulated here !!! */
227
 
        int timed = common_read_is_var_timed((ADIOS_FILE *)gp->fp->internal_data, vi->varid);
228
 
        if (timed) {
 
228
        if (vi->nsteps > 1) {
229
229
            v->ndim = vi->ndim + 1;
230
230
            v->timedim = 0;
231
231
        } else {
234
234
        }
235
235
        int tidx = 0, i;
236
236
        v->dims = (uint64_t *) malloc (sizeof(uint64_t) * (v->ndim));
237
 
        if (timed) {
 
237
        if (vi->nsteps > 1) {
238
238
            v->dims[0] = vi->nsteps;
239
239
            tidx=1;
240
240
        }
250
250
        }
251
251
 
252
252
        if (stat) {
253
 
            v->characteristics_count;// = stat->characteristics_count; FIXME
 
253
            v->characteristics_count=0;// = stat->characteristics_count; FIXME
254
254
            v->gmin = stat->min; 
255
255
            v->gmax = stat->max; 
256
256
            v->gavg = stat->avg; 
472
472
// NCSU - Timer series analysis, correlation
473
473
double adios_stat_cor_v1 (ADIOS_VARINFO_V1 * vix, ADIOS_VARINFO_V1 * viy, char * characteristic, uint32_t time_start, uint32_t time_end, uint32_t lag)
474
474
{
475
 
    int i,j;
 
475
    int i;
476
476
 
477
477
    double avg_x = 0.0, avg_y = 0.0, avg_lag = 0.0;
478
478
    double var_x = 0.0, var_y = 0.0, var_lag = 0.0;
680
680
//covariance(x,y) = sum(i=1,..N) [(x_1 - x_mean)(y_i - y_mean)]/N
681
681
double adios_stat_cov_v1 (ADIOS_VARINFO_V1 * vix, ADIOS_VARINFO_V1 * viy, char * characteristic, uint32_t time_start, uint32_t time_end, uint32_t lag)
682
682
{
683
 
    int i,j;
 
683
    int i;
684
684
 
685
685
    double avg_x = 0.0, avg_y = 0.0, avg_lag = 0.0;
686
686
    double cov = 0;