#include "FiniteElementTools.h"#include "moab/Remapping/TempestOnlineMap.hpp"#include "moab/TupleList.hpp"#include "netcdfcpp.h"
Include dependency graph for TempestOnlineMapIO.cpp:Go to the source code of this file.
Enumerations | |
| enum | MapFileFormat { MAP_FORMAT_UNKNOWN = 0 , MAP_FORMAT_CLASSIC = 1 , MAP_FORMAT_NETCDF4 = 2 } |
Functions | |
| void | print_progress (const int barWidth, const float progress, const char *message) |
| static int | detectMapFileNetCDFFormat (const char *path) |
| Inspect the file header to classify NetCDF format. Reads only the first 8 bytes — relies on the well-known "CDF\\xNN" and HDF5 magic signatures. Returns MAP_FORMAT_UNKNOWN if the file cannot be opened or the signature does not match. Safe to call from a single rank. More... | |
Variables | |
| static constexpr int | BUFFERED_READ_NNZ_THRESHOLD = 3000000 |
| NNZ threshold: maps with nS <= this value use the buffered read strategy. Maps with nS > this value use direct parallel I/O (if available). Default 3M entries corresponds to ~36 MB of raw data (row+col+S). More... | |
| static constexpr int | BUFFERED_READ_CHUNK_BYTES = 64 * 1024 |
| Buffer size in bytes for each chunk read by rank 0 in buffered mode. Each sparse matrix entry is 12 bytes (2 ints + 1 double), so 64KB holds ~5461 entries. Larger buffers reduce the number of read+scatter rounds but increase peak memory on rank 0. More... | |
| enum MapFileFormat |
| Enumerator | |
|---|---|
| MAP_FORMAT_UNKNOWN | |
| MAP_FORMAT_CLASSIC | |
| MAP_FORMAT_NETCDF4 | |
Definition at line 1306 of file TempestOnlineMapIO.cpp.
|
static |
Inspect the file header to classify NetCDF format. Reads only the first 8 bytes — relies on the well-known "CDF\\xNN" and HDF5 magic signatures. Returns MAP_FORMAT_UNKNOWN if the file cannot be opened or the signature does not match. Safe to call from a single rank.
References:
Definition at line 1322 of file TempestOnlineMapIO.cpp.
References MAP_FORMAT_CLASSIC, MAP_FORMAT_NETCDF4, and MAP_FORMAT_UNKNOWN.
Referenced by moab::TempestOnlineMap::ReadParallelMap().
| void print_progress | ( | const int | barWidth, |
| const float | progress, | ||
| const char * | message | ||
| ) |
Definition at line 1246 of file TempestOnlineMapIO.cpp.
|
staticconstexpr |
Buffer size in bytes for each chunk read by rank 0 in buffered mode. Each sparse matrix entry is 12 bytes (2 ints + 1 double), so 64KB holds ~5461 entries. Larger buffers reduce the number of read+scatter rounds but increase peak memory on rank 0.
Definition at line 1300 of file TempestOnlineMapIO.cpp.
Referenced by moab::TempestOnlineMap::ReadParallelMap().
|
staticconstexpr |
NNZ threshold: maps with nS <= this value use the buffered read strategy. Maps with nS > this value use direct parallel I/O (if available). Default 3M entries corresponds to ~36 MB of raw data (row+col+S).
Definition at line 1294 of file TempestOnlineMapIO.cpp.
Referenced by moab::TempestOnlineMap::ReadParallelMap().