Skip to content

Compilation error with `--with-subgrid=SPIN_JET_EAGLE`

Compiling in the master branch with: ./configure --with-subgrid=SPIN_JET_EAGLE gives the errors:

././black_holes/SPIN_JET/black_holes_spin.h: In function 'j_BH':
././black_holes/SPIN_JET/black_holes_spin.h:99:7: error: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Werror=absolute-value]
   99 |       fabsf(bp->subgrid_mass * bp->subgrid_mass * bp->spin *
      |       ^~~~~
mv -f .deps/mpi-collectgroup.Tpo .deps/mpi-collectgroup.Plo
././black_holes/SPIN_JET/black_holes_spin.h: In function 'merger_spin_evolve':
././black_holes/SPIN_JET/black_holes_spin.h:1281:7: error: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Werror=absolute-value]
 1281 |       fabsf(bpi->subgrid_mass * bpi->subgrid_mass * bpi->spin *
      |       ^~~~~
././black_holes/SPIN_JET/black_holes_spin.h:1284:7: error: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Werror=absolute-value]
 1284 |       fabsf(bpj->subgrid_mass * bpj->subgrid_mass * bpj->spin *
      |       ^~~~~

I used gcc 13.2.1.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information