diff options
author | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2019-06-29 02:01:58 +0200 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2019-06-29 02:28:27 +0200 |
commit | 0f1ec1488bf0bdd70d74f812ffb3ec70dc55b68e (patch) | |
tree | 4bd8bb7831ef252b8544230e1c0549377f84042e | |
parent | 9f18cb8a8981f7fbdec82cbc584f412226e8e66b (diff) |
Added citation for TIDES, sorted progs alphabetically
While reviewing Prasenjit's commits, I noticed that we had forgot to add
the citation for TIDES, also to make things clear, the program/library
build rules are now sorted alphabetically.
Finally, I noticed that after building the TiKZ PDF figures, it is crashing
(like on Prasenjit's computer). After looking around, I noticed its because
we were setting the of the `TEXINPUTS' environment variable to be the
installed TeX Live directory (which was ultimately redundant because by
default TeX will look into where it was installed). The important thing is
just that we remove any possible value the host system has, not to set new
directories.
-rw-r--r-- | .file-metadata | bin | 5780 -> 6236 bytes | |||
-rw-r--r-- | reproduce/analysis/config/pdf-build.mk | 2 | ||||
-rw-r--r-- | reproduce/analysis/make/initialize.mk | 6 | ||||
-rw-r--r-- | reproduce/analysis/make/paper.mk | 8 | ||||
-rw-r--r-- | reproduce/software/bibtex/tides.tex | 19 | ||||
-rw-r--r-- | reproduce/software/config/installation/TARGETS.mk | 4 | ||||
-rw-r--r-- | reproduce/software/make/basic.mk | 4 | ||||
-rw-r--r-- | reproduce/software/make/high-level.mk | 222 |
8 files changed, 152 insertions, 113 deletions
diff --git a/.file-metadata b/.file-metadata Binary files differindex 273667e..5d1afdf 100644 --- a/.file-metadata +++ b/.file-metadata diff --git a/reproduce/analysis/config/pdf-build.mk b/reproduce/analysis/config/pdf-build.mk index c75f5d1..3a86ff3 100644 --- a/reproduce/analysis/config/pdf-build.mk +++ b/reproduce/analysis/config/pdf-build.mk @@ -18,4 +18,4 @@ # permitted in any medium without royalty provided the copyright notice and # this notice are preserved. This file is offered as-is, without any # warranty. -pdf-build-final = +pdf-build-final = yes diff --git a/reproduce/analysis/make/initialize.mk b/reproduce/analysis/make/initialize.mk index 640ba2d..d176489 100644 --- a/reproduce/analysis/make/initialize.mk +++ b/reproduce/analysis/make/initialize.mk @@ -103,15 +103,19 @@ curdir := $(shell echo $$(pwd)) # itself and doesn't use the local system's default tools. With these # environment variables, we are setting it to prefer the software we have # build here. +# +# `TEXINPUTS': we have to remove all possible user-specified directories to +# avoid conflicts with existing TeX Live solutions. Later (in `paper.mk'), +# we are also going to overwrite `TEXINPUTS' just before `pdflatex'. .ONESHELL: .SHELLFLAGS = -ec +export TEXINPUTS := export CCACHE_DISABLE := 1 export PATH := $(installdir)/bin export LD_LIBRARY_PATH := $(installdir)/lib export LDFLAGS := -L$(installdir)/lib export SHELL := $(installdir)/bin/bash export CPPFLAGS := -I$(installdir)/include -export TEXINPUTS := $(installdir)/texlive// diff --git a/reproduce/analysis/make/paper.mk b/reproduce/analysis/make/paper.mk index 34d88a4..c17028a 100644 --- a/reproduce/analysis/make/paper.mk +++ b/reproduce/analysis/make/paper.mk @@ -98,10 +98,10 @@ $(texbdir)/paper.bbl: tex/src/references.tex $(mtexdir)/dependencies-bib.tex \ # We'll run LaTeX first to generate the `.bcf' file (necessary # for `biber') and then run `biber' to generate the `.bbl' file. - p=$$(pwd); - export TEXINPUTS=$$p:$$TEXINPUTS; + p=$$(pwd) + export TEXINPUTS=$$p: cd $(texbdir); - pdflatex -shell-escape -halt-on-error $$p/paper.tex; + pdflatex -shell-escape -halt-on-error $$p/paper.tex biber paper fi @@ -126,7 +126,7 @@ paper.pdf: $(mtexdir)/project.tex paper.tex $(texbdir)/paper.bbl # Go into the top TeX build directory and make the paper. p=$$(pwd) - export TEXINPUTS=$$p:$$TEXINPUTS + export TEXINPUTS=$$p: cd $(texbdir) pdflatex -shell-escape -halt-on-error $$p/paper.tex diff --git a/reproduce/software/bibtex/tides.tex b/reproduce/software/bibtex/tides.tex new file mode 100644 index 0000000..f902da0 --- /dev/null +++ b/reproduce/software/bibtex/tides.tex @@ -0,0 +1,19 @@ +%% Copyright (C) 2019 Mohammad Akhlaghi <mohammad@akhlaghi.org> +%% +%% Copying and distribution of this file, with or without modification, +%% are permitted in any medium without royalty provided the copyright +%% notice and this notice are preserved. This file is offered as-is, +%% without any warranty. + +@ARTICLE{tides, + author = {{Abad}, A. and {Barrio}, R. and {Belsa}, F. and {Rodriguez}, M}, + title = "{Algorithm 924: TIDES, a Taylor Series Integrator for Differential EquationS}", + journal = {ACM TOMS}, + year = 2012, + month = nov, + volume = 39, + eid = {5}, + pages = {5:1}, + doi = {10.1145/2382585.2382590}, + keywords = {Taylor series method, automatic differentiation, high precision, numerical integration of ODEs, variational equations}, +} diff --git a/reproduce/software/config/installation/TARGETS.mk b/reproduce/software/config/installation/TARGETS.mk index 6dca171..b9157f1 100644 --- a/reproduce/software/config/installation/TARGETS.mk +++ b/reproduce/software/config/installation/TARGETS.mk @@ -36,7 +36,7 @@ # Programs and libraries. -top-level-programs = gnuastro tides +top-level-programs = gnuastro # Python libraries/modules. -# top-level-python = astropy +top-level-python = astropy diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk index 81e8512..706a179 100644 --- a/reproduce/software/make/basic.mk +++ b/reproduce/software/make/basic.mk @@ -844,7 +844,9 @@ $(ibidir)/libiconv: $(tdir)/libiconv-$(libiconv-version).tar.gz \ $(ibidir)/git: $(tdir)/git-$(git-version).tar.xz \ $(ibidir)/libiconv \ $(ibidir)/curl # Coreutils, so Git is built after it. - export LDFLAGS=-lcharset; \ + if [ x$(on_mac_os) = xyes ]; then \ + export LDFLAGS="$$LDFLAGS -lcharset"; \ + fi; \ $(call gbuild, $<, git-$(git-version), static, \ --without-tcltk --with-shell=$(ibdir)/bash \ --with-iconv=$(idir), V=1) \ diff --git a/reproduce/software/make/high-level.mk b/reproduce/software/make/high-level.mk index e2827e9..90fc060 100644 --- a/reproduce/software/make/high-level.mk +++ b/reproduce/software/make/high-level.mk @@ -135,7 +135,7 @@ tarballs = $(foreach t, astrometry.net-$(astrometrynet-version).tar.gz \ sextractor-$(sextractor-version).tar.lz \ swarp-$(swarp-version).tar.gz \ swig-$(swig-version).tar.gz \ - tides-$(tides-version).tar.gz \ + tides-$(tides-version).tar.gz \ tiff-$(libtiff-version).tar.gz \ wcslib-$(wcslib-version).tar.bz2 \ yaml-$(yaml-version).tar.gz \ @@ -236,6 +236,11 @@ $(tarballs): $(tdir)/%: | $(lockdir) + + + + + # Libraries # --------- # @@ -244,105 +249,6 @@ $(tarballs): $(tdir)/%: | $(lockdir) # libraries. Therefore, we can't use the easy `.a' suffix for static # libraries as targets and there are different conventions for shared # library names. -$(ibidir)/cfitsio: $(tdir)/cfitsio-$(cfitsio-version).tar.gz \ - $(ibidir)/curl - - # CFITSIO hard-codes '@rpath' inside the shared library on - # Mac systems. So we need to change it to our library - # installation path. It doesn't affect GNU/Linux, so we'll - # just do it in any case to keep things clean. - topdir=$(pwd); cd $(ddir); tar xf $< - customtar=cfitsio-$(cfitsio-version)-custom.tar.gz - cd cfitsio-$(cfitsio-version) - sed configure -e's|@rpath|$(ildir)|g' > configure_tmp - mv configure_tmp configure - chmod +x configure - cd .. - tar cf $$customtar cfitsio-$(cfitsio-version) - cd $$topdir - - # Continue the standard build on the customized tarball. - $(call gbuild, $$customtar, cfitsio-$(cfitsio-version), , \ - --enable-sse2 --enable-reentrant \ - --with-bzip2=$(idir), , make shared) \ - && rm $$customtar \ - && echo "CFITSIO $(cfitsio-version)" > $@ - -$(ibidir)/cairo: $(tdir)/cairo-$(cairo-version).tar.xz \ - $(ibidir)/freetype \ - $(ibidir)/libpng \ - $(ibidir)/pixman - $(call gbuild, $<, cairo-$(cairo-version), static, \ - --with-x=no) \ - && echo "Cairo $(cairo-version)" > $@ - -$(ibidir)/gsl: $(tdir)/gsl-$(gsl-version).tar.gz - $(call gbuild, $<, gsl-$(gsl-version), static) \ - && echo "GNU Scientific Library $(gsl-version)" > $@ - -$(ibidir)/fftw: $(tdir)/fftw-$(fftw-version).tar.gz - # In order to build single and double precission libraries of - # `fftw', installation of `fftw' is done twice. First time is to - # build single precission float libraries and second time is for - # building the default double precission float libraries - $(call gbuild, $<, fftw-$(fftw-version), static, \ - --enable-shared enable-threads \ - --enable-single --enable-type-prefix) \ - && $(call gbuild, $<, fftw-$(fftw-version), static, \ - --enable-shared --enable-threads \ - --enable-type-prefix) \ - && cp $(dtexdir)/fftw.tex $(ictdir)/ \ - && echo "FFTW $(fftw-version) \citep{fftw}" > $@ - -# Freetype is necessary to install matplotlib -$(ibidir)/freetype: $(tdir)/freetype-$(freetype-version).tar.gz \ - $(ibidir)/libpng - $(call gbuild, $<, freetype-$(freetype-version), static) \ - && echo "FreeType $(freetype-version)" > $@ - -$(ibidir)/hdf5: $(tdir)/hdf5-$(hdf5-version).tar.gz \ - $(ibidir)/openmpi - export CC=mpicc; \ - export FC=mpif90; \ - $(call gbuild, $<, hdf5-$(hdf5-version), static, \ - --enable-parallel \ - --enable-fortran, -j$(numthreads) V=1) \ - && echo "HDF5 library $(hdf5-version)" > $@ - -$(ibidir)/libjpeg: $(tdir)/jpegsrc.$(libjpeg-version).tar.gz - $(call gbuild, $<, jpeg-9b, static) \ - && echo "Libjpeg $(libjpeg-version)" > $@ - -$(ibidir)/libpng: $(tdir)/libpng-$(libpng-version).tar.xz - $(call gbuild, $<, libpng-$(libpng-version), static) \ - && echo "Libpng $(libpng-version)" > $@ - -$(ibidir)/libxml2: $(tdir)/libxml2-$(libxml2-version).tar.gz - # The libxml2 tarball also contains Python bindings which are built and - # installed to a system directory by default. If you don't need the Python - # bindings, the easiest solution is to compile without Python support: - # ./configure --without-python - # If you really need the Python bindings, try the - # --with-python-install-dir=DIR option - $(call gbuild, $<, libxml2-$(libxml2-version), static, \ - --without-python) \ - && echo "Libxml2 $(libxml2-version)" > $@ - -$(ibidir)/pixman: $(tdir)/pixman-$(pixman-version).tar.gz - $(call gbuild, $<, pixman-$(pixman-version), static) \ - && echo "Pixman $(pixman-version)" > $@ - -$(ibidir)/libtiff: $(tdir)/tiff-$(libtiff-version).tar.gz \ - $(ibidir)/libjpeg - $(call gbuild, $<, tiff-$(libtiff-version), static, \ - --disable-webp --disable-zstd) \ - && echo "Libtiff $(libtiff-version)" > $@ - -$(ibidir)/openmpi: $(tdir)/openmpi-$(openmpi-version).tar.gz - $(call gbuild, $<, openmpi-$(openmpi-version), static, , \ - -j$(numthreads) V=1) \ - && echo "Open MPI $(openmpi-version)" > $@ - $(ibidir)/atlas: $(tdir)/atlas-$(atlas-version).tar.bz2 \ $(tdir)/lapack-$(lapack-version).tar.gz @@ -423,6 +329,96 @@ $(ibidir)/atlas: $(tdir)/atlas-$(atlas-version).tar.bz2 \ echo "ATLAS $(atlas-version)" > $@; \ fi +$(ibidir)/cfitsio: $(tdir)/cfitsio-$(cfitsio-version).tar.gz \ + $(ibidir)/curl + + # CFITSIO hard-codes '@rpath' inside the shared library on + # Mac systems. So we need to change it to our library + # installation path. It doesn't affect GNU/Linux, so we'll + # just do it in any case to keep things clean. + topdir=$(pwd); cd $(ddir); tar xf $< + customtar=cfitsio-$(cfitsio-version)-custom.tar.gz + cd cfitsio-$(cfitsio-version) + sed configure -e's|@rpath|$(ildir)|g' > configure_tmp + mv configure_tmp configure + chmod +x configure + cd .. + tar cf $$customtar cfitsio-$(cfitsio-version) + cd $$topdir + + # Continue the standard build on the customized tarball. + $(call gbuild, $$customtar, cfitsio-$(cfitsio-version), , \ + --enable-sse2 --enable-reentrant \ + --with-bzip2=$(idir), , make shared) \ + && rm $$customtar \ + && echo "CFITSIO $(cfitsio-version)" > $@ + +$(ibidir)/cairo: $(tdir)/cairo-$(cairo-version).tar.xz \ + $(ibidir)/freetype \ + $(ibidir)/libpng \ + $(ibidir)/pixman + $(call gbuild, $<, cairo-$(cairo-version), static, \ + --with-x=no) \ + && echo "Cairo $(cairo-version)" > $@ + +$(ibidir)/fftw: $(tdir)/fftw-$(fftw-version).tar.gz + # In order to build single and double precission libraries of + # `fftw', installation of `fftw' is done twice. First time is to + # build single precission float libraries and second time is for + # building the default double precission float libraries + $(call gbuild, $<, fftw-$(fftw-version), static, \ + --enable-shared enable-threads \ + --enable-single --enable-type-prefix) \ + && $(call gbuild, $<, fftw-$(fftw-version), static, \ + --enable-shared --enable-threads \ + --enable-type-prefix) \ + && cp $(dtexdir)/fftw.tex $(ictdir)/ \ + && echo "FFTW $(fftw-version) \citep{fftw}" > $@ + +# Freetype is necessary to install matplotlib +$(ibidir)/freetype: $(tdir)/freetype-$(freetype-version).tar.gz \ + $(ibidir)/libpng + $(call gbuild, $<, freetype-$(freetype-version), static) \ + && echo "FreeType $(freetype-version)" > $@ + +$(ibidir)/gsl: $(tdir)/gsl-$(gsl-version).tar.gz + $(call gbuild, $<, gsl-$(gsl-version), static) \ + && echo "GNU Scientific Library $(gsl-version)" > $@ + +$(ibidir)/hdf5: $(tdir)/hdf5-$(hdf5-version).tar.gz \ + $(ibidir)/openmpi + export CC=mpicc; \ + export FC=mpif90; \ + $(call gbuild, $<, hdf5-$(hdf5-version), static, \ + --enable-parallel \ + --enable-fortran, -j$(numthreads) V=1) \ + && echo "HDF5 library $(hdf5-version)" > $@ + +$(ibidir)/libjpeg: $(tdir)/jpegsrc.$(libjpeg-version).tar.gz + $(call gbuild, $<, jpeg-9b, static) \ + && echo "Libjpeg $(libjpeg-version)" > $@ + +$(ibidir)/libpng: $(tdir)/libpng-$(libpng-version).tar.xz + $(call gbuild, $<, libpng-$(libpng-version), static) \ + && echo "Libpng $(libpng-version)" > $@ + +$(ibidir)/libtiff: $(tdir)/tiff-$(libtiff-version).tar.gz \ + $(ibidir)/libjpeg + $(call gbuild, $<, tiff-$(libtiff-version), static, \ + --disable-webp --disable-zstd) \ + && echo "Libtiff $(libtiff-version)" > $@ + +$(ibidir)/libxml2: $(tdir)/libxml2-$(libxml2-version).tar.gz + # The libxml2 tarball also contains Python bindings which are built and + # installed to a system directory by default. If you don't need the Python + # bindings, the easiest solution is to compile without Python support: + # ./configure --without-python + # If you really need the Python bindings, try the + # --with-python-install-dir=DIR option + $(call gbuild, $<, libxml2-$(libxml2-version), static, \ + --without-python) \ + && echo "Libxml2 $(libxml2-version)" > $@ + $(ibidir)/openblas: $(tdir)/openblas-$(openblas-version).tar.gz if [ x$(on_mac_os) = xyes ]; then \ export CC=clang; \ @@ -436,15 +432,28 @@ $(ibidir)/openblas: $(tdir)/openblas-$(openblas-version).tar.gz && rm -rf OpenBLAS-$(openblas-version) \ && echo "OpenBLAS $(openblas-version)" > $@ -$(ibidir)/yaml: $(tdir)/yaml-$(yaml-version).tar.gz - $(call gbuild, $<, yaml-$(yaml-version), static) \ - && echo "LibYAML $(yaml-version)" > $@ +$(ibidir)/openmpi: $(tdir)/openmpi-$(openmpi-version).tar.gz + $(call gbuild, $<, openmpi-$(openmpi-version), static, , \ + -j$(numthreads) V=1) \ + && echo "Open MPI $(openmpi-version)" > $@ +$(ibidir)/pixman: $(tdir)/pixman-$(pixman-version).tar.gz + $(call gbuild, $<, pixman-$(pixman-version), static) \ + && echo "Pixman $(pixman-version)" > $@ $(ibidir)/tides: $(tdir)/tides-$(tides-version).tar.gz $(call gbuild, $<, tides-$(tides-version), static,\ --with-gmp=$(idir) --with-mpfr=$(idir)) \ - && echo "TIDES $(tides-version)" > $@ + && cp $(dtexdir)/tides.tex $(ictdir)/ \ + && echo "TIDES $(tides-version) \citep{tides}" > $@ + +$(ibidir)/yaml: $(tdir)/yaml-$(yaml-version).tar.gz + $(call gbuild, $<, yaml-$(yaml-version), static) \ + && echo "LibYAML $(yaml-version)" > $@ + + + + # Libraries with special attention on Mac OS # ------------------------------------------ @@ -502,6 +511,11 @@ $(ibidir)/wcslib: $(tdir)/wcslib-$(wcslib-version).tar.bz2 \ + + + + + # Programs # -------- # |