benchpark
benchpark copied to clipboard
benchpark shows incorrect compile line/flags in logs
while testing stream on fugaku i came across this bug (will fix the real problem later in a PR)
==> No binary for stream-5.10-4aaoueupfe6vflmysh5bbs4xgxnvksmu found: installing from source
==> No patches needed for stream
==> stream: Executing phase: 'edit'
==> stream: Executing phase: 'build'
==> Error: ProcessError: Command exited with status 2:
'make' '-j16'
4 errors found in build log:
4 ==> [2024-03-09-14:55:37.640554] FILTER FILE: Makefile [replacing "CFLAGS = .*"]
5 ==> [2024-03-09-14:55:37.649467] FILTER FILE: Makefile [replacing "FFLAGS = .*"]
6 ==> stream: Executing phase: 'build'
7 ==> [2024-03-09-14:55:37.701297] 'make' '-j16'
8 /vol0005/mdt3/data/ra000020/u10016/benchpark.gnu/test.gnu/spack/lib/spack/env/gcc/gcc -O2 -fopenmp -
DSTREAM_ARRAY_SIZE=80000000 -DNTIMES=20 -c -o mysecond.o mysecond.c
9 /vol0005/mdt3/data/ra000020/u10016/benchpark.gnu/test.gnu/spack/lib/spack/env/gcc/gcc -O2 -fopenmp -
DSTREAM_ARRAY_SIZE=80000000 -DNTIMES=20 stream.c -o stream_c.exe
>> 10 gcc: error: unrecognized argument in option '-mcmodel=medium'
11 gcc: note: valid arguments to '-mcmodel=' are: large small tiny
as you can see, the compile line does not include "-mcmodel=medium" as the error suggests, so somehow benchpark is hiding the real compiler execution and flags from the log/user which isn't a good approach.
We should be recording this somewhere, but even though Benchpark enables the Spack options for this, I don't see the associated logs being generated, so I'll need to look into this.
In more detail:
Depending on how flags are encoded, Spack has a few mechanisms for applying compiler flags. One of them is to insert them at the wrapper level, so
/vol0005/mdt3/data/ra000020/u10016/benchpark.gnu/test.gnu/spack/lib/spack/env/gcc/gcc
will add more flags and invoke the underlying compiler.
These modifications should be logged when invoking Spack commands with -d
(a separate spack-cc...
log file), although I can't currently locate them within the Ramble workspace generated by Benchpark.
Also: any flags that don't appear in the log you listed would have to be package.py
for stream
, or in your compilers.yaml
config, so do you have a path forward for resolving the specific issue you mentioned? I acknowledge we should be keeping track, but I want to make sure you can resolve the error in your example for the time being.
Sorry for the long silence. Yes, i was able to find the correct spot and change it, and compile it eventually. Think we can close it for now, but eventually need a way to not fool the user by printing incorrect information. (no idea how tho, since i'm not the spack expert)