hdf5printer_v2.cpp
Go to the documentation of this file.
68 errmsg<<"Error closing dataset in destructor for HDF5DataSetBase! Dataset is marked 'open' but dset_id<0! This is a bug, please report it."; 153 errmsg << "Failed to extend dataset (with name=\""<<myname()<<"\") from length "<<current_length<<" to length "<<newlength<<"! The new length is short than the existing length! This is a bug, please report it."; 162 errmsg << "Failed to extend dataset (with name=\""<<myname()<<"\") from length "<<current_length<<" to length "<<newlength<<"!"; 185 errmsg << "Error! Dataset (with name=\""<<myname()<<"\") is not open! Code following this check is not permitted to run. This is a bug in HDF5Printer2, please report it."; 196 errmsg << "Error opening dataset (with name=\""<<myname()<<"\") in HDF5 file. The dataset is already open! This is a bug, please report it."; 205 errmsg << "Error opening existing dataset (with name=\""<<myname()<<"\") in HDF5 file. H5Dopen2 failed." << std::endl 206 << "You may have a corrupt hdf5 file from a previous run. Try using -r, or deleting the old output."; 215 errmsg << "Error opening existing dataset (with name=\""<<myname()<<"\") in HDF5 file. H5Dget_space failed."; 224 errmsg << "Error opening existing dataset (with name=\""<<myname()<<"\") in HDF5 file. H5Sget_simple_extent_ndims failed."; 230 errmsg << "Error while accessing existing dataset (with name=\""<<myname()<<"\") in HDF5 file. Rank of dataset ("<<rank<<") does not match the expected rank ("<<DSETRANK<<")."; 241 errmsg << "Error while accessing existing dataset (with name=\""<<myname()<<"\") in HDF5 file. Failed to retrieve dataset extents (H5Sget_simple_extent_dims failed)."; 270 errmsg << "Error closing dataset (with name=\""<<myname()<<"\") in HDF5 file. H5Dclose failed."; 277 errmsg << "Error closing dataset (with name=\""<<myname()<<"\") in HDF5 file. Dataset ID is negative. This would usually indicate that the dataset is not open, however the 'is_open' flag is 'true'. This is a bug, please report it."; 284 errmsg << "Error closing dataset (with name=\""<<myname()<<"\") in HDF5 file. The dataset is not open! This is a bug, please report it."; 291 std::pair<hid_t,hid_t> HDF5DataSetBase::select_hyperslab(std::size_t offset, std::size_t length) const 297 errmsg << "Error selecting chunk from dataset (with name=\""<<myname()<<") in HDF5 file. Tried to select a hyperslab which extends beyond the dataset extents:" << std::endl; 309 errmsg << "Error selecting chunk from dataset (with name=\""<<myname()<<"\") in HDF5 file. H5Dget_space failed." << std::endl; 319 herr_t err_hs = H5Sselect_hyperslab(dspace_id, H5S_SELECT_SET, offsets, NULL, selection_dims, NULL); 324 errmsg << "Error selecting chunk from dataset (with name=\""<<myname()<<"\", offset="<<offset<<", length="<<selection_dims[0]<<") in HDF5 file. H5Sselect_hyperslab failed." << std::endl; 339 return std::make_pair(memspace_id, dspace_id); // Be sure to close these identifiers after using them! 353 errmsg<<"Tried to use create_dataset function in a HDF5DataSetBasic object! This is not allowed. This object is only able to perform basic operations on existing datasets, like resizings them. For full dataset access a HDF5DataSet<T> object is required, where the type T of the dataset must be known."; 390 HDF5MasterBuffer::HDF5MasterBuffer(const std::string& filename, const std::string& groupname, const bool sync, const std::size_t buflen 396 , buffer_length(sync ? buflen : MAX_BUFFER_SIZE) // Use buflen for the bufferlength if this is a sync buffer, otherwise use MAX_BUFFER_SIZE 482 logger()<<"Preparing to flush "<<buffered_points.size()<<" points to target position "<<target_pos<<std::endl; 505 //std::cout<<"Preparing to flush "<<buffered_points.size()<<" random-access points to datasets with length "<<target_pos<<std::endl; 542 errmsg<<"A target position for a RA write is beyond the current nominal dataset size! This doesn't make sense because we should not have retrieved such positions. This is a bug, please report it."; 576 msg<<"Inconsistency detected between buffered_points and buffered_points_set sizes after subtracting done_points ("<<buffered_points.size()<<" vs "<<buffered_points_set.size()<<")! This is a bug, please report it."<<std::endl; 579 //std::cout<<buffered_points.size()<<" points failed to flush from random-access buffer."<<std::endl; 634 logger()<< LogTags::printers << LogTags::info << "Asking process "<<r<<" to begin sending buffer data"<<EOM; 648 int max_Npoints = 0; // Track largest buffer sent, for reporting general number of points recv'd 655 logger()<<LogTags::printers<<LogTags::debug<<"More buffers to receive from process "<<r<<"? "<<more_buffers<<EOM; 670 std::string dset_name(name_size, 'x'); // Initialise string to correct size, but filled with x's 673 logger()<<LogTags::printers<<LogTags::debug<<"Preparing to receive buffer data from process "<<r<<" for buffer "<<dset_name<<EOM; 691 errmsg<<"Unrecognised datatype integer (value = "<<buftype<<") received in buffer type message from rank "<<r<<" for dataset "<<dset_name<<"!"; 705 logger()<<"Recv'd "<<Nbuffers<<" dataset buffers from rank "<<r<<"; the largest one contained "<<max_Npoints<<" points"<<std::endl; 710 // std::cout<<"New buffer length is "<<it->second->N_items_in_buffer()<<" (name="<<it->second->dset_name()<<")"<<std::endl; 717 void HDF5MasterBuffer::add_to_buffers(const std::vector<HDF5bufferchunk>& blocks, const std::vector<std::pair<std::string,int>>& buf_types) 725 errmsg<<"Invalid block detected! used_size exceeds max SIZE ("<<block.used_size<<">"<<HDF5bufferchunk::SIZE<<"). This is a bug, please report it."; 731 errmsg<<"Invalid block detected! used_nbuffers exceeds max NBUFFERS ("<<block.used_nbuffers<<">"<<HDF5bufferchunk::NBUFFERS<<"). This is a bug, please report it."; 742 logger()<<"Adding block["<<j<<"] with type ID "<<type<<" and name ID "<<block.name_id[j]<<" to dataset named "<<name<<EOM; 756 errmsg<<"Unrecognised datatype integer (value = "<<type<<") received in a buffer block for dataset "<<name<<"!"; 771 errmsg << "Error! Output HDF5 file '"<<file<<"' is not open and locked! Code following this check is not permitted to run. This is a bug in HDF5Printer2, please report it."; 782 err<<"HDF5MasterBuffer attempted to obtain a lock on the output hdf5 file, but it already has the lock! This is a bug, please report it."<<std::endl; 789 err<<"HDF5Printer2 attempted to open the output hdf5 file, but it is already open! This is a bug, please report it."<<std::endl; 813 err<<"HDF5Printer2 attempted to release a lock on the output hdf5 file, but it doesn't currently have the lock! This is a bug, please report it."<<std::endl; 820 err<<"HDF5Printer2 attempted to close the output hdf5 file, but it is not currently open! This is a bug, please report it."<<std::endl; 826 // This especially shouldn't happen because the 'file_open' flag should not be 'true' if the group has been closed. 828 err<<"HDF5Printer2 attempted to close the output hdf5 file, but group_id<0 indicating that that output group is already closed (or was never opened)! This is a bug, please report it."<<std::endl; 834 // This especially shouldn't happen because the 'file_open' flag should not be 'true' if the group has been closed. 836 err<<"HDF5Printer2 attempted to close the output hdf5 file, but file_id<0 indicating that that output file is already closed (or was never opened)! This is a bug, please report it."<<std::endl; 879 err<<"Tried to add a buffer with label "<<label<<" to a MasterBuffer, but a non-identical buffer with the same name and different type already exists! This is a bug, please report it. Types were (existing:"<<it->second->get_type_id()<<", new:"<<buff.get_type_id()<<")"; 886 err<<"Tried to add a buffer with label "<<label<<" to a MasterBuffer, but a non-identical buffer with the same name and same type already exists (type="<<buff.get_type_id()<<")! This shouldn't be possible and is a bug, please report it."; 961 std::map<PPIDpair,std::size_t> HDF5MasterBuffer::get_position_map(const std::vector<PPIDpair>& buffer) const 976 //for(auto it=buffer_set.begin(); it!=buffer_set.end(); ++it) std::cout<<" buffer_set item: "<<(*it)<<std::endl; 995 //std::cout<<"Reading chunk "<<offset<<" to "<<offset+length<<"(chunk "<<i<<" of "<<Nchunks<<")"<<std::endl; 1016 //std::cout<<"position: "<<position<<", point: ("<<(*rt)<<", "<<(*pt)<<"), valid: ("<<(*rvt)<<", "<<(*pvt)<<")"<<std::endl; 1038 errmsg<<"Inconsistent validity flags detected whilst determining dataset locations for RA buffer data! This is a bug, please report it."; 1128 errmsg<<"Inconsistent validity flags detected whilst finding highest pointIDs in existing output! This is a bug, please report it."; 1164 ss << " Buffer "<<it->first<<" contains "<<it->second->N_items_in_buffer()<<" unwritten items (synchronised="<<it->second->is_synchronised()<<")"<<std::endl; 1196 const std::map<std::string,HDF5BufferBase*>& HDF5MasterBuffer::get_all_buffers() { return all_buffers; } 1213 logger()<<" Buffer contains "<<it->second->N_items_in_buffer()<<" items (name="<<it->second->dset_name()<<")"<<std::endl; 1275 errmsg<<"Error untracking point (rank="<<pt->rank<<", pointID="<<pt->pointID<<")! Point was found in tracked set, but not in ordering vector! This is a bug, please report it."; 1282 errmsg<<"Could not untrack point (rank="<<pt->rank<<", pointID="<<pt->pointID<<")! Point was not being tracked! This is a bug, please report it."; 1291 HDF5Buffer<TYPE>& HDF5MasterBuffer::get_buffer<TYPE>(const std::string& label, const std::vector<PPIDpair>& buffered_points)\ 1294 /*logger()<<"Updating buffer map with buffer "<<label<<", C++ type="<<typeid(TYPE).name()<<", type ID="<<out_buffer.get_type_id()<<EOM;*/\ 1302 //DEFINE_GET_BUFFER(longlong ) // Some type ambiguities here between C++ and HDF5, seems like ulong and ulonglong map to same HDF5 type. So ditch ulonglong for now. 1321 errmsg<<"Auxilliary printer was not constructed with a pointer to the primary printer! This is a bug, please report it"; 1338 , buffermaster(get_filename(options),get_groupname(options),get_sync(options),get_buffer_length(options) 1350 // Set resume flag to match primary printer, and give primary printer a pointer to our buffer master object. 1385 warn<<"Warning from HDF5Printer2! Your chosen printer buffer length ("<<get_buffer_length()<<"), multiplied by the number of processes in your job ("<<mpiSize<<"), is very large. During job shutdown the master process receives all remaining print buffer data via MPI, from ALL processes, for efficient writing to disk. This needs to be able to fit into the available RAM. If you are sure that you have enough RAM for this then there is no problem. But please do check, and if needed, reduce the buffer length for this job using the 'buffer_length' option for the printer."; 1401 logger() << LogTags::printers << LogTags::info << "Running shell command: " << command.str() << EOM; 1407 errmsg << "rank "<<myRank<<": Error deleting existing output file (requested by 'delete_file_on_restart' printer option; target filename is "<<file<<")! popen failed to run the command (command was '"<<command.str()<<"')"; 1414 errmsg << "rank "<<myRank<<": Error deleting existing output file (requested by 'delete_file_on_restart' printer option; target filename is "<<file<<")! Shell command failed to executed successfully, see stderr (command was '"<<command.str()<<"')."; 1424 std::cout << "Group readable: " << file << " , " << group << " : " << HDF5::checkGroupReadable(file_id, group, msg_group) << std::endl; 1429 errmsg << "Error preparing pre-existing output file '"<<file<<"' for writing via hdf5printer! The requested output group '"<<group<<" already exists in this file! Please take one of the following actions:"<<std::endl; 1430 errmsg << " 1. Choose a new group via the 'group' option in the Printer section of your input YAML file;"<<std::endl; 1432 errmsg << " 3. Delete the existing output file, or set 'delete_file_on_restart: true' in your input YAML file to give GAMBIT permission to automatically delete it (applies when -r/--restart flag used);"<<std::endl; 1434 errmsg << "*** Note: This error most commonly occurs when you try to resume a scan that has already finished! ***" <<std::endl; 1446 logger() << LogTags::info << "No previous output file found, treating run as completely new." << EOM; 1453 std::cout <<"Rank "<<myRank<<": output file readable? "<<HDF5::checkFileReadable(file)<<"(filename: "<<file<<")"<<std::endl; 1456 logger() << LogTags::info << "Scanning existing output file, to prepare for adding new data" << EOM; 1465 // We are supposed to be resuming, but specified group was not readable in the output file, so we can't. 1467 errmsg << "Error! GAMBIT is in resume mode, however the chosen output system (HDF5Printer) was unable to open the specified group ("<<group<<") within the existing output file ("<<file<<"). Resuming is therefore not possible; aborting run... (see below for IO error message)"; 1468 errmsg << std::endl << "(Strictly speaking we could allow the run to continue (if the scanner can find its necessary output files from the last run), however the printer output from that run is gone, so most likely the scan needs to start again)."; 1500 logger() << LogTags::info << "Extracted highest pointID calculated on rank "<<myRank<<" process during previous scan (it was "<< highests <<") from combined output. Operation took "<<std::chrono::duration_cast<std::chrono::seconds>(time_taken).count()<<" seconds." << EOM; 1505 logger() << LogTags::info << "No previous output file found; therefore no previous MPIrank/pointID pairs to parse. Will assume that this is a new run (-r/--restart flag was not explicitly given)." << EOM; 1611 warn << "An inconsistency has been detected in the existing HDF5 output! Not all datasets are the same length. This can happen if your previous run was not shut down safely. We will now check all datasets for corruption (this involves reading the whole HDF5 file so may take some time if it is a large file)"<<std::endl; 1621 // We already measured the longest dataset length. So now we want to extend all datasets to this length 1636 msg << " Corrupted dataset detected! Highest readable index was "<<readable_info.second<<" (dataset name = "<<*it<<")"<<std::endl; 1650 // Also need to shorten this highest_common_readable_index in case some non-corrupt datasets happen to be shorter 1651 if(this_dset_length < highest_common_readable_index) highest_common_readable_index = this_dset_length; 1658 // Dataset corruption detected! Need to abort, but we can tell the user some facts about the problem. 1660 err<<"Corruption detected in existing datasets! You cannot resume writing to the existing HDF5 file. You may be able to recover from this by copying all readable data from these datasets into a new HDF5 file. We have checked the readability of all datasets and determined that the highest index readable in all datasets is:"<<std::endl; 1670 warn << "Attempting to automatically repair datasets. Lost data will not be recovered, but file will be restored to a condition such that further data can be added. A report on dataset modifications will be issued below. If you want to disable auto-repair (and get an error message instead) then please set disable_autorepair=true in the YAML options for this printer."<<std::endl; 1693 if(mpiranks_valid.get_dset_length() < nominal_dset_length) nominal_dset_length = mpiranks_valid.get_dset_length(); 1694 if(pointids .get_dset_length() < nominal_dset_length) nominal_dset_length = pointids .get_dset_length(); 1695 if(pointids_valid.get_dset_length() < nominal_dset_length) nominal_dset_length = pointids_valid.get_dset_length(); 1705 // We already measured the longest dataset length. So now we want to extend all datasets to this length 1714 repair_report << " Extended dataset from "<<this_dset_length<<" to "<<max_dset_length<<" (name = "<<*it<<")"<<std::endl; 1719 // Next we want to open all the 'isvalid' datasets, and set their entries as 'invalid' between nominal and max lengths. 1720 // Could be that the nominal length is the max length though; in which case no further action is required. That just 1721 // means some datasets were too short. They will automatically be set as invalid in the extended sections. 1731 repair_report << " Set data as 'invalid' from "<<nominal_dset_length<<" to "<<max_dset_length<<" (name = "<<*it<<")"<<std::endl; 1742 err << "Automatic dataset repair has been disabled, and a problem with your HDF5 file was detected, so this run must stop. Please manually repair your HDF5 file, or set disable_autorepair=false in the YAML options for this printer, and then try again."; 1764 errmsg<<"'add_aux_buffer' function called on auxilliary printer! Only the primary printer should be using this function! This is abug, please report it."; 1830 logger()<<LogTags::printers<<LogTags::info<<"Gathering sync buffer data from all processes to rank 0 process..."<<EOM; 1867 // Create a dedicate unsynchronised 'aux' buffer handler to receive data from other processes (and also this one!) 1870 // Add it to RA_buffers in case there are none, to satisfy various collective operation requirements 1874 logger()<< LogTags::printers << LogTags::info << "Gathering random-access print buffer data from all process to rank 0 process..."<<EOM; 1884 // So just stick any buffermanager object as the argument to satisfy the function signature requirements. 1910 errmsg<<"\nWarning! Not all 'random access' buffers were successfully flushed to disk! This most often occurs when you resume scanning from a run that did not shut down cleanly (at some point in its history). Hard shutdowns can cause loss of samples, and cause subsequent attempts to write data to the missing points to fail, triggering this warning."<<std::endl; 1911 errmsg<<"A report on the data that could not be written to disk is given below. Please consider the impact of this on the integrity of your results:"<<std::endl; 1917 logger()<< LogTags::printers << LogTags::info << "HDF5Printer2 output finalisation complete."<<EOM; 1920 //logger()<<LogTags::printers<<LogTags::debug<<"h5v2_BLOCK send count: "<<send_counter<<std::endl 1932 errmsg<<"Attempted to get a pointer of derived class type to primary printer, however this object IS the primary printer! This is a bug, please report it."; 1938 errmsg<<"Attempted to get a pointer of derived class type to primary printer, but it was NULL! This means that this auxilliary printer has not been constructed correctly. This is a bug, please report it."; 1991 printer_error().raise(LOCAL_INFO, "No 'output_file' entry specified in the options section of the Printer category of the input YAML file. Please add a name there for the output hdf5 file of the scan."); 2029 errmsg<<"Requested buffer length is larger than maximum allowed (which is MAX_BUFFER_SIZE="<<MAX_BUFFER_SIZE<<"). Please specify a shorter buffer_length for the HDF5 printer."; 2063 // Determine ID codes to use for buffer transmission for all buffers across a collection of buffer managers 2064 std::pair<std::map<std::string,int>,std::vector<std::pair<std::string,int>>> HDF5Printer2::get_buffer_idcodes(const std::vector<HDF5MasterBuffer*>& masterbuffers) 2066 logger()<<LogTags::printers<<LogTags::debug<<"Determining ID codes for HDF5 buffers for MPI transmission..."<<EOM; 2091 logger()<<LogTags::printers<<LogTags::debug<<"Converting buffer names and types to string for transmission..."<<std::endl; 2108 logger()<<LogTags::printers<<LogTags::debug<<"Gathering lengths of string messages..."<<std::endl; 2125 errmsg<<"Received a negative value for the total length of new buffer names from a process! The value might have overflowed! In any case it makes no sense, something bad has happened."; 2136 errmsg<<"Complete buffer name message is larger than MPI limits for a single message! (Required size: "<<totalstrsize<<", max size on this system (largest int): "<<maxint<<")"; 2143 logger()<<LogTags::printers<<LogTags::debug<<"Gathering all buffer name strings..."<<std::endl; 2168 errmsg<<"all_buf_names_and_types vector doesn't have an even number of elements! This is a bug, please report it."; 2174 logger()<<LogTags::printers<<LogTags::debug<<"Splitting received buffer name string..."<<std::endl; 2205 std::vector<std::pair<std::string,int>> existing_bufs = masterbuffers.at(0)->get_all_dset_names_on_disk(); 2206 logger()<<LogTags::printers<<LogTags::debug<<"Adding buffer names already on disk:"<<std::endl; 2216 ordered_bufs = std::vector<std::pair<std::string,int>>(all_buf_pairs.begin(),all_buf_pairs.end()); 2228 logger()<<LogTags::printers<<LogTags::debug<<"Broadcasting size of composited buffer name string"<<std::endl; 2236 logger()<<LogTags::printers<<LogTags::debug<<"Received size for composited buffer name string:"<<size<<EOM; 2241 logger()<<LogTags::printers<<LogTags::debug<<"Broadcasting composited buffer name string"<<std::endl; 2270 void HDF5Printer2::gather_and_print(HDF5MasterBuffer& out_printbuffer, const std::vector<HDF5MasterBuffer*>& masterbuffers, bool sync) 2274 std::vector<unsigned long> pointsbuffersperprocess(mpiSize*2); // number of points and buffers to be recv'd for each process 2329 double N_MB = pow(2,-20) * (8.+4.) * (double)buffersperprocess.at(i) * (double)pointsperprocess.at(i); 2333 // Make a new group each time we go over the RAM limit, so long as the previous group wasn't empty (aside from rank 0 process) 2349 std::pair<std::map<std::string,int>,std::vector<std::pair<std::string,int>>> ids_and_types = get_buffer_idcodes(masterbuffers); 2382 std::vector<HDF5bufferchunk> HDF5Printer2::gather_all(GMPI::Comm& comm, const std::vector<HDF5MasterBuffer*>& masterbuffers, const std::map<std::string,int>& buf_ids) 2387 errmsg<<"Attempted to call gather_all with an invalid communicator! This is a bug, please report it."; 2410 logger()<<LogTags::printers<<LogTags::debug<<"Building buffer chunks for MPI transmission"<<EOM; 2443 std::set_intersection(sub_order.begin(),sub_order.end(),points_in_these_bufs.begin(),points_in_these_bufs.end(), 2510 errmsg<<"Point counter exceeded allowed chunk size somehow (i>SIZE;"<<i<<">"<<HDF5bufferchunk::SIZE<<"). This is a bug, please report it."; 2516 errmsg<<"Buffer counter exceeded allowed chunk size somehow (j>NBUFFERS;"<<j<<">"<<HDF5bufferchunk::NBUFFERS<<"). This is a bug, please report it."; 2525 logger()<<"Chunk finished (no more buffer data for these points) (used_size="<<i<<", used_nbuffers="<<j<<")"<<EOM; 2529 logger()<<"Chunk finished (no space for more buffers) (used_size="<<i<<", used_nbuffers="<<j<<")"<<EOM; 2545 // else skip these buffers; the current point isn't in them (must have come from one of the other sets of buffers). 2550 errmsg<<"Point counter exceeded allowed chunk size somehow (i>SIZE;"<<i<<">"<<HDF5bufferchunk::SIZE<<"). This is a bug, please report it."; 2556 errmsg<<"Buffer counter exceeded allowed chunk size somehow (j>NBUFFERS;"<<j<<">"<<HDF5bufferchunk::NBUFFERS<<"). This is a bug, please report it."; 2563 logger()<<"Chunk finished (no more buffer data for these points; skipped last masterbuffer) (used_size="<<i<<", used_nbuffers="<<j<<")"<<EOM; 2571 // Skipped last buffer, but was left with an empty chunk. No big deal, just note it in the logs 2573 logger()<<"Chunk finished (no more buffer data for these points; skipped last masterbuffer; chunk remains empty, discarding it."<<EOM; 2589 logger()<<"Gathering buffer block size data (number of buffer blocks to transmit from this process: "<<nblocks.at(0)<<")"<<EOM; 2608 comm.Gatherv(bufchunks, all_bufblocks, all_nblocks, 0); // (sendbuf, recvbuf, recvcounts, root) 2621 logger()<<" block "<<globi<<" ("<<i<<"), received from rank "<<rrank<<", used_size="<<it->used_size<<std::endl; 2624 logger()<<" ranks["<<j<<"]="<<it->ranks[j]<<", pointIDs["<<j<<"]="<<it->pointIDs[j]<<std::endl; void ensure_dataset_is_open() const Enforce that the dataset must be open for whatever follows (or else an error is thrown) ... Definition: hdf5printer_v2.cpp:180 std::pair< bool, std::size_t > checkDatasetReadable(hid_t location, const std::string &dsetname) Check if a dataset exists and can be read from fully (Reads through entire dataset to make sure! May ... Definition: hdf5tools.cpp:432 DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry DecayTable::Entry double Definition: ColliderBit_LEP_rollcall.hpp:183 std::size_t write_vector(const hid_t loc_id, const std::vector< T > &data, const std::size_t target_pos, const bool force=false) Write a vector of data to disk at the target position. Definition: hdf5printer_v2.hpp:222 The main printer class for output to HDF5 format. Definition: hdf5printer_v2.hpp:1466 bool get_sync(const Options &options) Report whether this printer prints in synchronised or 'random' mode. Definition: hdf5printer_v2.cpp:2041 EXPORT_SYMBOLS std::vector< std::string > split(const std::string &input, const std::string &delimiter) Split string into vector of strings, using a delimiter string. Definition: util_functions.cpp:187 HDF5Printer2 * primary_printer Pointer to primary printer object. Definition: hdf5printer_v2.hpp:1529 int valid[NBUFFERS][SIZE] Definition: new_mpi_datatypes.hpp:142 void open_dataset(hid_t location_id) Open dataset on disk and obtain HDF5 handles. Definition: hdf5printer_v2.cpp:191 std::string myname() const Retrieve name of the dataset we are supposed to access. Definition: hdf5printer_v2.cpp:76 void finalise(bool abnormal=false) Definition: hdf5printer_v2.cpp:1790 std::size_t get_Npoints() Report number of points currently in the buffer. Definition: hdf5printer_v2.cpp:458 void resynchronise() Make sure all buffers know about all points in all buffers. Definition: hdf5printer_v2.cpp:1205 std::vector< T > get_chunk(std::size_t offset, std::size_t length) const Extract a data slice from the linked dataset. Definition: hdf5printer_v2.hpp:456 std::size_t get_Nbuffers() Report number of buffers that we are managing. Definition: hdf5printer_v2.cpp:904 void reset(bool force=false) Definition: hdf5printer_v2.cpp:1776 bool get_exists_on_disk() const Variable tracking whether the dataset is known to exist in the output file yet. Definition: hdf5printer_v2.cpp:79 virtual void create_dataset(hid_t location_id)=0 Create a new dataset at the specified location (implemented in derived class since need to know the t... std::map< std::string, HDF5BufferBase * > all_buffers Map containing pointers to all buffers managed by this object;. Definition: hdf5printer_v2.hpp:1379 Options resume_reader_options() Definition: hdf5printer_v2.cpp:2048 void close_and_unlock_file() Close (and unlock) output HDF5 file and release HDF5 handles. Definition: hdf5printer_v2.cpp:808 Constructable class for doing basic operations on a HDF5 dataset. Definition: hdf5printer_v2.hpp:203 std::pair< hid_t, hid_t > select_hyperslab(std::size_t offset, std::size_t length) const Obtain memory and dataspace identifiers for writing to a hyperslab in the dataset. Definition: hdf5printer_v2.cpp:291 hid_t openFile(const std::string &fname, bool overwrite, bool &oldfile, const char access_type='r') File and group manipulation. Definition: hdf5tools.cpp:182 std::map< PPIDpair, std::size_t > get_position_map(const std::vector< PPIDpair > &buffer) const Obtain positions in output datasets for a buffer of points. Definition: hdf5printer_v2.cpp:961 void ensure_file_is_open() const Ensure HDF5 file is open (and locked for us to use) Definition: hdf5printer_v2.cpp:766 HDF5 printer version 2. HDF5DataSetBase(const std::string &name, const hid_t hdftype_id) HDF5DataSetBase member functions. Definition: hdf5printer_v2.cpp:38 static const std::size_t NBUFFERS Definition: new_mpi_datatypes.hpp:134 HDF5MasterBuffer buffermaster Object interfacing to HDF5 file and all datasets. Definition: hdf5printer_v2.hpp:1553 EXPORT_SYMBOLS unsigned long long int & get_point_id() Returns unigue pointid;. Definition: printer_id_tools.cpp:13 HDF5Printer2 * get_HDF5_primary_printer() Get pointer to primary printer of this class type (get_primary_printer returns a pointer-to-base) ... Definition: hdf5printer_v2.cpp:1927 const int h5v2_bufdata_type(14) hid_t get_location_id() Retrieve the location_id specifying where output should be created in the HDF5 file. Definition: hdf5printer_v2.cpp:1178 HDF5Printer2(const Options &options, BasePrinter *const primary=NULL) Constructor (for construction via inifile options) Definition: hdf5printer_v2.cpp:1330 HDF5_BACKEND_TYPES void add_aux_buffer(HDF5MasterBuffer &aux_buffermaster) Add buffer to the primary printers records. Definition: hdf5printer_v2.cpp:1759 void check_consistency(bool attempt_repair) Check all datasets in a group for length inconsistencies and correct them if possible. Definition: hdf5printer_v2.cpp:1559 Definition: log_tags.hpp:38 bool hasKey(const args &... keys) const Getters for key/value pairs (which is all the options node should contain) Definition: yaml_options.hpp:67 void reset() Clear all data in buffers and on disk for this printer. Definition: hdf5printer_v2.cpp:852 General small utility functions. EXPORT_SYMBOLS bool endsWith(const std::string &str, const std::string &suffix) Checks whether `str' ends with `suffix'. Definition: util_functions.cpp:367 int inttype_from_h5type(hid_t h5type) Definition: hdf5tools.cpp:783 std::size_t used_size Definition: new_mpi_datatypes.hpp:135 std::set< PPIDpair > buffer_set Set detailing what points are in the buffer. Definition: hdf5printer_v2.hpp:660 hid_t get_hdftype_id() const Retrieve the HDF5 type ID for this dataset. Definition: hdf5printer_v2.cpp:93 Definition: log_tags.hpp:35 std::size_t get_dset_length() const Retrieve the current size of the dataset on disk. Definition: hdf5printer_v2.cpp:132 bool dataset_exists(const hid_t loc_id) Check if our dataset exists on disk with the required name at the given location. ... Definition: hdf5printer_v2.cpp:96 std::map< ulong, ulong > get_highest_PPIDs_from_HDF5() Search the existing output and find the highest used pointIDs for each rank. Definition: hdf5printer_v2.cpp:1946 void initialise(const std::vector< int > &) Base class virtual function overloads (the public virtual interface) Definition: hdf5printer_v2.cpp:1770 std::set< PPIDpair > buffered_points_set We also need a set of the buffered points, so we can do fast lookup of whether a point is in the buff... Definition: hdf5printer_v2.hpp:1389 void update_buffer_map(const std::string &label, HDF5BufferBase &buff) Add base class pointer for a buffer to master buffer map. Definition: hdf5printer_v2.cpp:865 HDF5DataSetBasic(const std::string &name) HDF5DataSetBasic member functions. Definition: hdf5printer_v2.cpp:346 void define_mpiHDF5bufferchunk() std::string get_group() Report which group in the output file we are targeting. Definition: hdf5printer_v2.cpp:451 hsize_t chunkdims[DSETRANK] Definition: hdf5printer_v2.hpp:159 HDF5BufferBase(const std::string &name, const bool sync) Constructor. Definition: hdf5printer_v2.cpp:362 std::vector< HDF5MasterBuffer * > aux_buffers Vector of pointers to master buffer objects for auxilliary printers Only the primary printer will hav... Definition: hdf5printer_v2.hpp:1557 virtual int get_type_id() const =0 Retrieve the integer type ID for this dataset. Definition: log_tags.hpp:36 Definition: log_tags.hpp:37 const Logging::endofmessage EOM Explicit const instance of the end of message struct in Gambit namespace. Definition: logger.hpp:99 const int h5v2_BLOCK(30) bool synchronised Flag to specify what sort of buffer this manager is supposed to be managing. Definition: hdf5printer_v2.hpp:1392 Utils::FileLock hdf5out File locking object for the output hdf5 file. Definition: hdf5printer_v2.hpp:1425 Logging::LogMaster & logger() Function to retrieve a reference to the Gambit global log object. Definition: logger.cpp:95 hid_t getH5DatasetType(hid_t group_id, const std::string &dset_name) Get type of an object in a group. Definition: hdf5tools.cpp:631 bool is_synchronised() Report what sort of buffers we are managing. Definition: hdf5printer_v2.cpp:436 const std::map< std::string, HDF5BufferBase * > & get_all_buffers() Retrieve a map containing pointers to all buffers managed by this object. Definition: hdf5printer_v2.cpp:1196 std::vector< PPIDpair > buffered_points Vector of PPIDpairs that are currently stored in the printer buffers This also defines the order in w... Definition: hdf5printer_v2.hpp:1385 void create_dataset(hid_t location_id) Create a new dataset at the specified location (implemented in derived class since need to know the t... Definition: hdf5printer_v2.cpp:350 bool checkFileReadable(const std::string &fname, std::string &msg) Check if hdf5 file exists and can be opened in read/write mode. Definition: hdf5tools.cpp:268 TYPE getValueOrDef(TYPE def, const args &... keys) const Definition: yaml_options.hpp:115 unsigned int ranks[SIZE] Definition: new_mpi_datatypes.hpp:139 bool synchronised Flag to tell us whether this buffer should perform block writes to the output dataset, or look up and overwrite existing points. Definition: hdf5printer_v2.hpp:655 Definition: log_tags.hpp:53 const int h5v2_BEGIN(31) std::vector< std::string > lsGroup(hid_t group_id) List object names in a group. Definition: hdf5tools.cpp:593 std::string get_filename() Report name (inc. path) of output file. Definition: hdf5printer_v2.cpp:1952 std::set< PPIDpair > get_points_set() const Report all the points in this buffer. Definition: hdf5printer_v2.cpp:380 std::vector< std::pair< std::string, int > > get_all_dset_names_on_disk() Get names and types of all datasets in the group that we are pointed at. Definition: hdf5printer_v2.cpp:588 void create_dataset(hid_t location_id) Create a new dataset at the specified location. Definition: hdf5printer_v2.hpp:526 int type_id Integer identifier for the template type of this dataset (determined by derived type) ... Definition: hdf5printer_v2.hpp:199 void update_all_buffers(const PPIDpair &ppid) Inform all buffers that data has been written to certain mpirank/pointID pair They will make sure tha... Definition: hdf5printer_v2.cpp:895 long long values_int[NBUFFERS][SIZE] Definition: new_mpi_datatypes.hpp:141 void set_exists_on_disk() Definition: hdf5printer_v2.cpp:80 std::size_t used_nbuffers Definition: new_mpi_datatypes.hpp:136 void lock_and_open_file(const char access_type='w') Open (and lock) output HDF5 file and obtain HDF5 handles. Definition: hdf5printer_v2.cpp:777 constexpr int h5v2_type< double >() Definition: hdf5tools.hpp:286 bool exists_on_disk Variable tracking whether the dataset is known to exist in the output file yet. Definition: hdf5printer_v2.hpp:173 hsize_t maxdims[DSETRANK] Definition: hdf5printer_v2.hpp:158 std::size_t get_buffer_length() Report length of buffer for HDF5 output. Definition: hdf5printer_v2.cpp:1964 std::string _dset_name Name of dataset for which this object is the buffer. Definition: hdf5printer_v2.hpp:651 EXPORT_SYMBOLS warning & printer_warning() Printer warnings. Definition: standalone_error_handlers.cpp:100 bool all_buffers_empty() Report whether all the buffers are empty. Definition: hdf5printer_v2.cpp:1146 std::string get_groupname() Report group in output HDF5 file of output datasets. Definition: hdf5printer_v2.cpp:1958 hid_t openGroup(hid_t file_id, const std::string &name, bool nocreate=false) Definition: hdf5tools.cpp:512 bool is_synchronised() const Report whether this buffer is synchronised. Definition: hdf5printer_v2.cpp:374 int name_id[NBUFFERS] Definition: new_mpi_datatypes.hpp:137 std::set< T > set_diff(const std::set< T > &set1, const std::set< T > &set2) Definition: hdf5printer_v2.hpp:101 std::string buffer_status() Report status of non-empty buffers (as a string message) Definition: hdf5printer_v2.cpp:1157 hid_t get_dset_id() const Retrieve the dataset ID for the currently open dataset. Definition: hdf5printer_v2.cpp:83 #define DEFINE_GET_BUFFER(TYPE) Specialisation declarations for 'get_buffer' function for each buffer type. Definition: hdf5printer_v2.cpp:1289 bool checkGroupReadable(hid_t location, const std::string &groupname, std::string &msg) Check if a group exists and can be accessed. Definition: hdf5tools.cpp:302 void ensure_dataset_exists(const hid_t loc_id, const std::size_t length) Ensure that a correctly named dataset exists at the target location with the specified length... Definition: hdf5printer_v2.cpp:114 std::map< ulong, ulong > get_highest_PPIDs(const int mpisize) Search the existing output and find the highest used pointIDs for each rank. Definition: hdf5printer_v2.cpp:1061 std::size_t get_next_free_position() Get next available position in the synchronised output datasets. Definition: hdf5printer_v2.cpp:920 void setValue(const KEYTYPE &key, const VALTYPE &val) Basic setter, for adding extra options. Definition: yaml_options.hpp:135 HDF5MasterBuffer(const std::string &filename, const std::string &groupname, const bool sync, const std::size_t buffer_length) Constructor. Definition: hdf5printer_v2.cpp:390 Base class for interfacing to a HDF5 dataset. Definition: hdf5printer_v2.hpp:110 bool isDataSet(hid_t group_id, const std::string &name) Check if an object in a group is a dataset. Definition: hdf5tools.cpp:616 A collection of tools for interacting with HDF5 databases. double get_sizeMB() Report upper limit estimate of size of all buffer data in MB. Definition: hdf5printer_v2.cpp:912 const std::set< PPIDpair > & get_all_points() Retrieve set containing all points currently known to be in these buffers. Definition: hdf5printer_v2.cpp:1199 HDF5Printer2 * link_primary_printer(BasePrinter *const primary) Convert pointer-to-base for primary printer into derived type. void extend_all_datasets_to(const std::size_t length) Extend all datasets to the specified size;. Definition: hdf5printer_v2.cpp:1185 unsigned long long pointIDs[SIZE] Definition: new_mpi_datatypes.hpp:138 pointID / process number pair Used to identify a single parameter space point Definition: new_mpi_datatypes.hpp:90 Class to manage all buffers for a given printer object Also handles the file locking/access to the ou... Definition: hdf5printer_v2.hpp:1181 std::size_t get_buffer_length() Report length of buffer for HDF5 output. Definition: hdf5printer_v2.cpp:442 double values[NBUFFERS][SIZE] Definition: new_mpi_datatypes.hpp:140 std::string dset_name() const Report name of dataset for which we are the buffer. Definition: hdf5printer_v2.cpp:368 void extend_dset_to(const std::size_t new_size) Extend dataset to the specified size, filling it with default values. Definition: hdf5printer_v2.cpp:146 std::size_t virtual_dset_length Variable tracking size of dataset on disk. Definition: hdf5printer_v2.hpp:170 static const std::size_t SIZE Definition: new_mpi_datatypes.hpp:133 int get_type_id() const Retrieve the integer type ID for this dataset. Definition: hdf5printer_v2.cpp:90 void untrack_points(const std::set< PPIDpair > &removed_points) Remove points from buffer tracking. Definition: hdf5printer_v2.cpp:1259 void extend_dset_by(const std::size_t extend_by) Set the variable that tracks the (virtual) dataset size on disk. Definition: hdf5printer_v2.cpp:171 |