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

ESMF needs -fp-model=precise #9

Closed
anton-seaice opened this issue Jun 27, 2024 · 4 comments
Closed

ESMF needs -fp-model=precise #9

anton-seaice opened this issue Jun 27, 2024 · 4 comments
Assignees

Comments

@anton-seaice
Copy link
Contributor

anton-seaice commented Jun 27, 2024

Per COSIMA/access-om3#40 (comment) the ESMF dependency needs to be built with -fp-model=precise to ensure BFB reproducibility.

In the COSIMA spack we had ESMF+debug set, which may have included this flag.

We don't want to always build with debug and +debug has been removed in the config under test. We need to set -fp-model=precise separately for production build. Is this only an option for intel-compilers?

I think we need to update the ESMF package definition to include the fp-model=precise flag?

I am not totally on top of the details, we might need @micaeljtoliveira 's input to be sure of the details.

Ping @CodeGat

@CodeGat
Copy link
Contributor

CodeGat commented Jun 27, 2024

This might also need @harshula s eyes. Will look into it.

@harshula harshula self-assigned this Jul 18, 2024
@harshula
Copy link
Collaborator

Hi @micaeljtoliveira ,

The access-om3-nuopc SPD currently has: depends_on("parallelio fflags='-qno-opt-dynamic-align -convert big_endian -assume byterecl -ftz -traceback -assume realloc_lhs -fp-model source' cflags='-qno-opt-dynamic-align -fp-model precise -std=gnu99'"). i.e. fflags with fp-model set to source and cflags with fp-model set to precise.

Do you want depends_on("esmf@8.3.0:") to include cflags='-fp-model precise' and fflags='-fp-model precise' ?

@micaeljtoliveira
Copy link

In the COSIMA spack we had ESMF+debug set, which may have included this flag.

The debug variant will add the -debug and -g compiler flags, which, by default, will disable optimizations (one has to explicitly add the optimization flags to prevent this)). So in practice, as a side-effect, it does makes the build bit-wise reproducible.

Do you want depends_on("esmf@8.3.0:") to include cflags='-fp-model precise' and fflags='-fp-model precise' ?

If you want to enforce bit-wise reproducibility, yes.

@harshula
Copy link
Collaborator

Hi @anton-seaice , Can you please test the spack-packages development branch? It contains: ACCESS-NRI/spack-packages@main...development

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

No branches or pull requests

4 participants