diff --git a/scripts/test_filedma.sh b/scripts/test_filedma.sh index 4d3e1e2d33e14ae288e995b8183744b94888861d..7180a8239dfb55a1bd241ed89a15339d30e043a3 100755 --- a/scripts/test_filedma.sh +++ b/scripts/test_filedma.sh @@ -116,6 +116,7 @@ function run_filedma_test() { if [[ $(echo "${output_files}" | wc -l) -gt 1 ]]; then # Since the list has been sorted, take the first (and "earliest") one with `head` output_file=$(echo "${output_files}" | head -n 1) + stat $output_file else # Single matched file output_file="${output_files}" @@ -161,7 +162,7 @@ function run_all_tests () { gmt_failed=$? run_filedma_test "CALO" ${timeout_secs} "${CONFIG_DIR}/filedma-calo.json5" calo_failed=$? - run_filedma_test "PASS_GMT" ${timeout_secs} "${CONFIG_DIR}/filedma-passthrough.json5" + run_filedma_test "PASS_CALO" ${timeout_secs} "${CONFIG_DIR}/filedma-passthrough.json5" passthrough_failed=$? if [[ ${expects_output} = false ]]; then diff --git a/src/config.h b/src/config.h index 58453dc7cb0557d344b6d9fe72b26d91f319b321..a0c0c2e8a51cd536b6000fcd83613ed9a3efffe9 100644 --- a/src/config.h +++ b/src/config.h @@ -110,7 +110,7 @@ class ConfigMap { } else if constexpr (std::is_same_v<T, uint32_t>) { return static_cast<uint32_t>(std::stoul(str)); } else if constexpr (std::is_same_v<T, uint64_t>) { - return static_cast<uint32_t>(std::stoull(str)); + return static_cast<uint64_t>(std::stoull(str)); } else if constexpr (std::is_same_v<T, int>) { return static_cast<int>(std::stoi(str)); } else { @@ -204,6 +204,9 @@ class Config { friend std::ostream &operator<<(std::ostream &os, const Config &config) { os << config.dict_ << std::endl; os << "Number of input streams / output files: " << config.input_streams_.size() << std::endl; + os << "Number of orbits per file: " << config.num_orbits_per_file_ << std::endl; + os << "Max file size: " << config.max_file_size_ << std::endl; + os << "Force write-out? " << (config.force_write_out_ ? "true" : "false") << std::endl; return os; } diff --git a/src/pipeline.cc b/src/pipeline.cc index 0d6e2c284d270726f965fa9d877027aa7802a2df..1245d7f6199272703a1895a8e35a65e5820213bb 100644 --- a/src/pipeline.cc +++ b/src/pipeline.cc @@ -100,11 +100,12 @@ Pipeline::Pipeline(ConfigView conf_view, uint max_tokens_per_thread) } MultiPipeline::MultiPipeline(Config c) : conf_(std::move(c)) { + LOG(DEBUG) << "Loaded configuration:"; + LOG(DEBUG) << conf_; uint32_t num_pipelines = conf_.input_streams_.size(); for (uint32_t pipeline_id = 0; pipeline_id < num_pipelines; pipeline_id++) { try { pipelines_.emplace_back(ConfigView{conf_, pipeline_id}); - LOG(DEBUG) << "-Configuration loaded"; LOG(DEBUG) << "-Pipeline set up"; } catch (std::invalid_argument &e) { LOG(FATAL) << "-Configuration invalid! Error text is \"" << e.what() << "\" Bailing out."; diff --git a/test/config/filedma-passthrough.json5 b/test/config/filedma-passthrough.json5 index ef3be3e5bfd5377c9b433eb019913babcfdff5c9..5573c2746f8051b6efc65d2f3f43219973431ea7 100644 --- a/test/config/filedma-passthrough.json5 +++ b/test/config/filedma-passthrough.json5 @@ -5,7 +5,7 @@ // "wzdma" for DMA driver from Wojciech M. Zabolotny // "filedma" for reading from file and simulating DMA // "micronDMA" for PICO driver - // "tcpip" for TCP/IP input receving + // "tcpip" for TCP/IP input receiving input: "filedma", // DMA device dma_dev: "/dev/xdma0_c2h_0", @@ -20,7 +20,7 @@ // Extra settings for "filedma" input input_files: [ // Must have at least the same cardinality as input_streams; kept isolated since `FileDMA` is a development feature - "test/data/gmt_testfile.dat" + "test/data/calo_testfile.dat" ], // Processing types (unpacking): // "PASS_THROUGH", "GMT", "CALO", "BRIL". @@ -38,9 +38,9 @@ doZS: "yes", // Output settings ///////////////////////////////////////////////// - output_filename_prefix: "scout_PASS0_GMT", + output_filename_prefix: "scout_PASS_CALO", output_filename_base: "test/data/run000000", - output_filename_suffix: ".dat", + output_filename_suffix: "000000.dat", max_file_size: 8589934592, // Always write data to a file regardless of the run status output_force_write: "yes", diff --git a/test/data/.sha256/PASS_GMT_104857600_67ddf197 b/test/data/.sha256/PASS_CALO_104857600_67ddf197 similarity index 100% rename from test/data/.sha256/PASS_GMT_104857600_67ddf197 rename to test/data/.sha256/PASS_CALO_104857600_67ddf197