| 1 |
/* |
| 2 |
* Copyright(C) 1999-2020, 2022, 2023, 2024 National Technology & Engineering Solutions |
| 3 |
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with |
| 4 |
* NTESS, the U.S. Government retains certain rights in this software. |
| 5 |
* |
| 6 |
* See packages/seacas/LICENSE for details |
| 7 |
*/ |
| 8 |
#pragma once |
| 9 |
|
| 10 |
#include "rf_io_const.h" |
| 11 |
#include <array> |
| 12 |
#include <string> |
| 13 |
|
| 14 |
/* Global variables. */ |
| 15 |
extern double PIO_Time_Array[]; /* Vector for timings */ |
| 16 |
|
| 17 |
/* |
| 18 |
* The following variables are used when a single processor is to write |
| 19 |
* info for a processor other than itself. |
| 20 |
*/ |
| 21 |
|
| 22 |
/* Structure used to store the information necessary for parallel I/O. */ |
| 23 |
|
| 24 |
struct Parallel_IO |
| 25 |
{ |
| 26 |
int Dsk_List_Cnt{}; |
| 27 |
|
| 28 |
int *Dsk_List{nullptr}; |
| 29 |
int **RDsk_List{nullptr}; |
| 30 |
|
| 31 |
int Num_Dsk_Ctrlrs{}; /* The number of disk controllers. */ |
| 32 |
int Num_Dsks_PCtrlr{}; /* The number of disks per controller. */ |
| 33 |
int PDsk_Add_Fact{}; /* The offset from zero used by the */ |
| 34 |
/* the target machine. */ |
| 35 |
|
| 36 |
int Zeros{}; /* 1 - if the target machine uses leading zeros when */ |
| 37 |
/* designating the disk number (eg - the paragon */ |
| 38 |
/* uses /pfs/io_01) */ |
| 39 |
/* 0 - if it does not (eg - the tflop uses */ |
| 40 |
/* /pfs/tmp_1) */ |
| 41 |
|
| 42 |
/* 1 - don't create a subdirectory for the spread files; write |
| 43 |
* them in same directory as the mesh file |
| 44 |
*/ |
| 45 |
int NoSubdirectory{}; |
| 46 |
|
| 47 |
/* The root location of the parallel disks */ |
| 48 |
std::string Par_Dsk_Root{}; |
| 49 |
|
| 50 |
/* The subdirectory to write files to */ |
| 51 |
std::string Par_Dsk_SubDirec{}; |
| 52 |
|
| 53 |
/* The filename extension for the parallel files */ |
| 54 |
std::string Exo_Extension{}; |
| 55 |
|
| 56 |
bool Staged_Writes{}; |
| 57 |
}; |
| 58 |
|
| 59 |
extern struct Parallel_IO PIO_Info; |
| 60 |
|
| 61 |
extern std::string Par_Nem_File_Name; /* The parallel nemesis file name */ |
| 62 |
|
| 63 |
void gen_disk_map(struct Parallel_IO *pio_info, const std::array<int, 6> &proc_info, int proc, |
| 64 |
int nproc); |
| 65 |
std::string gen_par_filename(const std::string &scalar_fname, int proc_for, int nprocs); |