TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
IJK_Striped_Writer.h
1/****************************************************************************
2* Copyright (c) 2025, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15
16#ifndef IJK_Striped_Writer_included
17#define IJK_Striped_Writer_included
18
19#include <IJK_Field.h>
20#include <LataTools.h>
21
22/*! @brief : class IJK_Striped_Writer
23 *
24 * Converts the input field to a linear lexicographic file written with optimized striping for lustre filesystem
25 * (splits the data into chunks of size "stripesize", give the chunks to different nodes of the MPI job and each
26 * node writes some of the chunks to maximize bandwidth).
27 * striping not yet implemented, all data is collected on the master node !
28 */
30{
31public:
32 template<typename _OUT_TYPE_, typename _TYPE_, typename _TYPE_ARRAY_>
33 Size_t write_data_template(const char * filename, const IJK_Field_template<_TYPE_,_TYPE_ARRAY_>& f);
34 template<typename _OUT_TYPE_, typename _TYPE_, typename _TYPE_ARRAY_>
36 template<typename _OUT_TYPE_, typename _TYPE_, typename _TYPE_ARRAY_>
38 template<typename _OUT_TYPE_, typename _TYPE_, typename _TYPE_ARRAY_>
40 template<typename _OUT_TYPE_, typename _TYPE_, typename _TYPE_ARRAY_>
42 template<typename _OUT_TYPE_, typename _TYPE_, typename _TYPE_ARRAY_>
43 Size_t write_data_parallel_template(const char * filename, const IJK_Field_template<_TYPE_,_TYPE_ARRAY_>& f);
44 template<typename _OUT_TYPE_, typename _TYPE_, typename _TYPE_ARRAY_>
45 void write_data_parallel2_template(const char * filename,
46 const int file_ni_tot, const int file_nj_tot, const int file_nk_tot,
48
49 template<typename _OUT_TYPE_, typename _TYPE_, typename _TYPE_ARRAY_>
50 void redistribute(const IJK_Field_template<_TYPE_,_TYPE_ARRAY_>& input, BigTRUSTArray<_OUT_TYPE_>& output,
51 const int nitot, const int njtot, const int nktot, const int nbcompo, int component);
52 template<typename _IN_TYPE_, typename _TYPE_, typename _TYPE_ARRAY_>
53 void redistribute_load(const BigTRUSTArray<_IN_TYPE_>& input, IJK_Field_template<_TYPE_,_TYPE_ARRAY_>& output,
54 const int nitot, const int njtot, const int nktot, const int nbcompo, const int component);
55
56};
57
58#include <IJK_Striped_Writer.tpp>
59#endif
: This class is an IJK_Field_local with parallel informations.
: class IJK_Striped_Writer
void write_data_parallel2_template(const char *filename, const int file_ni_tot, const int file_nj_tot, const int file_nk_tot, const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &vx, const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &vy, const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &vz)
Size_t write_data_parallel_template(const char *filename, const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &vx, const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &vy, const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &vz)
void redistribute_load(const BigTRUSTArray< _IN_TYPE_ > &input, IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &output, const int nitot, const int njtot, const int nktot, const int nbcompo, const int component)
Size_t write_data_template(const char *filename, const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &f)
Size_t write_data_parallele_plan_template(const char *filename, const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &vx, const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &vy, const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &vz)
void redistribute(const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &input, BigTRUSTArray< _OUT_TYPE_ > &output, const int nitot, const int njtot, const int nktot, const int nbcompo, int component)