Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrin1 authored Jul 28, 2016
1 parent 06c4a4e commit 4a6bff3
Show file tree
Hide file tree
Showing 35 changed files with 36,160 additions and 1 deletion.
7,999 changes: 7,999 additions & 0 deletions HighLExtrapTemplate_lenspotentialCls.dat

Large diffs are not rendered by default.

87 changes: 87 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#CAMB Makefile

#Set FISHER=Y to compile bispectrum fisher matrix code
FISHER=

#Edit for your compiler
#Note there are many old ifort versions, some of which behave oddly


#Intel , -openmp toggles mutli-processor:
#note version 10.0 gives wrong result for lensed when compiled with -openmp [fixed in 10.1]
F90C = gfortran-5
FFLAGS= -O3 -g -fPIC -I. -std=gnu -ffree-line-length-none
#FFLAGS = -O2 #3 -ffree-form -x f95-cpp-input
## This is flag is passed to the Fortran compiler allowing it to link C++ if required (not usually):
#F90CRLINK = -cxxlib
#ifneq ($(FISHER),)
FFLAGS += # -mkl
#endif

#Gfortran compiler:
#The options here work in v4.5, delete from RHS in earlier versions (15% slower)
#if pre v4.3 add -D__GFORTRAN__
#With v4.6+ try -Ofast -march=native -fopenmp
#On my machine v4.5 is about 20% slower than ifort
#F90C = gfortran -ffast-math
##FFLAGS = -O2
#-ffast-math


#Old Intel ifc, add -openmp for multi-processor (some have bugs):
#F90C = ifc
#FFLAGS = -O2 -Vaxlib -ip -W0 -WB -quiet -fpp2
#some systems can can also add e.g. -tpp7 -xW

#G95 compiler
#F90C = g95
#FFLAGS = -O2

#SGI, -mp toggles multi-processor. Use -O2 if -Ofast gives problems.
#F90C = f90
#FFLAGS = -Ofast -mp

#Digital/Compaq fortran, -omp toggles multi-processor
#F90C = f90
#FFLAGS = -omp -O4 -arch host -math_library fast -tune host -fpe1

#Absoft ProFortran, single processor:
#F90C = f95
#FFLAGS = -O2 -cpu:athlon -s -lU77 -w -YEXT_NAMES="LCS" -YEXT_SFX="_"

#NAGF95, single processor:
#F90C = f95
#FFLAGS = -DNAGF95 -O3

#PGF90
#F90C = pgf90
#FFLAGS = -O2 -DESCAPEBACKSLASH -Mpreprocess

#Sun V880
#F90C = mpf90
#FFLAGS = -O4 -openmp -ftrap=%none -dalign -DMPI

#Sun parallel enterprise:
#F90C = f95
#FFLAGS = -O2 -xarch=native64 -openmp -ftrap=%none
#try removing -openmp if get bus errors. -03, -04 etc are dodgy.

#IBM XL Fortran, multi-processor (run gmake)
#F90C = xlf90_r
#FFLAGS = -DESCAPEBACKSLASH -DIBMXL -qsmp=omp -qsuffix=f=f90:cpp=F90 -O3 -qstrict -qarch=pwr3 -qtune=pwr3

#Settings for building camb_fits
#Location of FITSIO and name of library
#FITSDIR ?= /home/cpac/cpac-tools/lib
#FITSLIB = cfitsio
#Location of HEALPIX for building camb_fits
#HEALPIXDIR ?= /home/cpac/cpac-tools/healpix

#ifneq ($(FISHER),)
#FFLAGS += -DFISHER
#EXTCAMBFILES = Matrix_utils.o
#else
#EXTCAMBFILES =
#endif

include ./Makefile_main
16 changes: 16 additions & 0 deletions MakefileCosmosis
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
include ${COSMOSIS_SRC_DIR}/config/compilers.mk

USER_FFLAGS=-I.

FISHER=
F90C = $(FC)
FITSLIB = cfitsio

ifneq ($(FISHER),)
FFLAGS += -DFISHER
EXTCAMBFILES = Matrix_utils.o
else
EXTCAMBFILES =
endif

