Skip to content

Commit

Permalink
Oct 2012 RC: recfast 1.5.2, halofit update, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
cmbant committed Oct 2, 2012
1 parent 71bc78f commit e82a69a
Show file tree
Hide file tree
Showing 24 changed files with 4,260 additions and 770 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
FISHER=

#Edit for your compiler
#Note there are many old ifc versions, some of which behave oddly
#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 = ifort
FFLAGS = -openmp -fast -W0 -WB -fpp2 -vec_report0
## 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
Expand Down Expand Up @@ -68,10 +70,10 @@ endif

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

ifneq ($(FISHER),)
FFLAGS += -DFISHER
Expand Down
70 changes: 50 additions & 20 deletions Makefile_main
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@

#Files containing evolution equations initial power spectrum module
EQUATIONS = equations
POWERSPECTRUM = power_tilt
REIONIZATION = reionization
RECOMBINATION = recfast
BISPECTRUM = SeparableBispectrum
EQUATIONS ?= equations
POWERSPECTRUM ?= power_tilt
REIONIZATION ?= reionization
RECOMBINATION ?= recfast



BISPECTRUM ?= SeparableBispectrum

#Module doing non-linear scaling
NONLINEAR = halofit
NONLINEAR ?= halofit

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


CAMBLIB = libcamb.a
CAMBLIB = libcamb_$(RECOMBINATION).a

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

Expand All @@ -25,6 +28,26 @@ 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

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)
Expand All @@ -44,27 +67,34 @@ 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) -o $@
$(F90C) $(F90FLAGS) $(CAMBOBJ) $(DRIVER) $(F90CRLINK) -o $@

$(CAMBLIB): $(CAMBOBJ)
ar -r $@ $?
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

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

$(BISPECTRUM).o: $(BISPECTRUM).F90
$(F90C) $(F90FLAGS) -c $(BISPECTRUM).F90


Matrix_utils.o:
$(F90C) $(F90FLAGS) -c Matrix_utils.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;


