# Ctest errors when compiling JEDI in a single precision mode

**URL:** <https://forums.jcsda.org/t/ctest-errors-when-compiling-jedi-in-a-single-precision-mode/708>\
**Category:** JEDI\
**Created:** [September 26, 2025, 6:10pm UTC](https://forums.jcsda.org/t/ctest-errors-when-compiling-jedi-in-a-single-precision-mode/708 "2025-09-26T18:10:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JiaWANG](https://avatars.discourse-cdn.com/v4/letter/j/f17d59/32.png) [@JiaWANG](https://forums.jcsda.org/u/JiaWANG)\
**Post date:** [September 26, 2025, 6:10pm UTC](https://forums.jcsda.org/t/ctest-errors-when-compiling-jedi-in-a-single-precision-mode/708/1 "2025-09-26T18:10:55Z")

</div>

On Derecho, when I compile JEDI in the default double precision mode, all tests are passed.

But when I compile JEDI in a single precision model, tests are failed starting from the 3rd test “ **test\_mpasjedi\_state** “.

These are the commands that I use:

**git clone -b release/3.0.2 [GitHub - JCSDA/mpas-bundle: CMake build configuration for JEDI-MPAS application](https://github.com/JCSDA/mpas-bundle) code**

**source ./code/env-setup/gnu-derecho.sh**

**git lfs install**

**mkdir build**

**cd build**

**cmake ../code -DMPAS\_DOUBLE\_PRECISION=OFF**

**qsub -A ummm0014 -N build-bundle -q main -l job\_priority=premium -l walltime=03:00:00 -l select=1:ncpus=128:mem=235GB -I**

**source ../code/env-setup/gnu-derecho.sh**

**make -j20**

**export LD\_LIBRARY\_PATH=/glade/work/jiawang/MPASJEDIbundle/mpas\_bundle\_v3/build/lib:${LD\_LIBRARY\_PATH}**

**cd mpas-jedi**

**ctest**

This is a excerpt of “ **LastTest.log.tmp** “

**Directory: /glade/work/jiawang/MPASJEDIbundle/mpas\_bundle\_v3/build/mpas-jedi/test**

**“test\_mpasjedi\_state” start time: Sep 26 11:59 MDT**

**Output:**

**----------------------------------------------------------**

**OOPS Starting 2025-09-26 11:59:26 (UTC-0600)**

**Configuration input file is: testinput/state.yaml**

**Full configuration is:YAMLConfiguration[path=testinput/state.yaml, root={geometry =\> {nml\_file =\> ./Data/480km/namelist.atmosphere\_2018041500 , streams\_file =\> ./Data/480km/streams.atmosphere} , state test =\> {statefile =\> {state variables =\> (temperature,spechum,uReconstructZonal,uReconstructMeridional,surface\_pressure) , filename =\> ./Data/480km/bg/restart.2018-04-15\_00.00.00.nc , date =\> 2018-04-15T00:00:00Z} , date =\> 2018-04-15T00:00:00Z , norm file =\> 19735.3 , state generate =\> {analytic init =\> {method =\> dcmip-test-4-0} , state variables =\> (temperature,spechum,uReconstructZonal,uReconstructMeridional,surface\_pressure) , date =\> 2018-04-15T00:00:00Z} , norm generated state =\> 20000.4 , tolerance =\> 1e-08 , write then read test =\> {state write =\> {filename =\> Data/states/mpas.state.2018-04-15\_00.00.00.nc} , state read =\> {state variables =\> (temperature,spechum,uReconstructZonal,uReconstructMeridional,surface\_pressure) , filename =\> Data/states/mpas.state.2018-04-15\_00.00.00.nc , date =\> 2018-04-15T00:00:00Z , transform model to analysis =\> false}} , construct to variables =\> (temperature,spechum,uReconstructZonal,uReconstructMeridional)}}]**

**OOPS\_STATS ObjectCountHelper started.**

**OOPS\_STATS Run start - Runtime: 0.01 sec, Memory: total: 59.45 Mb, per task: min = 59.45 Mb, max = 59.45 Mb**

**Run: Starting oops::Test running test::State**

**Running 8 tests:**

**Running case 0: interface/State/testStateConstructors …**

**==\> create geom**

**difference between 19735.25 and 19735.265702001503 is 0.015702001503086649, i.e. exceeds 0.00019735265702001503 (FAIL)**

**^[[31mTest “interface/State/testStateGeometry” failed: Condition failed: oops::is\_close(norm2, norm, tol) @ (/glade/work/jiawang/MPASJEDIbundle/mpas\_bundle\_v3/code/oops/src/test/interface/State.h +267 testStateGeometry)^[[0m**

---

<div class="post-metadata">

**Author:** ![byoung-joo](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.jcsda.org/byoung-joo/32/126_2.png) [@byoung-joo](https://forums.jcsda.org/u/byoung-joo)\
**Post date:** [September 30, 2025, 3:29pm UTC](https://forums.jcsda.org/t/ctest-errors-when-compiling-jedi-in-a-single-precision-mode/708/2 "2025-09-30T15:29:11Z")

</div>

You will see several mpas-jedi ctests failing if the mpas-bundle is built with a single precision MPAS-Model, due to a less precision.

The reference values and tolerance of ctests were generated with a double precision MPAS-Model.

BJ

---

<div class="post-metadata">

**Author:** ![JiaWANG](https://avatars.discourse-cdn.com/v4/letter/j/f17d59/32.png) [@JiaWANG](https://forums.jcsda.org/u/JiaWANG)\
**Post date:** [October 1, 2025, 5:07pm UTC](https://forums.jcsda.org/t/ctest-errors-when-compiling-jedi-in-a-single-precision-mode/708/3 "2025-10-01T17:07:32Z")

</div>

Then any other tests that we can do to make sure the build is correct?

---

<div class="post-metadata">

**Author:** ![byoung-joo](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.jcsda.org/byoung-joo/32/126_2.png) [@byoung-joo](https://forums.jcsda.org/u/byoung-joo)\
**Post date:** [November 11, 2025, 5:45pm UTC](https://forums.jcsda.org/t/ctest-errors-when-compiling-jedi-in-a-single-precision-mode/708/4 "2025-11-11T17:45:19Z")

</div>

Hi @JiaWANG,

We do not have a way of confirming if the single precision build is correct.  
But I guess the ctest results from single precision and double precision might not show large difference. Some tests can relax the tolerance to compare the results, but in my understanding, not all test have that capability.

Thank you,  
BJ
