Skip to content

Commit 27e51df

Browse files
committed
perftest/spreadtestndall makefile build and driver sh script
1 parent e4ad80e commit 27e51df

File tree

5 files changed

+40
-3
lines changed

5 files changed

+40
-3
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
List of features / changes made / release notes, in reverse chronological order.
22
If not stated, FINUFFT is assumed (cuFINUFFT <=1.3 is listed separately).
33

4+
* new benchmarker perftest/spreadtestndall sweeps all kernel widths (M Barbone).
45
* cufinufft now supports modeord(type 1,2 only): 0 CMCL-style increasing mode
56
order, 1 FFT-style mode order.
67
* New doc page: migration guide from NFFT3 (2d1 case only).

docs/devnotes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Developer notes
1919

2020
* If you add a new option field (recall it must be plain C style only, no special types) to ``include/finufft_opts.h``, don't forget to add it to ``include/finufft.fh``, ``include/finufft_mod.f90``, ``matlab/finufft.mw``, ``python/finufft/_finufft.py``, and the Julia interface, as well a paragraph describing its use in the docs. Also to set its default value in ``src/finufft.cpp``. You will then need to regenerate the docs as in ``docs/README``.
2121

22-
* For testing and performance measuring routines see ``test/README`` and ``perftest/README``. We need more of the latter, eg, something making performance graphs that enable rapid eyeball comparison of various settings/machines.
22+
* For testing and performance measuring routines see ``test/README`` and ``perftest/README``. We need more of the latter, eg, something making performance graphs that enable rapid eyeball comparison of various settings/machines. Marco is working on that.
2323

2424
* Continuous Integration (CI). See files for this in ``.github/workflows/``. It currently tests the default ``makefile`` settings in linux, and three other ``make.inc.*`` files covering OSX and Windows (MinGW). CI does not test build the variant OMP=OFF. The dev should test these locally. Likewise, the Julia wrapper is separate and thus not tested in CI. We have added ``JenkinsFile`` for the GPU CI via python wrappers.
2525

makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,17 @@ perftest/%f: perftest/%.cpp $(DYNLIB)
269269

270270
# spreader only test, double/single (good for self-contained work on spreader)
271271
ST=perftest/spreadtestnd
272+
STA=perftest/spreadtestndall
272273
STF=$(ST)f
274+
STAF=$(STA)f
273275
$(ST): $(ST).cpp $(SOBJS) $(SOBJS_PI)
274276
$(CXX) $(CXXFLAGS) ${LDFLAGS} $< $(SOBJS) $(SOBJS_PI) $(LIBS) -o $@
275277
$(STF): $(ST).cpp $(SOBJSF) $(SOBJS_PI)
276278
$(CXX) $(CXXFLAGS) ${LDFLAGS} -DSINGLE $< $(SOBJSF) $(SOBJS_PI) $(LIBS) -o $@
279+
$(STA): $(STA).cpp $(SOBJS) $(SOBJS_PI)
280+
$(CXX) $(CXXFLAGS) ${LDFLAGS} $< $(SOBJS) $(SOBJS_PI) $(LIBS) -o $@
281+
$(STAF): $(STA).cpp $(SOBJSF) $(SOBJS_PI)
282+
$(CXX) $(CXXFLAGS) ${LDFLAGS} -DSINGLE $< $(SOBJSF) $(SOBJS_PI) $(LIBS) -o $@
277283
spreadtest: $(ST) $(STF)
278284
# run one thread per core... (escape the $ to get single $ in bash; one big cmd)
279285
(export OMP_NUM_THREADS=$$(perftest/mynumcores.sh) ;\
@@ -285,16 +291,19 @@ spreadtest: $(ST) $(STF)
285291
$(STF) 1 8e6 8e6 1e-3 ;\
286292
$(STF) 2 8e6 8e6 1e-3 ;\
287293
$(STF) 3 8e6 8e6 1e-3 )
294+
# smaller test of spreadinterp various tols, precs, kermeths...
288295
spreadtestall: $(ST) $(STF)
289296
(cd perftest; ./spreadtestall.sh)
290-
297+
# Marco's sweep through kernel widths (ie tols)...
298+
spreadtestndall: $(STA) $(STAF)
299+
(cd perftest; ./multispreadtestndall.sh)
291300
bigtest: perftest/big2d2f
292301
@echo "\nRunning >2^31 size example (takes 30 s and 30 GB RAM)..."
293302
perftest/big2d2f
294303

295304
PERFEXECS := $(basename $(wildcard test/finufft?d_test.cpp))
296305
PERFEXECS += $(PERFEXECS:%=%f)
297-
perftest: $(ST) $(STF) $(PERFEXECS) bigtest
306+
perftest: $(ST) $(STF) $(PERFEXECS) spreadtestndall bigtest
298307
# here the tee cmd copies output to screen. 2>&1 grabs both stdout and stderr...
299308
(cd perftest ;\
300309
./spreadtestnd.sh 2>&1 | tee results/spreadtestnd_results.txt ;\

perftest/README

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
Performance and development test directory for FINUFFT.
22

3+
spreadtestnd : time spread & interp for given dim, tol, etc.
4+
spreadtestndall : time spread or interp sweeping over all tols (w), given dim.
5+
[note the above two differ in 4th cmd-line arg being "tol" vs "dir"]
36
big2d2f : tests int64_t (8byte int) indexing, ie data size > 2^31.
47

58
Scripts:
9+
spreadtestall.sh : rapid test of spreadtestnd in all cases.
610
spreadtestnd.sh : performance test of spreader only, in dims 1,2, or 3.
711
nuffttestnd.sh : performance test of NUFFT library, in dims 1,2, or 3.
812
mycpuinfo.sh : prints info about the CPU
13+
multispreadtestndall.sh : runs Marco's w-sweeping scripts all dims, precs.
914

1015
Possibly obsolete scripts (for developers):
1116
highaspect3d_test.sh : comparing various pizza-box orientations for speed

perftest/multispreadtestndall.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
# simple driver for Marco's sweeping-w spreadtest variant, all precs & dims.
3+
# used my the makefile.
4+
# all avail threads for now.
5+
# human has to check the output for now.
6+
# Barnett 6/4/24
7+
8+
M=1e7 # problem size (sets both # NU pts and # U modes); it's a string
9+
N=1e6 # num U grid pts
10+
11+
./spreadtestndall 1 $M $N 1 1
12+
./spreadtestndall 1 $M $N 2 1
13+
./spreadtestndall 2 $M $N 1 1
14+
./spreadtestndall 2 $M $N 2 1
15+
./spreadtestndall 3 $M $N 1 1
16+
./spreadtestndall 3 $M $N 2 1
17+
./spreadtestndallf 1 $M $N 1 1
18+
./spreadtestndallf 1 $M $N 2 1
19+
./spreadtestndallf 2 $M $N 1 1
20+
./spreadtestndallf 2 $M $N 2 1
21+
./spreadtestndallf 3 $M $N 1 1
22+
./spreadtestndallf 3 $M $N 2 1

0 commit comments

Comments
 (0)