include ./Makefile_main
106 changes: 106 additions & 0 deletions Makefile_main
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
#Files containing evolution equations initial power spectrum module
EQUATIONS ?= equations_ppf
POWERSPECTRUM ?= power_tilt
REIONIZATION ?= reionization
RECOMBINATION ?= recfast_axion



BISPECTRUM ?= SeparableBispectrum

#Module doing non-linear scaling
NONLINEAR ?= halofit_ppf

#Driver program
DRIVER ?= inidriver_axion.F90
#DRIVER ?= sigma8.f90
#DRIVER ?= tester.f90


CAMBLIB = libcamb_$(RECOMBINATION).a

#Shouldn't need to change anything else...

F90FLAGS = $(FFLAGS)


#-L$(MKLROOT)/lib/intel64 -lmkl_blas95_ilp64 -lmkl_lapack95_ilp64 -lmkl_scalapack_ilp64 -lmkl_intel_ilp64 -lmkl_core -lmkl_intel_thread -lmkl_blacs_ilp64 -lmkl_blacs_intelmpi_ilp64 -lmkl_vml_mc

#-lpthread -lm
# -lmkl_blas95_ilp64 -lmkl_blas95_ilp64 -lmkl_lapack95_ilp64 -lmkl_scalapack_ilp64 -lmkl_intel_ilp64 -lmkl_core -lmkl_vml_mc -lmkl_intel_thread
# -L$(MKLROOT)/lib/intel64/libmkl_blas95_ilp64 -L$(MKLROOT)/lib/intel64/libmkl_lapack95_ilp64 -L$(MKLROOT)/lib/intel64 -lmkl_scalapack_ilp64 -lmkl_intel_ilp64 -lmkl_core -lmkl_intel_thread -lmkl_blacs_intelmpi_ilp64 -L$(MKLROOT)/lib/intel64/libmkl_mc
HEALPIXLD = -L$(HEALPIXDIR)/lib -lhealpix -L$(FITSDIR) -l$(FITSLIB)

CAMBOBJ = constants.o utils.o $(EXTCAMBFILES) subroutines.o inifile.o $(POWERSPECTRUM).o $(RECOMBINATION).o \
$(REIONIZATION).o modules.o bessels.o $(EQUATIONS).o $(NONLINEAR).o lensing.o $(BISPECTRUM).o cmbmain.o camb.o axion_background.o

#F90CRLINK ?= -lstdc++

## CosmoRec
ifeq ($(RECOMBINATION),cosmorec)
COSMOREC_PATH ?=../CosmoRec/
GSL_LINK ?=-lgsl -lgslcblas
camb: libCosmoRec.a
$(CAMBLIB): libCosmoRec.a
F90CRLINK += -L$(COSMOREC_PATH) -lCosmoRec $(GSL_LINK)
endif


ifeq ($(RECOMBINATION),hyrec)
HYREC_PATH ?= ../HyRec/
camb: libhyrec.a
$(CAMBLIB): libhyrec.a
F90CRLINK += -L$(HYREC_PATH) -lhyrec
endif


default: camb

all: camb $(CAMBLIB)


subroutines.o: constants.o utils.o
$(POWERSPECTRUM).o: subroutines.o inifile.o
$(RECOMBINATION).o: subroutines.o inifile.o
$(REIONIZATION).o: constants.o inifile.o
modules.o: $(REIONIZATION).o $(POWERSPECTRUM).o $(RECOMBINATION).o
bessels.o: modules.o
$(EQUATIONS).o: bessels.o
$(NONLINEAR).o: modules.o
lensing.o: bessels.o
$(BISPECTRUM).o: lensing.o modules.o
cmbmain.o: lensing.o $(NONLINEAR).o $(EQUATIONS).o $(BISPECTRUM).o
camb.o: cmbmain.o
Matrix_utils.o: utils.o
camb: $(CAMBOBJ) $(DRIVER)
$(F90C) $(F90FLAGS) $(CAMBOBJ) $(DRIVER) $(F90CRLINK) -o $@

$(CAMBLIB): $(CAMBOBJ)
ar -r $@ $(CAMBOBJ)

