|
NEP 4.3.0
NetCDF Expansion Pack
|
Compare standard numeric nxCDF conversion and quantized I/O. More...
#include <math.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/stat.h>#include <time.h>#include <unistd.h>#include "nep.h"#include "nxcdf/nxcdf.h"#include "nep_meta.h"#include "nxcdf_internal.h"#include "perf_disk.h"Macros | |
| #define | NVALS ((size_t)768 * 1536) |
| #define | NCOPIES 10 |
| #define | NREPS 10 |
| #define | TMP_FILE "conversion_perf_tmp.nc" |
| #define | CHECK(call) |
Functions | |
| static double | seconds (void) |
| static int | run_case (FILE *csv, int which, int compressed, const int *ints, const float *floats, const double *doubles) |
| int | main (int argc, char **argv) |
Compare standard numeric nxCDF conversion and quantized I/O.
Usage: conversion_perf RESULTS.csv. Each case uses 768*1536 signed integer-valued inputs, ten copies, ten repetitions and minimum times. Writes include fsync; reads follow an untimed cache-eviction request. Output columns are engine,case,storage,copies,nvalues,memory_bytes, file_bytes,write_s,read_s,write_MBps,read_MBps. Throughput counts memory bytes, not the potentially narrower on-disk representation. Benchmark verification is outside timed regions. No external filter is needed.
| #define CHECK | ( | call | ) |
Abort on an unexpected NetCDF status.
| #define NCOPIES 10 |
Time steps per file.
| #define NREPS 10 |
Repetitions per case.
| #define NVALS ((size_t)768 * 1536) |
Values in each time step.
| #define TMP_FILE "conversion_perf_tmp.nc" |
File owned by this program.
| int main | ( | int | argc, |
| char ** | argv ) |
Run the six cases with both storage layouts.
| argc | Argument count; must be two. |
| argv | Output CSV path in argv[1]. |
|
static |
Run one case and write its verified minimum times.
| csv | Output stream. |
| which | Case index. |
| compressed | Nonzero for shuffle/deflate1. |
| ints | Integer input array. |
| floats | Float input array. |
| doubles | Double input array. |
|
static |
Return monotonic time in seconds.