segfault with intels auto-parallelization

6 views
Skip to first unread message

Knut

unread,
Jun 17, 2025, 6:22:19 AMJun 17
to getm-users
dear all,

does anybody have a clue what can go wrong with this loop during
auto-parallelization (intel compiler option -parallel)
https://sourceforge.net/p/getm/code/ci/master/tree/src/3d/coordinates.F90#l106
?

setting stacksize to unlimited does not help. the segfault does not
occur when omitting compiler option -parallel or adding a write
statement into the loop (thus avoiding parallelization).

thanks and cheers, knut

Per Berg

unread,
Jun 18, 2025, 6:06:12 AMJun 18
to getm-...@googlegroups.com

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
 
--

---
You received this message because you are subscribed to the Google Groups "GETM-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to getm-users+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/getm-users/044c3d77-af2a-44ff-bc7d-2ba7a3606423%40gmx.net.

________________________
This email was scanned by Bitdefender
Reply all
Reply to author
Forward
0 new messages