camb_fits: writefits.f90 $(CAMBOBJ) $(DRIVER)
$(F90C) $(F90FLAGS) -I$(HEALPIXDIR)/include $(CAMBOBJ) writefits.f90 $(DRIVER) $(HEALPIXLD) -DWRITE_FITS -o $@

%.o: %.f90
$(F90C) $(F90FLAGS) -c $*.f90

%.o: %.F90
$(F90C) $(F90FLAGS) -c $*.F90


clean:
-rm -f *.o *.a *.d core *.mod


## CosmoRec make parts
cleanCR:
cd $(COSMOREC_PATH); make tidy;

libCosmoRec.a:
cd $(COSMOREC_PATH); make lib;


libhyrec.a:
cd $(HYREC_PATH); make libhyrec.a;


87 changes: 87 additions & 0 deletions Makefile~
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#CAMB Makefile

#Set FISHER=Y to compile bispectrum fisher matrix code
FISHER=

#Edit for your compiler
#Note there are many old ifort versions, some of which behave oddly


#Intel , -openmp toggles mutli-processor:
#note version 10.0 gives wrong result for lensed when compiled with -openmp [fixed in 10.1]
F90C = gfortran-5
FFLAGS= -O3 -g -fPIC -I. -std=gnu -ffree-line-length-none
#FFLAGS = -O2 #3 -ffree-form -x f95-cpp-input
## This is flag is passed to the Fortran compiler allowing it to link C++ if required (not usually):
#F90CRLINK = -cxxlib
#ifneq ($(FISHER),)
FFLAGS += -mkl
#endif

#Gfortran compiler:
#The options here work in v4.5, delete from RHS in earlier versions (15% slower)
#if pre v4.3 add -D__GFORTRAN__
#With v4.6+ try -Ofast -march=native -fopenmp
#On my machine v4.5 is about 20% slower than ifort
#F90C = gfortran -ffast-math
##FFLAGS = -O2
#-ffast-math


#Old Intel ifc, add -openmp for multi-processor (some have bugs):
#F90C = ifc
#FFLAGS = -O2 -Vaxlib -ip -W0 -WB -quiet -fpp2
#some systems can can also add e.g. -tpp7 -xW

#G95 compiler
#F90C = g95
#FFLAGS = -O2

#SGI, -mp toggles multi-processor. Use -O2 if -Ofast gives problems.
#F90C = f90
#FFLAGS = -Ofast -mp

#Digital/Compaq fortran, -omp toggles multi-processor
#F90C = f90
#FFLAGS = -omp -O4 -arch host -math_library fast -tune host -fpe1

#Absoft ProFortran, single processor:
#F90C = f95
#FFLAGS = -O2 -cpu:athlon -s -lU77 -w -YEXT_NAMES="LCS" -YEXT_SFX="_"

#NAGF95, single processor:
#F90C = f95
#FFLAGS = -DNAGF95 -O3

#PGF90
#F90C = pgf90
#FFLAGS = -O2 -DESCAPEBACKSLASH -Mpreprocess

#Sun V880
#F90C = mpf90
#FFLAGS = -O4 -openmp -ftrap=%none -dalign -DMPI

#Sun parallel enterprise:
#F90C = f95
#FFLAGS = -O2 -xarch=native64 -openmp -ftrap=%none
#try removing -openmp if get bus errors. -03, -04 etc are dodgy.

#IBM XL Fortran, multi-processor (run gmake)
#F90C = xlf90_r
#FFLAGS = -DESCAPEBACKSLASH -DIBMXL -qsmp=omp -qsuffix=f=f90:cpp=F90 -O3 -qstrict -qarch=pwr3 -qtune=pwr3

#Settings for building camb_fits
#Location of FITSIO and name of library
#FITSDIR ?= /home/cpac/cpac-tools/lib
#FITSLIB = cfitsio
#Location of HEALPIX for building camb_fits
#HEALPIXDIR ?= /home/cpac/cpac-tools/healpix

#ifneq ($(FISHER),)
#FFLAGS += -DFISHER
#EXTCAMBFILES = Matrix_utils.o
#else
#EXTCAMBFILES =
#endif

include ./Makefile_main
Loading

0 comments on commit 4a6bff3

Please sign in to comment.