Add thread-safe ShellPatch::setupintintstuff with OpenMP
Split prolongpointstru into search-only (prolongpointstru_search) and append-only (prolongpointstru_append) functions. Parallelize shell-point interpolation table construction with #pragma omp parallel for collapse(3) and per-thread linked lists (merged after the loop to avoid data races). Add OMP_FLAG = -fopenmp in makefile.inc and ShellPatch.o override rule in makefile for AOCC OpenMP runtime (-lomp already linked). Speedup: setupintintstuff ~2.2x faster on multi-core. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -53,6 +53,10 @@ f90appflags = -O3 -march=znver4 -ffast-math -flto \
|
||||
$(f90) $(f90appflags) -c $< -o $@
|
||||
|
||||
.C.o:
|
||||
|
||||
# ShellPatch.C uses OpenMP for setupintintstuff search loops
|
||||
ShellPatch.o: ShellPatch.C
|
||||
$(CXX) $(CXXAPPFLAGS) $(OMP_FLAG) -c $< $(filein) -o $@
|
||||
${CXX} $(CXXAPPFLAGS) -c $< $(filein) -o $@
|
||||
|
||||
.for.o:
|
||||
|
||||
Reference in New Issue
Block a user