Error when trying to set maxdetphoton from CLI

21 views
Skip to first unread message

Marco Nabacino

unread,
Oct 31, 2024, 8:32:31 PM10/31/24
to mmc-users
Dear Dr. Fang,

I'm having trouble setting the maximum number of detected photon when running mmc from the command line.

If I don't set it at all:
mmc -f input.json -d 1
the simulation runs fine.

If I set the -H flag like this:
mmc -f input.json -d 1 -H 10000000
then the simulation doesn't run, and I get the following error:
MMC ERROR(-1):incomplete input in unit mmc_utils.c:2669

If I move the -H flag before the -d flag:
mmc -f input.json -H 10000000 -d 1
then the simulation runs, but it ignores both flags, so that no detected photon data is outputted.

Finally, if I move it as the first flag:
mmc -H 10000000 -f input.json -d 1
mmc interactively asks for the simulation parameters (total photon number, RNG seed, source position etc.), rather than reading the json.

I've also tried using --maxdetphoton instead of -H and changing the number, but the result is still the same. I'm using MMC v2024.2 on Ubuntu 24.04.

Thank you very much,
best,
Marco

Fang, Qianqian

unread,
Nov 3, 2024, 2:41:42 PM11/3/24
to mmc-users
Thanks Marco, you were right, there is a bug in -H handling, I have just fixed it



Because the current nightly build is broken due to 


Please either use mmclab to get around this or locally build your binary with the break statement added.


From: mmc-...@googlegroups.com <mmc-...@googlegroups.com> on behalf of Marco Nabacino <marco....@gmail.com>
Sent: Thursday, October 31, 2024 4:29 PM
To: mmc-users <mmc-...@googlegroups.com>
Subject: [mmc-users] Error when trying to set maxdetphoton from CLI
 
--
You received this message because you are subscribed to the Google Groups "mmc-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mmc-users+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mmc-users/9efaca42-a40b-4808-a064-6fbcba6c3b45n%40googlegroups.com.

Marco Nabacino

unread,
Nov 5, 2024, 11:03:03 AM11/5/24
to mmc-users
Dear Dr. Fang,

thank you for the prompt response. I built the binary locally with the fix and now it works!

Thanks,
Marco

Reply all
Reply to author
Forward
0 new messages