Updated libsharp to commit 0787838ab3ec8afc0c28b98479a321ffba388980
This commit is contained in:
parent
a933430c60
commit
23aa450a77
62 changed files with 5075 additions and 11205 deletions
49
external/sharp/Makefile
vendored
49
external/sharp/Makefile
vendored
|
@ -19,6 +19,8 @@ include libfftpack/planck.make
|
|||
include libsharp/planck.make
|
||||
include docsrc/planck.make
|
||||
|
||||
CYTHON_MODULES=python/libsharp/libsharp.so $(if $(MPI_CFLAGS), python/libsharp/libsharp_mpi.so)
|
||||
|
||||
$(all_lib): %: | $(LIBDIR)_mkdir
|
||||
@echo "# creating library $*"
|
||||
$(ARCREATE) $@ $^
|
||||
|
@ -38,18 +40,39 @@ hdrcopy: | $(INCDIR)_mkdir
|
|||
$(notdir $(all_cbin)) : % : $(BINDIR)/%
|
||||
|
||||
test: compile_all
|
||||
$(BINDIR)/sharp_acctest && \
|
||||
$(BINDIR)/sharp_test healpix 2048 1024 1 0 1 && \
|
||||
$(BINDIR)/sharp_test ecp 2047 4096 0 2 1 && \
|
||||
$(BINDIR)/sharp_test gauss 2047 4096 0 0 2
|
||||
$(BINDIR)/sharp_testsuite acctest && \
|
||||
$(BINDIR)/sharp_testsuite test healpix 2048 -1 1024 -1 0 1 && \
|
||||
$(BINDIR)/sharp_testsuite test fejer1 2047 -1 -1 4096 2 1 && \
|
||||
$(BINDIR)/sharp_testsuite test gauss 2047 -1 -1 4096 0 2
|
||||
|
||||
perftest: compile_all
|
||||
$(BINDIR)/sharp_test healpix 2048 1024 0 0 1 && \
|
||||
$(BINDIR)/sharp_test gauss 63 128 0 0 1 && \
|
||||
$(BINDIR)/sharp_test gauss 127 256 0 0 1 && \
|
||||
$(BINDIR)/sharp_test gauss 255 512 0 0 1 && \
|
||||
$(BINDIR)/sharp_test gauss 511 1024 0 0 1 && \
|
||||
$(BINDIR)/sharp_test gauss 1023 2048 0 0 1 && \
|
||||
$(BINDIR)/sharp_test gauss 2047 4096 0 0 1 && \
|
||||
$(BINDIR)/sharp_test gauss 4095 8192 0 0 1 && \
|
||||
$(BINDIR)/sharp_test gauss 8191 16384 0 0 1
|
||||
$(BINDIR)/sharp_testsuite test healpix 2048 -1 1024 -1 0 1 && \
|
||||
$(BINDIR)/sharp_testsuite test gauss 63 -1 -1 128 0 1 && \
|
||||
$(BINDIR)/sharp_testsuite test gauss 127 -1 -1 256 0 1 && \
|
||||
$(BINDIR)/sharp_testsuite test gauss 255 -1 -1 512 0 1 && \
|
||||
$(BINDIR)/sharp_testsuite test gauss 511 -1 -1 1024 0 1 && \
|
||||
$(BINDIR)/sharp_testsuite test gauss 1023 -1 -1 2048 0 1 && \
|
||||
$(BINDIR)/sharp_testsuite test gauss 2047 -1 -1 4096 0 1 && \
|
||||
$(BINDIR)/sharp_testsuite test gauss 4095 -1 -1 8192 0 1 && \
|
||||
$(BINDIR)/sharp_testsuite test gauss 8191 -1 -1 16384 0 1
|
||||
|
||||
%.c: %.c.in
|
||||
# Only do this if the md5sum changed, in order to avoid Python and Jinja
|
||||
# dependency when not modifying the c.in file
|
||||
grep `md5sum $< | cut -d ' ' -f 1` $@ || ./runjinja.py < $< > $@
|
||||
|
||||
genclean:
|
||||
rm libsharp/sharp_legendre.c || exit 0
|
||||
|
||||
$(CYTHON_MODULES): %.so: %.pyx
|
||||
ifndef PIC_CFLAGS
|
||||
$(error Python extension must be built using the --enable-pic configure option.)
|
||||
endif
|
||||
cython $<
|
||||
$(CC) $(DEBUG_CFLAGS) $(OPENMP_CFLAGS) $(PIC_CFLAGS) `python-config --cflags` -I$(INCDIR) -o $(<:.pyx=.o) -c $(<:.pyx=.c)
|
||||
$(CL) -shared $(<:.pyx=.o) $(OPENMP_CFLAGS) $(CYTHON_OBJ) -L$(LIBDIR) -lsharp -lfftpack -lc_utils -L`python-config --prefix`/lib `python-config --ldflags` -o $@
|
||||
|
||||
python: $(all_lib) hdrcopy $(CYTHON_MODULES)
|
||||
|
||||
pytest: python
|
||||
cd python && nosetests --nocapture libsharp/tests/test_sht.py
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue