Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Always" enable --trace #1844

Open
willend opened this issue Feb 7, 2025 · 0 comments
Open

"Always" enable --trace #1844

willend opened this issue Feb 7, 2025 · 0 comments

Comments

@willend
Copy link
Contributor

willend commented Feb 7, 2025

With current main, a manually converted instr needs -t to actually function with a subsequent mcrun, since mcrun now always transfers a --trace value (0/1/2) to the binary instrument:

(mcstas-3.x-dev/miniconda3) tmp $ mcstas mini.instr 

-----------------------------------------------------------

Generating single GPU kernel or single CPU section layout: 

-----------------------------------------------------------

Generating GPU/CPU -DFUNNEL layout:

-----------------------------------------------------------
CFLAGS=
(mcstas-3.x-dev/miniconda3) tmp $ mcrun mini.instr 
INFO: No output directory specified (--dir)
INFO: Using directory: "mini_20250207_124409"
INFO: Using existing c-file: ./mini.c
INFO: Recompiling: ./mini.out
INFO: ===
Error: trace not enabled (mcenabletrace)
Please re-run the McStas compiler with the --trace option, or rerun the
C compiler with the MC_TRACE_ENABLED macro defined.
INFO: call to ./mini.out failed with Command './mini.out --trace=0 --ncount=1000000 --dir=mini_20250207_124409 --format=McCode --bufsiz=10000000' returned non-zero exit status 1.
Traceback (most recent call last):

vs.

mcstas mini.instr -t

-----------------------------------------------------------

Generating single GPU kernel or single CPU section layout: 

-----------------------------------------------------------

Generating GPU/CPU -DFUNNEL layout:

-----------------------------------------------------------
CFLAGS=
(mcstas-3.x-dev/miniconda3) tmp $ mcrun mini.instr 
INFO: No output directory specified (--dir)
INFO: Using directory: "mini_20250207_124521"
INFO: Using existing c-file: ./mini.c
INFO: Recompiling: ./mini.out
INFO: ===
Instrument parameters for mini (mini.instr)
Set value of instrument parameter dummy (double) [default='0']:

Since --trace is useful for almost everyone / every use, we should default to include it - and instead include a --notrace to disable it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant