hdf5printer.cpp
Go to the documentation of this file.
162 signaldata().check_if_shutdown_begun(); // Will throw a shutdown exception if an emergency shutdown command is received via MPI 174 std::map<unsigned long, unsigned long long int> HDF5Printer::get_highest_PPID_from_HDF5(hid_t group_id) 183 // Make sure the types used here don't get out of sync with the types used to write the original datasets 184 // We open the datasets in "resume" mode to access existing dataset, and make "const" to disable writing of new data. i.e. "Read-only" mode. 185 const DataSetInterfaceScalar<unsigned long long, CHUNKLENGTH> pointIDs(group_id, "pointID", true, 'r'); 186 const DataSetInterfaceScalar<int, CHUNKLENGTH> pointIDs_isvalid (group_id, "pointID_isvalid", true, 'r'); 188 const DataSetInterfaceScalar<int, CHUNKLENGTH> mpiranks_isvalid (group_id, "MPIrank_isvalid", true, 'r'); 201 errmsg << "Error retrieving highest PPID from previous dataset! Unequal dataset lengths detected in pointID and MPIrank datasets:" <<std::endl; 206 errmsg << "This indicates either a bug in the HDF5printer or corruption of the datasets (possibly due to unsafe shutdown)."; 212 const std::size_t REMAINDER = dset_length - (NCHUNKS*CHUNKLENGTH); // leftover after last full chunk 218 logger()<<"Begining iteration through existing HDF5 output for rank "<<getRank()<<", searching for previous highest pointID."<<EOM; 229 logger()<<"rank "<<getRank()<<": chunk "<<i<<": reading entries "<<offset<<" to "<<offset+length<<"."<<EOM; 242 errmsg << "Error retrieving highest PPID from previous dataset! Size of chunk vector retrieved from pointID dataset ("<<pID_chunk.size()<<") does not match CHUNKLENGTH ("<<CHUNKLENGTH<<"), nor the expected remainder for the last chunk ("<<REMAINDER<<"). This probably indicates a bug in the DataSetInterfaceScalar.get_chunk routine, please report it. Error occurred while reading chunk i="<<i<<std::endl; 251 errmsg << "Error retrieving highest PPID from previous dataset! Unequal chunk lengths retrieved while iterating through in pointID and MPIrank datasets:" <<std::endl; 257 errmsg << "This indicates either a bug in the HDF5printer or corruption of the datasets (possibly due to unsafe shutdown). Error occurred while reading chunk i="<<i<<std::endl; 268 errmsg << "Error retrieving highest PPID from previous dataset! Incompatible validity flags detected in pointID_isvalid and MPIrank_isvalid datasets at position j="<<j<<" in chunk i="<<i<<"(with CHUNKLENGTH="<<CHUNKLENGTH<<"). Specifically:"<<std::endl; 271 errmsg << "This most likely indicates a bug in the HDF5printer, but could indicate corruption of the datasets (possibly due to unsafe shutdown). Please report it."; 275 //std::cerr<<"rank "<<getRank()<<": Entry (valid="<<pIDvalid_chunk[j]<<"): rank="<<rank_chunk[j]<<" , pointID="<<pID_chunk[j]<<std::endl; 385 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."); 397 // Delete final target file (or group) if one with same name already exists? (and if we are restarting the run) 398 // This is just for convenience during testing; by default datasets will simply be replaced in/added to 399 // existing target HDF5 files. This lets one combine data from many scans into one file if desired. 409 std::cout << "File readable: " << finalfile << " : " << HDF5::checkFileReadable(finalfile, msg_finalfile) <<std::endl; 419 logger() << LogTags::printers << LogTags::info << "Running shell command: " << command.str() << EOM; 425 errmsg << "rank "<<myRank<<": Error deleting existing output file (requested by 'delete_file_on_restart' printer option; target filename is "<<finalfile<<")! popen failed to run the command (command was '"<<command.str()<<"')"; 432 errmsg << "rank "<<myRank<<": Error deleting existing output file (requested by 'delete_file_on_restart' printer option; target filename is "<<finalfile<<")! Shell command failed to executed successfully, see stderr (command was '"<<command.str()<<"')."; 441 std::cout << "Group readable: " << finalfile << " , " << group << " : " << HDF5::checkGroupReadable(file_id, group, msg_group) << std::endl; 446 errmsg << "Error preparing pre-existing output file '"<<finalfile<<"' for writing via hdf5printer! The requested output group '"<<group<<" already exists in this file! Please take one of the following actions:"<<std::endl; 447 errmsg << " 1. Choose a new group via the 'group' option in the Printer section of your input YAML file;"<<std::endl; 449 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; 451 errmsg << "*** Note: This error most commonly occurs when you try to resume a scan that has already finished! ***" <<std::endl; 461 if(get_resume()) // If in resume mode, need to combine any existing process-level temporary files 464 std::vector<std::string> tmp_files = find_temporary_files(true); //error if they are inconsistent 467 logger() << LogTags::info << "Found "<<tmp_files.size()<<" temporary files from previous scan; preparing to combine them" << EOM; 474 logger() << LogTags::info << "HDF5 files from previous scan combined successfully. Operation took "<<std::chrono::duration_cast<std::chrono::seconds>(time_taken).count()<<" seconds." << EOM; 478 logger() << LogTags::info << "No process-level temporary files found; skipping combination step." << EOM; 483 msg<<"No temporary output from a previous scan found (or it is unreadable); this will be treated as a NEW scan"; 490 else // If we are not in resume mode, need to delete any temporary files left lying around in our target directory from previous incomplete runs 499 logger() << LogTags::printers << LogTags::info << "Running shell command: " << command.str() << EOM; 505 errmsg << "rank "<<myRank<<": Error deleting old temporary output file (attempting to do this because '--restart' flag was detected. Target for deletion was "<<*it<<")! popen failed to run the command (command was '"<<command.str()<<"')"; 512 errmsg << "rank "<<myRank<<": Error deleting old temporary output file (attempting to do this because '--restart' flag was detected. Target for deletion was "<<*it<<")! Shell command failed to execute successfully, please check stderr (command was '"<<command.str()<<"')."; 523 std::cout <<"Rank "<<myRank<<": tmp_comb_file readable? "<<HDF5::checkFileReadable(tmp_comb_file)<<"(filename: "<<tmp_comb_file<<")"<<std::endl; 526 logger() << LogTags::info << "Scanning existing temporary combined output file, to prepare for adding new data" << EOM; 534 // We are supposed to be resuming, but specified group was not readable in the output file, so we can't. 536 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 ("<<tmp_comb_file<<"). Resuming is therefore not possible; aborting run... (see below for IO error message)"; 537 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)."; 549 std::map<unsigned long, unsigned long long int> highest_PPIDs = get_highest_PPID_from_HDF5(group_id); 563 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; 571 logger() << LogTags::info << "No temporary combined output file found; therefore no previous MPIrank/pointID pairs to parse. Will assume that this is a new run (since -r/--restart flag was not used)." << EOM; 575 // next unused pointID for this rank (actually we give it the highest known, it will iterate itself) 605 // Calls 'check_for_error_messages' function while waiting, in case master fails to process the files. 613 // TODO: Currently we have to do this even if no MPI is being used. Might just leave this for simplicity. 621 file_id = HDF5::openFile(tmpfile,false,oldfile,'w'); // Don't overwrite existing file; we will check here if it exists (via oldfile) and throw an error if it does. 625 errmsg << "Error! HDF5Printer attempted to open a temporary file for storing output data ("<<tmpfile<<"), however it found an existing file of the same name! This is a bug; pre-existing temporary files should already have been analysed and deleted before this point in the code."; 650 DBUG( std::cout << "Constructing Auxilliary HDF5Printer object (with name=\""<<printer_name<<"\" synchronised="<<synchronised<<")..." << std::endl; ) 681 std::pair<std::vector<std::string>,std::vector<size_t>> out = HDF5::find_temporary_files(finalfile); 691 errmsg << "HDF5Printer is attempting to resume from a previous run, but could not locate all the expected temporary output files (found "<<result.size()<<" temporary files, but are missing the files from the following ranks: "<<missing<<")! Resuming is therefore not possible; aborting run..."; 709 errmsg << "HDF5Printer: Tried to run function 'prepare_and_combined_tmp_files', however GAMBIT is not in 'resume' mode, and this is not the process with rank 0, so this is forbidden. This indicates a bug in the HDF5Printer logic, please report it."; 721 logger() << LogTags::repeat_to_cout << LogTags::info << "...Existing temporary combined output file was found and is readable" << EOM; 726 logger() << LogTags::repeat_to_cout << LogTags::info << "...No readable pre-existing temporary combined output file found" << EOM; 734 logger() << LogTags::repeat_to_cout << LogTags::info << "...No process-level temporary files found. No combination to perform." << EOM; 744 logger() << LogTags::repeat_to_cout << LogTags::info << "...Found "<<tmp_files.size()<<" process-level temporary files from a previous run. " << EOM; 758 errmsg << "Error! GAMBIT is in resume mode, however the chosen output system (HDF5Printer) could not locate/read all the required temporary files from the previous run (possibly there is no unfinished run to continue from). Resuming is therefore not possible; aborting run... (see below for IO error messages)"; 767 // (but do it in non-resume mode, since any potentially existing output file is unreadable anyway) 792 logger() << LogTags::repeat_to_cout << LogTags::printers << LogTags::info << "...Combination complete!" << EOM; 797 errmsg << " Process level temporary HDF5 output was detected, however the 'disable_combine_routines' option is set for the HDF5 printer plugin. The combine code is therefore not permitted to run, so this job cannot proceed. Please either manually combine the output files, restart the scan, or set this option to 'false'" << std::endl; 804 // Run by dependency resolver, which supplies the functors with a vector of VertexIDs whose requiresPrinting flags are set to true. 814 DBUG( std::cout << "Destructing HDF5Printer object (with name=\""<<printer_name<<"\")..." << std::endl; ) 824 std::cout << "Running finalise() routine for HDF5Printer (with name=\""<<printer_name<<"\", early="<<abnormal<<")"<<std::endl; 825 logger() << LogTags::printers << "Running finalise() routine for HDF5Printer (with name=\""<<printer_name<<"\")..." << EOM; 844 // Check that sync buffers have a consistent length, and that RA buffers have a consistent length 852 //std::cout << it->second->get_label() <<": "<< it->second->postponed_RA_queue_length() <<std::endl; 857 errmsg << "Error! There are (N="<<remaining_msgs<<") postponed random-access writes still left unwritten to disk in buffer "<<it->second->get_label()<<" at end of run! This may mean that some sync buffer data was not properly delivered from another process."; 863 std::cout << "dset: " << it->second->get_label() << ", length:" << it->second->get_dataset_length() << std::endl; 872 errmsg << "Error! Inconsistency detected in output dataset lengths during hdf5printer::finalise(). Datasets from buffer "<<it->second->get_label()<<" have length "<<it->second->get_dataset_length()<<", but previous sync datasets had length "<<dset_length<<"."; 882 errmsg << "Error! Inconsistency detected in output dataset lengths during hdf5printer::finalise(). Datasets from buffer "<<it->second->get_label()<<" have length "<<it->second->get_dataset_length()<<", but previous RA datasets had length "<<RA_dset_length<<"."; 897 errmsg << "rank "<<myRank<<": Error! Buffer "<<it->second->get_label()<<" reports sync_buffer_is_full()=true after finalise operations should be complete!"; 903 errmsg << "rank "<<myRank<<": Error! Buffer "<<it->second->get_label()<<" reports sync_buffer_is_empty()=false after finalise operations should be complete!"; 912 errmsg << "rank "<<myRank<<": Error! Buffer "<<it->second->get_label()<<" reports postponed_RA_queue_length!=0 (length is "<<it->second->postponed_RA_queue_length()<<") after finalise operations should be complete!"; 918 errmsg << "rank "<<myRank<<": Error! Buffer "<<it->second->get_label()<<" reports get_RA_queue_length()!=0 (length is "<<it->second->get_RA_queue_length()<<") after finalise operations should be complete!"; 938 if(not abnormal) // Don't do the combination in case of abnormal termination, since we cannot reliably wait for all the other processes to finish 941 logger() << LogTags::printers << "We are in normal shutdown mode, meaning that the run has finished and output files should be combined. However, the master process must wait for all workers to write their output to disk before attempting the combination. We are now entering this barrier; if we are master we will wait here; all other processes will just register entry and then continue." << EOM; 943 // TODO! What if the master finishes before other processes? Then it will sit here. But what then if an abnormal shutdown signal is received?? Then the other processes will not enter the barrier! This is bad. 945 // Also could just turn off the auto-combination and make the user "continue" the scan one final time to trigger the combination? 948 logger() << LogTags::printers << "Passed FINAL_SYNC point in HDF5Printer finalise() routine" << EOM; 956 logger() << LogTags::printers << "We are the master process: beginning combination of output files." << EOM; 961 logger() << LogTags::printers << "We are the master process: but 'disable_combine_routines' is set to true. SKIPPING combination of output files." << EOM; 967 logger() << LogTags::printers << "rank "<<myRank<<": HDF5Printer is terminating abnormally (usually if some signal, e.g. CTRL-C detected); temporary hdf5 files NOT combined! Combination will be attempted upon resuming the run." << EOM; 969 logger() << LogTags::printers << "rank "<<myRank<<": HDF5Printer finalise() completed successfully." << EOM; 975 void HDF5Printer::combine_output_py(const std::vector<std::string> tmp_files, const bool finalcombine) 983 command << "python "<< GAMBIT_DIR <<"/Printers/scripts/combine_hdf5.py --delete_tmp "<<tmp_comb_file<<" "<<group<<" "<<tmp_file_list.str()<<" 2>&1"; 992 errmsg << "rank "<<myRank<<": Error running HDF5 data combination script during HDF5Printer finalise()! popen failed to run the specified command (command was '"<<command.str()<<"')"; 1013 errmsg << "rank "<<myRank<<": Error running HDF5 data combination script during HDF5Printer finalise()! Script ran, but return code != 0 was encountered; stdout and stderr from the system call can be found in the log files."; 1023 command2 <<"cp "<<tmp_comb_file<<" "<<finalfile<<" && rm "<<tmp_comb_file; // Note, deletes old file if successful 1024 logger() << LogTags::printers << LogTags::info << "Running shell command: " << command2.str() << EOM; 1030 errmsg << "rank "<<myRank<<": Error copying combined HDF5 data to final location during HDF5Printer finalise()! popen failed to run the specified copy (and delete) command (command was '"<<command2.str()<<"')"; 1037 errmsg << "rank "<<myRank<<": Error copying combined HDF5 data to final location during HDF5Printer finalise()! Shell command failed to execute successfully, please check stderr (command was '"<<command2.str()<<"')."; 1046 void HDF5Printer::combine_output(const std::vector<std::string> tmp_files, const bool finalcombine) 1050 int num = tmp_files.size(); // We don't actually use their names here, Greg's code assumes that they 1054 // If we set the second last flag 'true' then Greg's code will assume that a '_temp_combined' output file 1056 bool combined_file_exists = Utils::file_exists(tmp_comb_file); // We already check this externally; pass in as flag? 1059 // Last flag, if false, tells routines to throw an error if any expected temporary file cannot be opened for any reason 1060 HDF5::combine_hdf5_files(tmp_comb_file, finalfile, group, num, combined_file_exists, true, false); 1069 command2 <<"cp "<<tmp_comb_file<<" "<<finalfile<<" && rm "<<tmp_comb_file; // Note, deletes old file if successful 1070 logger() << LogTags::printers << LogTags::info << "Running shell command: " << command2.str() << EOM; 1076 errmsg << "rank "<<myRank<<": Error copying combined HDF5 data to final location during HDF5Printer finalise()! popen failed to run the specified copy (and delete) command (command was '"<<command2.str()<<"')"; 1083 errmsg << "rank "<<myRank<<": Error copying combined HDF5 data to final location during HDF5Printer finalise()! Shell command failed to execute successfully, please check stderr (command was '"<<command2.str()<<"')."; 1098 errmsg << "Error! Tried to retrieve 'location_id' handle from HDF5Printer, but it is -1! This means the printer has not been set up correctly. This is a bug, please report it."; 1109 errmsg << "Error! Tried to retrieve 'RA_location' pointer from HDF5Printer, but it is -1! This means the printer has not been set up correctly. This is a bug, please report it."; 1155 errmsg << "Error! Supplied PPID already exists in global_index_lookup map! It should only be added once, so there is a bug in HDF5Printer. Please report this error."; 1163 for (BaseBufferMap::iterator it = primary_printer->all_buffers.begin(); it != primary_printer->all_buffers.end(); it++) 1184 unsigned long pointID = ppid.pointID; // unsigned versions were coming out gibberish in python... 1186 //std::cout << "rank "<<myRank<<": adding new RA PPID to list: (" << pointID << "," << mpirank << ")" << std::endl; 1189 // The call is a little bizarre because these are template functions from the base class, which 1213 unsigned long HDF5Printer::get_global_index(const unsigned long pointID, const unsigned int mpirank) 1223 std::cout<<"[pointID="<<it->first.first<<", mpirank="<<it->first.second<<"] : index="<<it->second<<std::endl; 1227 errmsg << "Error retrieving global index for pointID="<<pointID<<", mpirank="<<mpirank<<"; no corresponding global index found. This means this point has not yet passed through the primary printer. This function is called in preparation for writing to data files via random access, so possibly something has gone wrong there."; 1242 errmsg << "Error! synchronise_buffer() called by auxilliary hdf5 printer (name="<<printer_name<<")! Only the primary hdf5 printer is allowed to do this. This is a bug in the HDF5Printer class, please report it."; 1254 std::cout<<"rank "<<myRank<<": Synchronising buffers to position "<<sync_pos<<" (message from printer: "<<printer_name<<", is_auxilliary: "<<is_auxilliary_printer()<<", synchronised: "<<synchronised<<")"<<std::endl; 1316 errmsg << "Error! Tried to empty all synchronised buffers, but some of them were not full! (N_were_full ("<<N_were_full<<") != N_sync_buffers ("<<N_sync_buffers<<"). This indicates that a loss of synchronisation has occurred, which is a bug in the hdf5printer system. Please report it. (Note: rank="<<myRank<<", printer_name="<<printer_name<<")"; 1325 errmsg << "Error in HDF5Printer while trying to empty all synchronised buffers. Buffers were emptied to the HDF5 backend (seemingly) successfully, however H5Fflush returned an error value ("<<err<<"). That is, an error occurred while the HDF5 system attempted to flush its internally buffered data to disk. (Note: rank="<<myRank<<", printer_name="<<printer_name<<")"; 1373 errmsg << "Error! Tried to call reset() on the primary HDF5Printer (printer_name = "<<printer_name<<")! This would delete all the data from the scan and is not currently allowed! Probably this was called accidentally due to a bug."; 1379 errmsg << "Error! Tried to call reset() on an auxilliary HDF5Printer (printer_name = "<<printer_name<<") which is synchronised with the primary printer! This would delete all the point-level data written by this printer during the scan and is not currently allowed! Probably this was called accidentally due to a bug."; 1421 void HDF5Printer::check_sync(const std::string& label, const int sync_type, bool checkall=false) 1429 errmsg << "Error running 'check_sync'; flag 'checkall' set to true, but this is not the primary printer (it is "<<this->get_printer_name()<<") This is not allowed and is a bug, please fix it."; 1462 errmsg << "rank "<<myRank<<": Error! ("<<label<<"; ("<<sync_type_name<<") sync check) Buffers have gone out of sync in printer '"<<printer_name<<"'!"<<std::endl; \ 1520 std::cout<<"rank "<<myRank<<": New point detected (lastPointID="<<lastPointID<<", candidate_newpoint="<<candidate_newpoint<<")"<<std::endl; 1540 // So, in the end, with sync_pos = reverse_global_index_lookup.size() - 1 = get_N_pointIDs() - 1 1590 errmsg << "rank "<<myRank<<": Error! sync buffer with label "<<it->second->get_label()<<" is full! Should not be full at this point (printer="<<printer_name<<")";
unsigned long get_sync_pos() const Get the number of pointIDs know to this printer (should correspond to the number of "appends" each ac... Definition: hdf5printer.hpp:189 Define overloadings of the stream operator for various containers. bool seen_PPID_before(const PPIDpair &ppid) Ask the printer for the highest ID number known for a given rank process (needed for resuming... Definition: hdf5printer.cpp:1204 BaseBufferMap all_my_buffers Map containing pointers to all VertexBuffers contained in this printer. Definition: hdf5printer.hpp:351 unsigned long long int pointID Definition: new_mpi_datatypes.hpp:92 void common_constructor(const Options &) Tasks common to the various constructors. Definition: hdf5printer.cpp:334 hid_t get_location() const Retrieve pointer to HDF5 location to which datasets are added. Definition: hdf5printer.cpp:1093 std::vector< PPIDpair > reverse_global_index_lookup Definition: hdf5printer.hpp:366 void reset(bool force=false) Invalidate all data on disk which has been printed by this printer so far, and reset all the buffers ... Definition: hdf5printer.cpp:1362 unsigned long RA_dset_offset Offset needed to be added to the reverse lookup in order for it to match the output dataset position ... Definition: hdf5printer.hpp:370 std::string tmp_comb_file Definition: hdf5printer.hpp:324 void combine_output_py(const std::vector< std::string > tmp_files, const bool finalcombine) Combine temporary hdf5 output files from each process into a single coherent hdf5 file... Definition: hdf5printer.cpp:975 hid_t openFile(const std::string &fname, bool overwrite, bool &oldfile, const char access_type='r') File and group manipulation. Definition: hdf5tools.cpp:182 PPIDpair lastPointID ID of the point that this printer is currently working on. Definition: hdf5printer.hpp:355 Logging access header for GAMBIT. EXPORT_SYMBOLS unsigned long long int & get_point_id() Returns unigue pointid;. Definition: printer_id_tools.cpp:13 Definitions of new MPI datatypes needed by printers. void combine_output(const std::vector< std::string > tmp_files, const bool finalcombine) Combine temporary hdf5 output files from each process into a single coherent hdf5 file This version o... Definition: hdf5printer.cpp:1046 vertexID / sub-print index pair Identifies individual buffers (I call them VertexBuffer, but actually there can be more than one per vertex) Definition: new_mpi_datatypes.hpp:45 void reset_PPID_lists() Completely reset the PPIDlists (e.g. used when printer is reset) Definition: hdf5printer.cpp:1196 Greg's code for combining HDF5 output of multiple MPI processes. std::map< unsigned long, unsigned long long int > get_highest_PPID_from_HDF5(hid_t group_id) Definition: hdf5printer.cpp:174 GAMBIT signal handling functions. Definition: log_tags.hpp:38 void add_PPID_to_list(const PPIDpair &) Add PPIDpair to global index list. Definition: hdf5printer.cpp:1147 EXPORT_SYMBOLS bool check_if_shutdown_begun() Check for signals that early shutdown is required If an MPI message telling us to perform an emergenc... Definition: signal_handling.cpp:379 void synchronise_buffers() Function to ensure buffers are all synchronised to the same absolute position. Definition: hdf5printer.cpp:1237 bool hasKey(const args &... keys) const Getters for key/value pairs (which is all the options node should contain) Definition: yaml_options.hpp:67 General small utility functions. HDF5_BACKEND_TYPES bool is_stream_managed(VBIDpair &key) const HDF5Printer-specific functions. Definition: hdf5printer.cpp:1127 void flush() Empty all the buffers to disk Note: Empty sync buffers will not get flushed, to avoid writing extra b... Definition: hdf5printer.cpp:1333 HDF5 interface printer class declaration. void finalise(bool abnormal=false) Perform final cleanup and write tasks. Definition: hdf5printer.cpp:818 EXPORT_SYMBOLS bool file_exists(const std::string &filename) Check if a file exists. Definition: util_functions.cpp:241 bool synchronised Flag to specify whether all buffers created by this printer should be synchronised and iterated along... Definition: hdf5printer.hpp:386 void empty_sync_buffers(bool force=false) Check if the buffers are full and waiting to be emptied By default this only empties buffers if they ... Definition: hdf5printer.cpp:1289 EXPORT_SYMBOLS SignalData & signaldata() Retrieve global instance of signal handler options struct. Definition: signal_handling.cpp:633 hid_t get_RA_location() const Definition: hdf5printer.cpp:1104 Options resume_reader_options() Definition: hdf5printer.cpp:323 Definition: log_tags.hpp:36 void initialise(const std::vector< int > &) Virtual function overloads: Definition: hdf5printer.cpp:805 const Logging::endofmessage EOM Explicit const instance of the end of message struct in Gambit namespace. Definition: logger.hpp:100 void check_sync(const std::string &label, const int sync_type, bool checkall) For debugging: check that buffers are synced correctly Flag sets whether "perfect" sync is required... Definition: hdf5printer.cpp:1421 #define ERR_MSG EXPORT_SYMBOLS Logging::LogMaster & logger() Function to retrieve a reference to the Gambit global log object. Definition: logger.cpp:95 void combine_hdf5_files(const std::string output_file, const std::string &base_file_name, const std::string &group, const size_t num, const bool resume, const bool cleanup, const bool skip, const std::vector< std::string > input_files=std::vector< std::string >()) Definition: hdf5_combine_tools.hpp:455 EXPORT_SYMBOLS const str & ensure_path_exists(const str &) Ensure that a path exists (and then return the path, for chaining purposes) Definition: util_functions.cpp:227 void error_if_key_exists(const std::map< T, U > &m, const T &key, const std::string &tag) Helper function to check if a VertexBuffer key already exists in a map. Definition: hdf5printer.hpp:74 unsigned long dset_length() const Definition: DataSetInterfaceBase.hpp:111 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 Definition: log_tags.hpp:53 unsigned long get_global_index(const ulong pointID, const uint mpirank) Retrieve index from global lookup table, with error checking. Definition: hdf5printer.cpp:1213 Tools for accessing printers. A simple C++ wrapper for the MPI C bindings. void prepare_and_combine_tmp_files() Scan for existing temporary files, in preparation for combining them Should only do this if scan is r... Definition: hdf5printer.cpp:700 VertexBuffer abstract interface base class. Definition: VertexBufferBase.hpp:33 Exception objects required for standalone compilation. hid_t openGroup(hid_t file_id, const std::string &name, bool nocreate=false) Definition: hdf5tools.cpp:512 std::map< PPIDpair, unsigned long > global_index_lookup Map from pointID,thread pairs to absolute dataset indices. Definition: hdf5printer.hpp:363 HDF5Printer(const Options &, BasePrinter *const primary=NULL) Constructor (for construction via inifile options) Definition: hdf5printer.cpp:308 std::map< VBIDpair, VertexBufferBase * > BaseBufferMap Helpful typedefs. Definition: hdf5printer.hpp:70 Derived dataset interface, with methods for writing scalar records (i.e. Definition: DataSetInterfaceScalar.hpp:44 unsigned long get_N_RApointIDs() Get the number of RA write locations known to the primary printer NOTE: the meaning of this has chang... Definition: hdf5printer.hpp:263 std::string printer_name Label for printer, mostly for more helpful error messages. Definition: hdf5printer.hpp:373 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 bool is_primary_printer Flag to specify if this is the primary printer or not. Definition: hdf5printer.hpp:344 void setValue(const KEYTYPE &key, const VALTYPE &val) Basic setter, for adding extra options. Definition: yaml_options.hpp:135 EXPORT_SYMBOLS const PPIDpair nullpoint Define 'nullpoint' const. Definition: new_mpi_datatypes.cpp:185 void insert_buffer(VBIDpair &key, VertexBufferBase &newbuffer) Add a pointer to a new buffer to the global list. Definition: hdf5printer.cpp:1117 A collection of tools for interacting with HDF5 databases. bool disable_combine_routines Flag to disable combination of hdf5 output (user will have to run the combination routines manually) ... Definition: hdf5printer.hpp:347 void check_for_new_point(const PPIDpair &) Check whether printing to a new parameter space point is about to occur and perform adjustments neede... Definition: hdf5printer.cpp:1507 pointID / process number pair Used to identify a single parameter space point Definition: new_mpi_datatypes.hpp:90 std::pair< std::vector< std::string >, std::vector< size_t > > find_temporary_files(const std::string &finalfile) Search for temporary files to be combined. Definition: hdf5_combine_tools.cpp:1218 void check_for_error_messages() Definition: hdf5printer.cpp:160 std::vector< std::string > find_temporary_files(const bool error_if_inconsistent=false) Search the output directory for temporary files (pre-combination) Definition: hdf5printer.cpp:678 std::vector< T > get_chunk(std::size_t i, std::size_t length) const READ methods (perhaps can generalise to non-scalar case, but this doesn't exist yet for writing anywa... Definition: DataSetInterfaceScalar.hpp:375 BaseBufferMap all_buffers Things which other printers need access to. Definition: hdf5printer.hpp:409 Definition: log_tags.hpp:43 |