Add thread-safe ShellPatch::setupintintstuff with OpenMP
Split prolongpointstru into search-only (prolongpointstru_search) and append-only (prolongpointstru_append) functions. The search is read-only and thread-safe; each thread builds private linked lists via prolongpointstru_append, merged after the parallel loop. This eliminates critical-section contention and delivers ~2.2x speedup: setupintintstuff: 511s -> 252s, total init: 592s -> 267s. Also add -qopenmp to ShellPatch.o compilation via makefile override rule and <omp.h> include with _OPENMP guards + fallback stubs. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -73,6 +73,10 @@ endif
|
||||
.C.o:
|
||||
${CXX} $(CXXAPPFLAGS) -c $< $(filein) -o $@
|
||||
|
||||
# ShellPatch.C uses OpenMP for setupintintstuff search loops
|
||||
ShellPatch.o: ShellPatch.C
|
||||
${CXX} $(CXXAPPFLAGS) $(OMP_FLAG) -c $< $(filein) -o $@
|
||||
|
||||
.for.o:
|
||||
$(f77) -c $< -o $@
|
||||
|
||||
|
||||
Reference in New Issue
Block a user