Evaluating the Performance Impact of Floating-Point Type Demotion in a Multiphase Flow Simulator - Aquino, Vitor Barros; Rigon, Pedro Henrique Casarotto; Freytag, Gabriel; Melo Junior, Afranio Jose de; Gaspari, Eduardo Ferreira; Costa, Evaldo (Anais da Escola Regional de Alto Desempenho da Região Nordeste (ERAD-NE); 2026: Anais da VII Escola Regional de Alto Desempenho da Região NordesteDO - 10.5753/erad-ne.2026.26646, 2026)
This paper evaluates precision demotion in Marlim3, an open-source 1D multiphase flow simulator developed by Petrobras. We replace long double declarations, extended-precision literals, and long-double libm calls with double-precision equivalents. The original and modified versions are compared using nine simulation cases on x86-64 and ARM platforms, considering runtime and numerical differences in the outputs. On x86-64, the modified version improved all workloads, reaching up to 11.69× speedup. On Apple M4, most workloads remained close to the baseline. Numerical validation reused the baseline workflow: steady-state network outputs match the extended-precision reference within engineering tolerance, while transient cases show only the expected accumulation of round-off, with all monitored quantities physically plausible. These results show that precision demotion can improve Marlim3 performance, but its impact is strongly architecture-dependent.