Closed g-buist closed 1 year ago
@g-buist, unfortunately I am not able to reproduce this - can you try the latest nightly build and see if the issue still exist?
I tested your commands on my Linux machine and the replay runs fine, all 2980 photons in the baseline simulation were re-detected in the replay
fangq@taote:~/space/git/Project/github/mcx/src$ ../bin/mcx --bench cube60 --saveseed -s test -F jnii
###############################################################################
# Monte Carlo eXtreme (MCX) -- CUDA #
# Copyright (c) 2009-2022 Qianqian Fang <q.fang at neu.edu> #
# http://mcx.space/ #
# #
# Computational Optics & Translational Imaging (COTI) Lab- http://fanglab.org #
# Department of Bioengineering, Northeastern University, Boston, MA, USA #
###############################################################################
# The MCX Project is funded by the NIH/NIGMS under grant R01-GM114365 #
###############################################################################
$Rev::31c0fa$v2022.10$Date::2023-05-04 16:12:10 -04$ by $Author::Qianqian Fang$
###############################################################################
- variant name: [Fermi] compiled by nvcc [9.0] with CUDA [9000]
- compiled with: RNG [xorshift128+] with Seed Length [4]
GPU=1 (NVIDIA TITAN V) threadph=6 extra=16960 np=1000000 nthread=163840 maxgate=1 repetition=1
initializing streams ... init complete : 1 ms
requesting 2560 bytes of shared memory
launching MCX simulation for time window [0.00e+00ns 5.00e+00ns] ...
simulation run# 1 ...
kernel complete: 84 ms
retrieving fields ... detected 2980 photons, total: 2980 transfer complete: 97 ms
normalizing raw data ... source 1, normalization factor alpha=200.000000
data normalization complete : 102 ms
saving data to file ... compressing data [zlib] ...compression ratio: 92.5% after encoding: 125.0%
saving data complete : 136 ms
compressing data [zlib] ...compression ratio: 11.0% after encoding: 14.9%
compressing data [zlib] ...compression ratio: 51.8% after encoding: 70.0%
compressing data [zlib] ...compression ratio: 99.8% after encoding: 134.9%
simulated 1000000 photons (1000000) with 163840 threads (repeat x1)
MCX simulation speed: 22222.22 photon/ms
total simulated energy: 1000000.00 absorbed: 17.76674%
(loss due to initial specular reflection is excluded in the total)
fangq@taote:~/space/git/Project/github/mcx/src$ ../bin/mcx --bench cube60 --saveseed -s test --seed test_detp.jdat
###############################################################################
# Monte Carlo eXtreme (MCX) -- CUDA #
# Copyright (c) 2009-2022 Qianqian Fang <q.fang at neu.edu> #
# http://mcx.space/ #
# #
# Computational Optics & Translational Imaging (COTI) Lab- http://fanglab.org #
# Department of Bioengineering, Northeastern University, Boston, MA, USA #
###############################################################################
# The MCX Project is funded by the NIH/NIGMS under grant R01-GM114365 #
###############################################################################
$Rev::31c0fa$v2022.10$Date::2023-05-04 16:12:10 -04$ by $Author::Qianqian Fang$
###############################################################################
- variant name: [Fermi] compiled by nvcc [9.0] with CUDA [9000]
- compiled with: RNG [xorshift128+] with Seed Length [4]
GPU=1 (NVIDIA TITAN V) threadph=0 extra=2980 np=2980 nthread=163840 maxgate=1 repetition=1
initializing streams ... init complete : 1 ms
requesting 2560 bytes of shared memory
launching MCX simulation for time window [0.00e+00ns 5.00e+00ns] ...
simulation run# 1 ...
kernel complete: 8 ms
retrieving fields ... detected 2980 photons, total: 2980 transfer complete: 21 ms
normalizing raw data ... source 1, normalization factor alpha=67114.093750
data normalization complete : 26 ms
saving data to file ... saving data complete : 26 ms
simulated 2980 photons (2980) with 163840 threads (repeat x1)
MCX simulation speed: 596.00 photon/ms
total simulated energy: 2980.00 absorbed: 34.91230%
(loss due to initial specular reflection is excluded in the total)
Thanks it indeed works as expected in the nightlybuild. I might have made a mistake before.
Running a benchmark script with -F mc2, saving the photon seeds and then running a replay with results.mch executes without errors. However running the same but with -F jnii and the replay with photon seed input from results_detp.jdat file gives an error for the replay. Checked and the .jdat format file with the photon seeds data exists and can be opened and read. It seems there is a problem with extracting the photon seeds for the rerun from the results_dept.jdat file.
The .mch format case:
===================================================== path for .mch file: "D:\MonteCarlo\OutputTest\results.mch"
The .jdat format case:
====================================================
================================================
The path to the .jdat file: "D:\MonteCarlo\OutputTest\results_detp.jdat"