TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
FichierHDFPar.cpp
1/****************************************************************************
2* Copyright (c) 2022, 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#include <FichierHDFPar.h>
16
17#ifdef MPI_
18#include <comm_incl.h>
19#include <Comm_Group_MPI.h>
20#endif
21
23 FichierHDF(), collective_op_(false)
24{
25#ifndef MPI_
26 Cerr << "FichierHDFPar needs MPI to be used!" << finl;
27 Process::exit(-1);
28#endif
29}
30
32
34{
36#ifdef MPI_
37
38 MPI_Info infos;
39 MPI_Info_create(&infos); // not used for now. CCRT supports advise to leave empty.
40
41#ifdef MED_
42 H5Pset_fapl_mpio( file_access_plst_, Comm_Group_MPI::get_trio_u_world(), infos);
43
44 //on cluster, type lfs getstripe . to see the default striping of the current repository
45 hsize_t stripe_size = 1048576; //1572864;
46 H5Pset_alignment(file_access_plst_, 0, stripe_size);
47#endif
48
49 MPI_Info_free(&infos);
50#endif
51}
52
54{
56#ifdef MED_
57#ifdef MPI_
58 if(collective_op_)
59 H5Pset_dxpl_mpio(dataset_transfer_plst_, H5FD_MPIO_COLLECTIVE);
60#endif
61#endif
62
63 // int rank = Process::me();
64
65 // //Build expected dataset name for the current proc (with the trailing _000x stuff)
66 // Nom dataset_full_name = dataset_name;
67 // dataset_full_name.nom_me(rank);
68}
69
void prepare_dataset_props() override
~FichierHDFPar() override
void prepare_file_props() override
virtual void prepare_file_props()
virtual void prepare_dataset_props()
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455