53 changes: 53 additions & 0 deletions VisualStudio/CAMB.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "CAMB_devel", "CAMB_devel.vfproj", "{207BF71A-E457-49F3-BEC8-B2F9E85F74BA}"
ProjectSection(ProjectDependencies) = postProject
{DBB2F5F1-BF96-4AAD-9CE7-15EB2E22E3E7} = {DBB2F5F1-BF96-4AAD-9CE7-15EB2E22E3E7}
{C7D790F6-3574-43A1-A5E1-1E6FC5478F95} = {C7D790F6-3574-43A1-A5E1-1E6FC5478F95}
EndProjectSection
EndProject
Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "CAMBLib", "CAMBLib.vfproj", "{DBB2F5F1-BF96-4AAD-9CE7-15EB2E22E3E7}"
ProjectSection(ProjectDependencies) = postProject
{C7D790F6-3574-43A1-A5E1-1E6FC5478F95} = {C7D790F6-3574-43A1-A5E1-1E6FC5478F95}
EndProjectSection
EndProject
Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "SharedObj", "SharedObj.vfproj", "{C7D790F6-3574-43A1-A5E1-1E6FC5478F95}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{207BF71A-E457-49F3-BEC8-B2F9E85F74BA}.Debug|Win32.ActiveCfg = Debug|Win32
{207BF71A-E457-49F3-BEC8-B2F9E85F74BA}.Debug|Win32.Build.0 = Debug|Win32
{207BF71A-E457-49F3-BEC8-B2F9E85F74BA}.Debug|x64.ActiveCfg = Debug|x64
{207BF71A-E457-49F3-BEC8-B2F9E85F74BA}.Debug|x64.Build.0 = Debug|x64
{207BF71A-E457-49F3-BEC8-B2F9E85F74BA}.Release|Win32.ActiveCfg = Release|Win32
{207BF71A-E457-49F3-BEC8-B2F9E85F74BA}.Release|Win32.Build.0 = Release|Win32
{207BF71A-E457-49F3-BEC8-B2F9E85F74BA}.Release|x64.ActiveCfg = Release|x64
{207BF71A-E457-49F3-BEC8-B2F9E85F74BA}.Release|x64.Build.0 = Release|x64
{DBB2F5F1-BF96-4AAD-9CE7-15EB2E22E3E7}.Debug|Win32.ActiveCfg = Debug|Win32
{DBB2F5F1-BF96-4AAD-9CE7-15EB2E22E3E7}.Debug|Win32.Build.0 = Debug|Win32
{DBB2F5F1-BF96-4AAD-9CE7-15EB2E22E3E7}.Debug|x64.ActiveCfg = Debug|x64
{DBB2F5F1-BF96-4AAD-9CE7-15EB2E22E3E7}.Debug|x64.Build.0 = Debug|x64
{DBB2F5F1-BF96-4AAD-9CE7-15EB2E22E3E7}.Release|Win32.ActiveCfg = Release|Win32
{DBB2F5F1-BF96-4AAD-9CE7-15EB2E22E3E7}.Release|Win32.Build.0 = Release|Win32
{DBB2F5F1-BF96-4AAD-9CE7-15EB2E22E3E7}.Release|x64.ActiveCfg = Release|x64
{DBB2F5F1-BF96-4AAD-9CE7-15EB2E22E3E7}.Release|x64.Build.0 = Release|x64
{C7D790F6-3574-43A1-A5E1-1E6FC5478F95}.Debug|Win32.ActiveCfg = Debug|Win32
{C7D790F6-3574-43A1-A5E1-1E6FC5478F95}.Debug|Win32.Build.0 = Debug|Win32
{C7D790F6-3574-43A1-A5E1-1E6FC5478F95}.Debug|x64.ActiveCfg = Debug|x64
{C7D790F6-3574-43A1-A5E1-1E6FC5478F95}.Debug|x64.Build.0 = Debug|x64
{C7D790F6-3574-43A1-A5E1-1E6FC5478F95}.Release|Win32.ActiveCfg = Release|Win32
{C7D790F6-3574-43A1-A5E1-1E6FC5478F95}.Release|Win32.Build.0 = Release|Win32
{C7D790F6-3574-43A1-A5E1-1E6FC5478F95}.Release|x64.ActiveCfg = Release|x64
{C7D790F6-3574-43A1-A5E1-1E6FC5478F95}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
60 changes: 60 additions & 0 deletions VisualStudio/CAMBLib.vfproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject ProjectType="typeStaticLibrary" ProjectCreator="Intel Fortran" Keyword="Static Library" Version="11.0" ProjectIdGuid="{C7D790F6-3574-43A1-A5E1-1E6FC5478F95}">
<Platforms>
<Platform Name="Win32"/>
<Platform Name="x64"/></Platforms>
<Configurations>
<Configuration Name="Debug|Win32" ConfigurationType="typeStaticLibrary">
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" Preprocess="preprocessYes" Traceback="true" BoundsCheck="true" StackFrameCheck="true" RuntimeLibrary="rtMultiThreadedDebug"/>
<Tool Name="VFLibrarianTool"/>
<Tool Name="VFResourceCompilerTool"/>
<Tool Name="VFMidlTool" SuppressStartupBanner="true"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPostBuildEventTool"/></Configuration>
<Configuration Name="Release|Win32" ConfigurationType="typeStaticLibrary">
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" Preprocess="preprocessYes"/>
<Tool Name="VFLibrarianTool"/>
<Tool Name="VFResourceCompilerTool"/>
<Tool Name="VFMidlTool" SuppressStartupBanner="true"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPostBuildEventTool"/></Configuration>
<Configuration Name="Debug|x64" ConfigurationType="typeStaticLibrary">
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" Preprocess="preprocessYes" Traceback="true" BoundsCheck="true" StackFrameCheck="true" RuntimeLibrary="rtMultiThreadedDebug"/>
<Tool Name="VFLibrarianTool"/>
<Tool Name="VFResourceCompilerTool"/>
<Tool Name="VFMidlTool" SuppressStartupBanner="true" TargetEnvironment="midlTargetAMD64"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPostBuildEventTool"/></Configuration>
<Configuration Name="Release|x64" ConfigurationType="typeStaticLibrary">
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" HeapArrays="0" Preprocess="preprocessYes" OpenMP="OpenMPParallelCode"/>
<Tool Name="VFLibrarianTool"/>
<Tool Name="VFResourceCompilerTool"/>
<Tool Name="VFMidlTool" SuppressStartupBanner="true" TargetEnvironment="midlTargetAMD64"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPostBuildEventTool"/></Configuration></Configurations>
<Files>
<Filter Name="Header Files" Filter="fi;fd"/>
<Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"/>
<Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl">
<File RelativePath="..\bessels.f90"/>
<File RelativePath="..\camb.f90"/>
<File RelativePath="..\cmbmain.f90"/>
<File RelativePath="..\constants.f90"/>
<File RelativePath="..\equations.f90"/>
<File RelativePath="..\halofit.f90"/>
<File RelativePath="..\lensing.f90"/>
<File RelativePath="..\modules.f90"/>
<File RelativePath="..\power_tilt.f90"/>
<File RelativePath="..\recfast.f90"/>
<File RelativePath="..\reionization.f90"/>
<File RelativePath="..\SeparableBispectrum.F90"/>
<File RelativePath="..\subroutines.f90"/></Filter></Files>
<Globals/></VisualStudioProject>
52 changes: 52 additions & 0 deletions VisualStudio/CAMB_devel.vfproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject ProjectCreator="Intel Fortran" Keyword="Console Application" Version="11.0" ProjectIdGuid="{207BF71A-E457-49F3-BEC8-B2F9E85F74BA}">
<Platforms>
<Platform Name="Win32"/>
<Platform Name="x64"/></Platforms>
<Configurations>
<Configuration Name="Debug|Win32">
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" Preprocess="preprocessYes" ErrorLimit="4" WarnInterfaces="true" Traceback="true" BoundsCheck="true" StackFrameCheck="true" RuntimeLibrary="rtMultiThreadedDebug"/>
<Tool Name="VFLinkerTool" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" GenerateDebugInformation="true" SubSystem="subSystemConsole"/>
<Tool Name="VFResourceCompilerTool"/>
<Tool Name="VFMidlTool" SuppressStartupBanner="true"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPostBuildEventTool"/>
<Tool Name="VFManifestTool" SuppressStartupBanner="true"/></Configuration>
<Configuration Name="Release|Win32">
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" UseProcessorExtensions="codeExclusivelyHost" Preprocess="preprocessYes" OpenMP="OpenMPParallelCode" ErrorLimit="4"/>
<Tool Name="VFLinkerTool" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" SubSystem="subSystemConsole"/>
<Tool Name="VFResourceCompilerTool"/>
<Tool Name="VFMidlTool" SuppressStartupBanner="true"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPostBuildEventTool"/>
<Tool Name="VFManifestTool" SuppressStartupBanner="true"/></Configuration>
<Configuration Name="Debug|x64">
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" Preprocess="preprocessYes" ErrorLimit="4" WarnDeclarations="true" WarnUnusedVariables="true" WarnTruncateSource="true" Traceback="true" BoundsCheck="true" StackFrameCheck="true" RuntimeLibrary="rtMultiThreadedDebug"/>
<Tool Name="VFLinkerTool" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" GenerateDebugInformation="true" SubSystem="subSystemConsole"/>
<Tool Name="VFResourceCompilerTool"/>
<Tool Name="VFMidlTool" SuppressStartupBanner="true" TargetEnvironment="midlTargetAMD64"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPostBuildEventTool"/>
<Tool Name="VFManifestTool" SuppressStartupBanner="true"/></Configuration>
<Configuration Name="Release|x64">
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" UseProcessorExtensions="codeExclusivelyHost" Preprocess="preprocessYes" OpenMP="OpenMPParallelCode" ErrorLimit="4"/>
<Tool Name="VFLinkerTool" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" SubSystem="subSystemConsole"/>
<Tool Name="VFResourceCompilerTool"/>
<Tool Name="VFMidlTool" SuppressStartupBanner="true" TargetEnvironment="midlTargetAMD64"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPostBuildEventTool"/>
<Tool Name="VFManifestTool" SuppressStartupBanner="true"/></Configuration></Configurations>
<Files>
<Filter Name="Header Files" Filter="fi;fd"/>
<Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"/>
<Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl">
<File RelativePath="..\inidriver.F90"/></Filter></Files>
<Globals/></VisualStudioProject>
50 changes: 50 additions & 0 deletions VisualStudio/SharedObj.vfproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject ProjectType="typeStaticLibrary" ProjectCreator="Intel Fortran" Keyword="Static Library" Version="11.0" ProjectIdGuid="{C7D790F6-3574-43A1-A5E1-1E6FC5478F95}">
<Platforms>
<Platform Name="Win32"/>
<Platform Name="x64"/></Platforms>
<Configurations>
<Configuration Name="Debug|Win32" ConfigurationType="typeStaticLibrary">
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" Preprocess="preprocessYes" WarnInterfaces="true" Traceback="true" BoundsCheck="true" StackFrameCheck="true" RuntimeLibrary="rtMultiThreadedDebug"/>
<Tool Name="VFLibrarianTool"/>
<Tool Name="VFResourceCompilerTool"/>
<Tool Name="VFMidlTool" SuppressStartupBanner="true"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPostBuildEventTool"/></Configuration>
<Configuration Name="Release|Win32" ConfigurationType="typeStaticLibrary">
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" Preprocess="preprocessYes"/>
<Tool Name="VFLibrarianTool"/>
<Tool Name="VFResourceCompilerTool"/>
<Tool Name="VFMidlTool" SuppressStartupBanner="true"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPostBuildEventTool"/></Configuration>
<Configuration Name="Debug|x64" ConfigurationType="typeStaticLibrary">
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" Preprocess="preprocessYes" WarnInterfaces="true" Traceback="true" BoundsCheck="true" StackFrameCheck="true" RuntimeLibrary="rtMultiThreadedDebug"/>
<Tool Name="VFLibrarianTool"/>
<Tool Name="VFResourceCompilerTool"/>
<Tool Name="VFMidlTool" SuppressStartupBanner="true" TargetEnvironment="midlTargetAMD64"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPostBuildEventTool"/></Configuration>
<Configuration Name="Release|x64" ConfigurationType="typeStaticLibrary">
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" Preprocess="preprocessYes"/>
<Tool Name="VFLibrarianTool"/>
<Tool Name="VFResourceCompilerTool"/>
<Tool Name="VFMidlTool" SuppressStartupBanner="true" TargetEnvironment="midlTargetAMD64"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPostBuildEventTool"/></Configuration></Configurations>
<Files>
<Filter Name="Header Files" Filter="fi;fd"/>
<Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"/>
<Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl">
<File RelativePath="..\inifile.f90"/>
<File RelativePath="..\Matrix_utils.F90"/>
<File RelativePath="..\utils.F90"/></Filter></Files>
<Globals/></VisualStudioProject>
Loading

0 comments on commit e82a69a

Please sign in to comment.