Skip to content

Commit

Permalink
Merge pull request #27 from manodeep/develop
Browse files Browse the repository at this point in the history
Develop [ci skip]
  • Loading branch information
manodeep committed Feb 9, 2016
2 parents 3d9ea20 + 1fb6b22 commit e11f570
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Corrfunc/call_correlation_functions_mocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def main():
print("{0:12.4f} {1:12.4f} {2:10.4f} {3:10.1f} {4:10d}".format(items[0],items[1],items[2],items[3],items[4]))
print("-----------------------------------------------------------")


binfile=os.path.join(os.path.dirname(os.path.abspath(__file__)),"../xi_mocks/tests/","angular_bins")
print("\nRunning angular correlation function w(theta)")
results_wtheta = _countpairs_mocks.countpairs_theta_mocks(autocorr, cosmology, nthreads, binfile, ra,dec, ra,dec)
print("\n# ****** wtheta: first {} bins ******* ".format(numbins_to_print))
Expand Down
6 changes: 5 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,9 @@ recursive-include utils *.c *.h
recursive-include xi_theory/tests Mr19_* cmass* bins
recursive-include xi_theory/tests/data *.ff
recursive-include xi_mocks/tests bins angular_bins Mr19*
recursive-include xi_mocks/tests/data *.txt *.dat *.ff
recursive-include xi_mocks/tests/data *.txt *.dat

exclude xi_theory/tests/data/random_Zspace.ff
exclude xi_mocks/tests/data/Mr19_randoms_northonly.rdcz.ff


4 changes: 2 additions & 2 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ INCLUDE:=-I../../io -I../../utils
CFLAGS += -Wsign-compare -Wall -Wextra -Wshadow -Wunused -std=c99 -g -m64 -fPIC -D_POSIX_SOURCE -D_DARWIN_C_SOURCE -O3 #-Ofast
GSL_CFLAGS := $(shell gsl-config --cflags)
GSL_LIBDIR := $(shell gsl-config --prefix)/lib
GSL_LINK := $(shell gsl-config --libs) -Xlinker -rpath -Xlinker $(GSL_LIBDIR)
GSL_LINK := $(shell gsl-config --libs) -Xlinker -rpath -Xlinker $(GSL_LIBDIR)

ifneq (USE_OMP,$(findstring USE_OMP,$(OPT)))
ifneq (clang,$(findstring clang,$(CC)))
Expand Down Expand Up @@ -168,7 +168,7 @@ ifeq ($(PYTHON_CHECKED), 0)
FIX_PYTHON_LINK := 1
PYTHON_LINK := $(filter-out -framework, $(PYTHON_LINK))
PYTHON_LINK := $(filter-out CoreFoundation, $(PYTHON_LINK))
PYTHON_LINK += -dynamiclib -Wl,-single_module -undefined dynamic_lookup -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION)
PYTHON_LINK += -dynamiclib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION)
endif

### Another check for stack-size. travis ci chokes on this with gcc
Expand Down
43 changes: 31 additions & 12 deletions meta.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package:
name: corrfunc
version: "0.2.0"
version: "0.2.1"

source:
fn: Corrfunc-0.2.0.tar.gz
url: https://github.com/manodeep/Corrfunc/archive/0.2.0.tar.gz
md5: 8261A1A751963553D33FBA8F0F6303C3
sha1: A1877395F66B450C69555B1AB18B99294D9FA808
sha256: 0AC524EB41B09B8B6ACF8BC8960B82ACBDF1F7A807A45CDFD47166CF4771D72F

path: dist
fn: Corrfunc-0.2.1.tar.gz
md5: 54e2b777517f074847f11223344a1577

# fn: Corrfunc-0.2.1.tar.gz
# url: https://github.com/manodeep/Corrfunc/archive/0.2.1.tar.gz
# md5: 2bd15dac1706cb59b5ddb528cd5c7db2

requirements:
build:
- gcc
- gsl
- python
- numpy
- setuptools
Expand All @@ -22,21 +22,40 @@ requirements:
- numpy

build:
detect_binary_files_with_prefix: True
script: make install && python setup.py install
binary_relocation: False
skip: True # [win]
binary_relocation: True
skip: True #[win]

test:
files:
- xi_theory/tests/data/gals_Mr19.ff
- xi_mocks/tests/data/Mr19_mock_northonly.rdcz.dat
- include/countpairs.h
- include/countpairs_rp_pi_mocks.h
- xi_theory/tests/bins
- xi_mocks/tests/bins
- xi_mocks/tests/angular_bins
- xi_mocks/tests/data/Mr19_centers_xyz_forVPF_rmax_10Mpc.txt
imports:
- Corrfunc
- Corrfunc._countpairs
- Corrfunc._countpairs_mocks
- Corrfunc.call_correlation_functions
- Corrfunc.call_correlation_functions_mocks

