gdtk-uq / gdtk

The Gas Dynamics Toolkit (GDTk) is a set of software tools for simulating high speed fluid flow, maintained at The University of Queensland and the University of Southern Queensland, Australia.
https://gdtk.uqcloud.net/
Other
63 stars 17 forks source link

compilation problems #12

Closed AlexWagnerGO closed 2 years ago

AlexWagnerGO commented 2 years ago

Dear folks,

we have an issue compiling the code on a UBUNTU 20.04. We are using a gcc 9.3 compiler and receive the error below. We tried compiling on several machines, the issue is always the same. We would appreciate some help.

Thanks, Cheers, Alexander from DLR Göttingen

" .../gas/therm_perf_gas.d(268): Error: @nogc function gas.therm_perf_gas.ThermallyPerfectGas.update_thermo_from_ps cannot call non-@nogc function gas.therm_perf_gas.ThermallyPerfectGas.update_thermo_from_ps.bracket!(zeroFun, double).bracket ../gas/therm_perf_gas.d(319): Error: @nogc function gas.therm_perf_gas.ThermallyPerfectGas.update_thermo_from_hs cannot call non-@nogc function gas.therm_perf_gas.ThermallyPerfectGas.update_thermo_from_hs.bracket!(zeroFun, double).bracket ../gas/therm_perf_gas.d(363): Error: @nogc function gas.therm_perf_gas.ThermallyPerfectGas.update_thermo_from_hs cannot call non-@nogc function gas.therm_perf_gas.ThermallyPerfectGas.update_thermo_from_hs.bracket!(zeroFun2, double).bracket ../gas/uniform_lut_plus_ideal.d(96): Error: @nogc function gas.uniform_lut_plus_ideal.UniformLUTPlusIdealGas.update_thermo_from_pT cannot call non-@nogc function gas.uniform_lut_plus_ideal.UniformLUTPlusIdealGas.update_thermo_from_pT.bracket!(p_error, double).bracket ../gas/uniform_lut_plus_ideal.d(142): Error: @nogc function gas.uniform_lut_plus_ideal.UniformLUTPlusIdealGas.update_thermo_from_rhou cannot call non-@nogc function gas.uniform_lut_plus_ideal.UniformLUTPlusIdealGas.update_thermo_from_rhou.bracket!(u_error, double).bracket ../gas/uniform_lut_plus_ideal.d(214): Error: @nogc function gas.uniform_lut_plus_ideal.UniformLUTPlusIdealGas.update_thermo_from_rhop cannot call non-@nogc function gas.uniform_lut_plus_ideal.UniformLUTPlusIdealGas.update_thermo_from_rhop.bracket!(p_error, double).bracket ../gas/two_temperature_argon_plus_ideal.d(116): Error: @nogc function gas.two_temperature_argon_plus_ideal.TwoTemperatureArgonPlusIdealGas.update_thermo_from_pT cannot call non-@nogc function gas.two_temperature_argon_plus_ideal.TwoTemperatureArgonPlusIdealGas.update_thermo_from_pT.bracket!(p_error, double).bracket ../gas/two_temperature_argon_plus_ideal.d(175): Error: @nogc function gas.two_temperature_argon_plus_ideal.TwoTemperatureArgonPlusIdealGas.update_thermo_from_rhou cannot call non-@nogc function gas.two_temperature_argon_plus_ideal.TwoTemperatureArgonPlusIdealGas.update_thermo_from_rhou.bracket!(u_error, double).bracket ../gas/two_temperature_argon_plus_ideal.d(273): Error: @nogc function gas.two_temperature_argon_plus_ideal.TwoTemperatureArgonPlusIdealGas.update_thermo_from_rhop cannot call non-@nogc function gas.two_temperature_argon_plus_ideal.TwoTemperatureArgonPlusIdealGas.update_thermo_from_rhop.bracket!(p_error, double).bracket ../gas/thermo/therm_perf_gas_mix.d(89): Error: @nogc function gas.thermo.therm_perf_gas_mix.ThermPerfGasMixture.updateFromPS cannot call non-@nogc function gas.thermo.therm_perf_gas_mix.ThermPerfGasMixture.updateFromPS.bracket!(zeroFun, double).bracket ../gas/thermo/therm_perf_gas_mix.d(142): Error: @nogc function gas.thermo.therm_perf_gas_mix.ThermPerfGasMixture.updateFromHS cannot call non-@nogc function gas.thermo.therm_perf_gas_mix.ThermPerfGasMixture.updateFromHS.bracket!(zeroFun, double).bracket ../gas/thermo/therm_perf_gas_mix.d(186): Error: @nogc function gas.thermo.therm_perf_gas_mix.ThermPerfGasMixture.updateFromHS cannot call non-@nogc function gas.thermo.therm_perf_gas_mix.ThermPerfGasMixture.updateFromHS.bracket!(zeroFun2, double).bracket ../nm/number.d(24): Error: undefined identifier isClose ../nm/number.d(25): Error: undefined identifier isClose ../nm/number.d(33): Error: undefined identifier isClose ../nm/number.d(34): Error: undefined identifier isClose ../nm/number.d(43): Error: undefined identifier isClose ../nm/number.d(51): Error: undefined identifier isClose make: *** [makefile:541: e4shared] Error 1 "

Whyborn commented 2 years ago

Hi Alex,

Which D compiler are you using at the moment?

AlexWagnerGO commented 2 years ago

Hi Lachlan,

we are using Ldc version (1:1.20.1-1). Cheers

Whyborn commented 2 years ago

What revision of the code are you using? The most recent version does not have these thermo update functions flagged as @nogc, so I don't think you should be seeing those errors. As for the isClose issue, try using a newer version of the LDC compiler. I think I remember having that problem when we switched from approxEqual to isClose. At the moment I can't replicate the issue you're having.

rjgollan-on-github commented 2 years ago

Hi Alex, I'll echo Lachlan's advice: we recommend latest revision of the gdtk source code and latest revision of the ldc compiler. Our continuous integration bot gives us a high degree of confidence in clean builds with the latest revisions. Cheers, Rowan

AlexWagnerGO commented 2 years ago

Solved with your advice. Thank you very much folks!