Skip to content

add deterministic build to cmake#82

Merged
anton-seaice merged 2 commits intomasterfrom
76-deterministic
Dec 17, 2025
Merged

add deterministic build to cmake#82
anton-seaice merged 2 commits intomasterfrom
76-deterministic

Conversation

@anton-seaice
Copy link
Copy Markdown
Collaborator

@anton-seaice anton-seaice commented Dec 15, 2025

Contributes to #76

Enables deterministic binaries to be built through CMake

@anton-seaice anton-seaice self-assigned this Dec 15, 2025
@anton-seaice
Copy link
Copy Markdown
Collaborator Author

anton-seaice commented Dec 15, 2025

From local testing with ACCESS-NRI/access-spack-packages@aba5001, the current default is maintained :

==> [2025-12-15-11:25:52.480823] Concretized access-om2 ^cice5 blckx=30 blcky=27 mxblcks=4 nxglob=1440 nyglob=1080
 -   5avhmog  access-om2@latest%intel@19.0.5.281~deterministic build_system=bundle arch=linux-rocky8-x86_64
 -   qoc6x6k      ^cice5@stable%intel@19.0.5.281~deterministic~ipo blckx=30 blcky=27 build_system=cmake build_type=Release dev_path=/g/data/tm70/as2285/model-code/cice5 generator=make io_type=PIO model=access-om2 mxblcks=4 nxglob=1440 nyglob=1080 arch=linux-rocky8-x86_64

Which installs fine

Adding +deterministic also works:

==> Concretized access-om2 ^cice5 blckx=30 blcky=27 mxblcks=4 nxglob=1440 nyglob=1080
 -   rgd554t  access-om2@latest%intel@19.0.5.281+deterministic build_system=bundle arch=linux-rocky8-x86_64
 -   fuvmzvl      ^cice5@stable%intel@19.0.5.281+deterministic~ipo blckx=30 blcky=27 build_system=cmake build_type=Release dev_path=/g/data/tm70/as2285/model-code/cice5 generator=make io_type=PIO model=access-om2 mxblcks=4 nxglob=1440 nyglob=1080 arch=linux-rocky8-x86_64

Note the build flags are added (-g0 -O0 -axCORE-AVX2 -debug none -check none -assume buffered_io) :