commands:
- python -c "import Corrfunc.call_correlation_functions as c; c.main()"
- python -c "import Corrfunc.call_correlation_functions_mocks as m; m.main()"
about:
home: http://manodeep.github.io/Corrfunc/
license: MIT
license_file: LICENSE
summary: Blazing fast correlation functions on the CPU

extra:
maintainers:
- Manodeep Sinha <manodeep@gmail.com>



11 changes: 10 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,17 @@ def build_extensions(self):
if exception.errno != errno.EEXIST:
raise

shutil.copyfile('{}.so'.format(os.path.join(ext_dir,ext.name)),self.get_ext_fullpath(ext.name))
# full_name='{}.so.{}'.format(os.path.join(ext_dir,ext.name),version)
# full_build_name='{}.{}'.format(self.get_ext_fullpath(ext.name),version)

full_name='{}.so'.format(os.path.join(ext_dir,ext.name))
full_build_name='{}'.format(self.get_ext_fullpath(ext.name))

shutil.copyfile(full_name, full_build_name)
shutil.copyfile('{}.so'.format(os.path.join(ext_dir,ext.name)),self.get_ext_fullpath(ext.name))
# print("name = {} source = {} dest = {}".format(ext.name, full_name, full_build_name))
#command="ln -s {} {}.so".format(full_build_name,self.get_ext_fullpath(ext.name))
#os.symlink(full_build_name,self.get_ext_fullpath(ext.name))


def generate_extensions(python_dirs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def rd(filename):
print("{0:12.4f} {1:12.4f} {2:10.4f} {3:10.1f} {4:10d}".format(items[0],items[1],items[2],items[3],items[4]))
print("-----------------------------------------------------------")


binfile=os.path.join(os.path.dirname(os.path.abspath(__file__)),"../tests/","angular_bins")
print("\nRunning angular correlation function w(theta)")
results_wtheta = _countpairs_mocks.countpairs_theta_mocks(autocorr, cosmology, nthreads, binfile, ra,dec, ra,dec)
print("\n# ****** wtheta: first {} bins ******* ".format(numbins_to_print))
Expand Down
2 changes: 1 addition & 1 deletion xi_mocks/tests/tests_mocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ int main(int argc, char **argv)
}
if(skipped > 0) {
fprintf(stderr,ANSI_COLOR_YELLOW "SKIPPED: %d tests" ANSI_COLOR_RESET "\n", skipped);
fprintf(stderr,"Tests are skipped on the PyPI installed code-base. Please use the git repo if you want to run the entire suite of tests\n");
fprintf(stderr,ANSI_COLOR_MAGENTA "Tests are skipped on the PyPI installed code-base. Please use the git repo if you want to run the entire suite of tests"ANSI_COLOR_RESET"\n\n");
}

if(RA2 != RA1) {
Expand Down
2 changes: 1 addition & 1 deletion xi_theory/tests/test_nonperiodic.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ int main(int argc, char **argv)
}
if(skipped > 0) {
fprintf(stderr,ANSI_COLOR_YELLOW "SKIPPED: %d tests" ANSI_COLOR_RESET "\n", skipped);
fprintf(stderr,"Tests are skipped on the PyPI installed code-base. Please use the git repo if you want to run the entire suite of tests\n");
fprintf(stderr,ANSI_COLOR_MAGENTA "Tests are skipped on the PyPI installed code-base. Please use the git repo if you want to run the entire suite of tests"ANSI_COLOR_RESET"\n\n");
}

if(X2 != X1) {
Expand Down
2 changes: 1 addition & 1 deletion xi_theory/tests/test_periodic.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ int main(int argc, char **argv)
}
if(skipped > 0) {
fprintf(stderr,ANSI_COLOR_YELLOW "SKIPPED: %d tests" ANSI_COLOR_RESET "\n", skipped);
fprintf(stderr,"Tests are skipped on the PyPI installed code-base. Please use the git repo if you want to run the entire suite of tests\n");
fprintf(stderr,ANSI_COLOR_MAGENTA "Tests are skipped on the PyPI installed code-base. Please use the git repo if you want to run the entire suite of tests"ANSI_COLOR_RESET"\n\n");
}

if(X2 != X1) {
Expand Down

0 comments on commit e11f570

Please sign in to comment.