After digging into the source, I did not find any march option, but there is a 
MUJOCO_ENABLE_AVX variable that I can set to OFF (which I guess should disable 
both AVX-512 and AVX). 
I added this to the guix package, but it did not change anything. I also tried 
to add a march option in the compilation options and same it did not change 
anything. I did not find how to make sure that AVX was indeed disabled though, 
I hope the option was really applied.

So I don't know, it may be that the cause is not AVX but something that 
computer with AVX-512 have? Or maybe some dependency use AVX-512 but there are 
a lot of dependencies, I can't manually check the source on all of them. I will 
continue my investigation.

Thanks for the help,
Timothée

----- Mail original -----
> De: "Ludovic Courtès" <ludovic.cour...@inria.fr>
> À: "Timothee Mathieu" <timothee.math...@inria.fr>
> Cc: "Andreas Enge" <andr...@enge.fr>, "Steve George" <st...@futurile.net>, 
> "Cayetano Santos" <csant...@inventati.org>,
> "help-guix" <help-guix@gnu.org>
> Envoyé: Mercredi 14 Mai 2025 12:00:19
> Objet: Re: Reproducibility of guix shell container across different host OS

> Hi Timothée,
> 
> Timothee Mathieu <timothee.math...@inria.fr> writes:
> 
>> I am not sure if I understand everything about AVX, I tried to tune
>> the compilation to CPU without AVX with
>> https://hpc.guix.info/blog/2022/01/tuning-packages-for-a-cpu-micro-architecture/
>> in order to get reproducible results, but it did not work, maybe
>> because only a few of the dependency packages are tunable. Is there a
>> way to force everything to use AVX and not AVX-512? I understand that
>> AVX-512 is meant to be faster but I think in my case before being
>> faster I want to see if it is possible to be reproducible.
> 
> As the article above suggests, packages in Guix are in general built for
> the “baseline” x86_64 instruction set (so without AVX-512 extensions).
> 
> Sometimes that requires small modifications to the package’s build
> system because some of them explicitly pass flags like ‘-march=native’,
> which ends up producing code for whatever extensions the build machine
> supports rather than for the baseline instruction set.
> 
> It may be that you need to tweak your mujoco package along these lines?
> 
> HTH,
> Ludo’.

Reply via email to