==> cice5: Executing phase: 'build'
==> [2025-12-15-13:14:29.080625] 'make' '-j16'
/apps/cmake/3.31.6/bin/cmake -S/g/data/tm70/as2285/model-code/cice5 -B/scratch/tm70/as2285/tmp/spack-stage/spack-stage-cice5-stable-fuvmzvllgyhcgbfc73spjkenw66n3po3/spack-build-fuvmzvl --check-build-system CMakeFiles/Makefile.cmake 0
/apps/cmake/3.31.6/bin/cmake -E cmake_progress_start /scratch/tm70/as2285/tmp/spack-stage/spack-stage-cice5-stable-fuvmzvllgyhcgbfc73spjkenw66n3po3/spack-build-fuvmzvl/CMakeFiles /scratch/tm70/as2285/tmp/spack-stage/spack-stage-cice5-stable-fuvmzvllgyhcgbfc73spjkenw66n3po3/spack-build-fuvmzvl//CMakeFiles/progress.marks
make  -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/scratch/tm70/as2285/tmp/spack-stage/spack-stage-cice5-stable-fuvmzvllgyhcgbfc73spjkenw66n3po3/spack-build-fuvmzvl'
make  -f CMakeFiles/cice.dir/build.make CMakeFiles/cice.dir/depend
make[2]: Entering directory '/scratch/tm70/as2285/tmp/spack-stage/spack-stage-cice5-stable-fuvmzvllgyhcgbfc73spjkenw66n3po3/spack-build-fuvmzvl'
cd /scratch/tm70/as2285/tmp/spack-stage/spack-stage-cice5-stable-fuvmzvllgyhcgbfc73spjkenw66n3po3/spack-build-fuvmzvl && /apps/cmake/3.31.6/bin/cmake -E cmake_depends "Unix Makefiles" /g/data/tm70/as2285/model-code/cice5 /g/data/tm70/as2285/model-code/cice5 /scratch/tm70/as2285/tmp/spack-stage/spack-stage-cice5-stable-fuvmzvllgyhcgbfc73spjkenw66n3po3/spack-build-fuvmzvl /scratch/tm70/as2285/tmp/spack-stage/spack-stage-cice5-stable-fuvmzvllgyhcgbfc73spjkenw66n3po3/spack-build-fuvmzvl /scratch/tm70/as2285/tmp/spack-stage/spack-stage-cice5-stable-fuvmzvllgyhcgbfc73spjkenw66n3po3/spack-build-fuvmzvl/CMakeFiles/cice.dir/DependInfo.cmake "--color="
make[2]: Leaving directory '/scratch/tm70/as2285/tmp/spack-stage/spack-stage-cice5-stable-fuvmzvllgyhcgbfc73spjkenw66n3po3/spack-build-fuvmzvl'
make  -f CMakeFiles/cice.dir/build.make CMakeFiles/cice.dir/build
make[2]: Entering directory '/scratch/tm70/as2285/tmp/spack-stage/spack-stage-cice5-stable-fuvmzvllgyhcgbfc73spjkenw66n3po3/spack-build-fuvmzvl'
[  1%] Building Fortran object CMakeFiles/cice.dir/source/ice_kinds_mod.F90.o
/g/data/tm70/as2285/spack/om2/spack/lib/spack/env/intel/ifort -DAusCOM -DBLCKX=30 -DBLCKY=27 -DMXBLCKS=4 -DNBGCLYR=0 -DNICECAT=5 -DNICELYR=4 -DNSNWLYR=1 -DNTRAERO=0 -DNUMAX=99 -DNUMIN=11 -DNXGLOB=1440 -DNYGLOB=1080 -DOASIS3_MCT -DPIO -DTRAGE=1 -DTRBGCS=0 -DTRBRI=1 -DTRFY=1 -DTRLVL=1 -DTRPND=1 -Dcoupled -Dgather_scatter_barrier -Dncdf -I/g/data/tm70/as2285/spack/om2/release/linux-rocky8-x86_64/intel-19.0.5.281/libaccessom2-git.2025.05.001_access-om2-thkgdru7oxrhwht33zppfnezv6zcwhv7/include -I/g/data/tm70/as2285/spack/om2/release/linux-rocky8-x86_64/intel-19.0.5.281/datetime-fortran-1.7.0-plp2j6kj3l6dsezhgnnmuk3ewonzeumv/include -I/g/data/tm70/as2285/spack/om2/release/linux-rocky8-x86_64/intel-19.0.5.281/oasis3-mct-git.2025.03.001_2025.03.001-cqrkvop7yxvkwbnkuylvmkbwmupjizux/include/psmile.MPI1 -I/g/data/tm70/as2285/spack/om2/release/linux-rocky8-x86_64/intel-19.0.5.281/oasis3-mct-git.2025.03.001_2025.03.001-cqrkvop7yxvkwbnkuylvmkbwmupjizux/include/mct -I/g/data/tm70/as2285/spack/om2/release/linux-rocky8-x86_64/intel-19.0.5.281/oasis3-mct-git.2025.03.001_2025.03.001-cqrkvop7yxvkwbnkuylvmkbwmupjizux/include/mpeu -I/g/data/tm70/as2285/spack/om2/release/linux-rocky8-x86_64/intel-19.0.5.281/oasis3-mct-git.2025.03.001_2025.03.001-cqrkvop7yxvkwbnkuylvmkbwmupjizux/include/scrip -I/apps/openmpi-mofed5.8-pbs2021.1/4.1.5/include -I/apps/openmpi/4.1.5/include/Intel -I/g/data/tm70/as2285/spack/om2/release/linux-rocky8-x86_64/intel-19.0.5.281/netcdf-fortran-4.6.1-kcclk3via6pbclgeqmqctqy5jhtk32rg/include -I/g/data/tm70/as2285/spack/om2/release/linux-rocky8-x86_64/intel-19.0.5.281/netcdf-c-4.9.2-4gvdadfiezccbpngv4ggrwd25w3ryq2l/include -I/g/data/tm70/as2285/spack/om2/release/linux-rocky8-x86_64/intel-19.0.5.281/parallelio-git.06e79373ae7f344833ba70a5958b53cd7a46adef_2.6.2-3ghzpheqlknogfxlseulzrldsxqnd56d/include -r8 -i4 -w -fpe0 -ftz -convert big_endian -assume byterecl -check noarg_temp_created -fp-model precise -fp-model source -align all -g0 -O0 -axCORE-AVX2 -debug none -check none -assume buffered_io -pthread -c /g/data/tm70/as2285/model-code/cice5/source/ice_kinds_mod.F90 -o CMakeFiles/cice.dir/source/ice_kinds_mod.F90.o

@anton-seaice anton-seaice marked this pull request as ready for review December 15, 2025 02:20
@anton-seaice
Copy link
Copy Markdown
Collaborator Author

Sorry - yet another one @dougiesquire !

Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
@dougiesquire
Copy link
Copy Markdown

@anton-seaice do the build-ci failures need attention?

Copy link
Copy Markdown

@dougiesquire dougiesquire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @anton-seaice

@anton-seaice anton-seaice merged commit fa89459 into master Dec 17, 2025
7 checks passed
@anton-seaice anton-seaice deleted the 76-deterministic branch December 17, 2025 02:18
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

Successfully merging this pull request may close these issues.

2 participants