Don't know what goes wrong with the specific loop, but generally
do k=2,kmax
"zc(k) = zc(k-1) + something"
enddo
is a reduction construction. This pattern is parallelizable (and vectorizable), though it requires a re-write of the simple loop by loop-splitting and -joining.
I wouldn't trust a compiler flag to be able to facilitate a safe re-write of the loop.
OpenMP directives have a reduction clause which can be used to SIMD vectorize reduction patterns (by parallelizing the reduction loop) but even though the loop can be parallelized usually the performance is hurt.
/Per
From: 'Knut' via GETM-users <getm-...@googlegroups.com>
Sent: 17 June 2025 12:22
To: getm-users
Subject: [getm-users: 3416] segfault with intels auto-parallelization