CosmoCoffee Forum Index CosmoCoffee

 
 FAQFAQ   SearchSearch  MemberlistSmartFeed   MemberlistMemberlist    RegisterRegister 
   ProfileProfile   Log inLog in 
Arxiv New Filter | Bookmarks & clubs | Arxiv ref/author:

Python Camb Casarini Halofit
 
Post new topic   Reply to topic    CosmoCoffee Forum Index -> Computers and software
View previous topic :: View next topic  
Author Message
Matthew Digman



Joined: 03 Feb 2017
Posts: 4
Affiliation: The Ohio State University

PostPosted: February 03 2017  Reply with quote

I see that the latest update of the python camb wrapper adds halofit_casarini to the list of possible halofit versions. Setting w with set_dark_energy appears to change w0, but I cannot find a way to set wa. Is there a way to do this?
Back to top
View user's profile [ Hidden ]
Antony Lewis



Joined: 23 Sep 2004
Posts: 1185
Affiliation: University of Sussex

PostPosted: February 03 2017  Reply with quote

The "devel" branch (on CAMB's github) supports switching the dark energy model, e.g. using wa/=0 with ppf. (requires gfortran 6+)
Back to top
View user's profile [ Hidden ] Visit poster's website
Matthew Digman



Joined: 03 Feb 2017
Posts: 4
Affiliation: The Ohio State University

PostPosted: February 04 2017  Reply with quote

Okay I downloaded the devel branch and make runs okay, but I get following when I try to run
Code:
pip install --egg .
from the pycamb directory:

Code:
  Running setup.py install for camb ... error
    Complete output from command /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-KKwJ_N-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-ftunUE-record/install-record.txt --compile:
    running install
    error: [Errno 2] No such file or directory: '/private/tmp/pip-KKwJ_N-build/fortran'
   
    ----------------------------------------
Command "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-KKwJ_N-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-ftunUE-record/install-record.txt --compile" failed with error code 1 in /private/tmp/pip-KKwJ_N-build/


I actually get the same error when I try to install from the master branch, but have no problems with the version from pypi. Do you know what is causing this?[/quote]
Back to top
View user's profile [ Hidden ]
Antony Lewis



Joined: 23 Sep 2004
Posts: 1185
Affiliation: University of Sussex

PostPosted: February 04 2017  Reply with quote

Not sure, try running setup.py directly?
Back to top
View user's profile [ Hidden ] Visit poster's website
Matthew Digman



Joined: 03 Feb 2017
Posts: 4
Affiliation: The Ohio State University

PostPosted: February 06 2017  Reply with quote

When I run
Code:
python ./setup.py install
I get this:

Code:
running install
Compiling source...
mkdir -p Releaselib
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C Releaselib -f ../Makefile_main libcamb_recfast.a F90FLAGS="-shared -fPIC -O3 -fopenmp -MMD -cpp -ffree-line-length-none -fmax-errors=4"
make[1]: Circular precision.mod <- precision.mod dependency dropped.
make[1]: Circular recdata.mod <- recdata.mod dependency dropped.
make[1]: Circular recdata.mod <- recdata.mod dependency dropped.
make[1]: Circular recdata.mod <- recdata.mod dependency dropped.
make[1]: Circular recdata.mod <- recdata.mod dependency dropped.
make[1]: Circular recdata.mod <- recdata.mod dependency dropped.
make[1]: Circular redshiftspacedata.mod <- redshiftspacedata.mod dependency dropped.
make[1]: Circular modelparams.mod <- redshiftspacedata.mod dependency dropped.
make[1]: Circular modelparams.mod <- modelparams.mod dependency dropped.
make[1]: Circular modelparams.mod <- modelparams.mod dependency dropped.
make[1]: Circular lvalues.mod <- redshiftspacedata.mod dependency dropped.
make[1]: Circular lvalues.mod <- modelparams.mod dependency dropped.
make[1]: Circular lvalues.mod <- modelparams.mod dependency dropped.
make[1]: Circular lvalues.mod <- lvalues.mod dependency dropped.
make[1]: Circular lvalues.mod <- modelparams.mod dependency dropped.
make[1]: Circular lvalues.mod <- modelparams.mod dependency dropped.
make[1]: Circular lvalues.mod <- modelparams.mod dependency dropped.
make[1]: Circular lvalues.mod <- modelparams.mod dependency dropped.
make[1]: Circular massivenu.mod <- redshiftspacedata.mod dependency dropped.
make[1]: Circular massivenu.mod <- modelparams.mod dependency dropped.
make[1]: Circular massivenu.mod <- modelparams.mod dependency dropped.
make[1]: Circular massivenu.mod <- lvalues.mod dependency dropped.
make[1]: Circular massivenu.mod <- modelparams.mod dependency dropped.
make[1]: Circular massivenu.mod <- modelparams.mod dependency dropped.
make[1]: Circular massivenu.mod <- modelparams.mod dependency dropped.
make[1]: Circular massivenu.mod <- modelparams.mod dependency dropped.
make[1]: Circular massivenu.mod <- massivenu.mod dependency dropped.
make[1]: Circular massivenu.mod <- modelparams.mod dependency dropped.
make[1]: Circular modeldata.mod <- redshiftspacedata.mod dependency dropped.
make[1]: Circular modeldata.mod <- modelparams.mod dependency dropped.
make[1]: Circular modeldata.mod <- modelparams.mod dependency dropped.
make[1]: Circular modeldata.mod <- lvalues.mod dependency dropped.
make[1]: Circular modeldata.mod <- modelparams.mod dependency dropped.
make[1]: Circular modeldata.mod <- modelparams.mod dependency dropped.
make[1]: Circular modeldata.mod <- modelparams.mod dependency dropped.
make[1]: Circular modeldata.mod <- modelparams.mod dependency dropped.
make[1]: Circular modeldata.mod <- massivenu.mod dependency dropped.
make[1]: Circular modeldata.mod <- modelparams.mod dependency dropped.
make[1]: Circular modeldata.mod <- modeldata.mod dependency dropped.
make[1]: Circular modeldata.mod <- modeldata.mod dependency dropped.
make[1]: Circular modeldata.mod <- modelparams.mod dependency dropped.
make[1]: Circular modeldata.mod <- massivenu.mod dependency dropped.
make[1]: Circular transfer.mod <- redshiftspacedata.mod dependency dropped.
make[1]: Circular transfer.mod <- modelparams.mod dependency dropped.
make[1]: Circular transfer.mod <- modelparams.mod dependency dropped.
make[1]: Circular transfer.mod <- lvalues.mod dependency dropped.
make[1]: Circular transfer.mod <- modelparams.mod dependency dropped.
make[1]: Circular transfer.mod <- modelparams.mod dependency dropped.
make[1]: Circular transfer.mod <- modelparams.mod dependency dropped.
make[1]: Circular transfer.mod <- modelparams.mod dependency dropped.
make[1]: Circular transfer.mod <- massivenu.mod dependency dropped.
make[1]: Circular transfer.mod <- modelparams.mod dependency dropped.
make[1]: Circular transfer.mod <- modeldata.mod dependency dropped.
make[1]: Circular transfer.mod <- modeldata.mod dependency dropped.
make[1]: Circular transfer.mod <- modelparams.mod dependency dropped.
make[1]: Circular transfer.mod <- massivenu.mod dependency dropped.
make[1]: Circular transfer.mod <- transfer.mod dependency dropped.
make[1]: Circular massivenu.mod <- modelparams.mod dependency dropped.
make[1]: Circular massivenu.mod <- massivenu.mod dependency dropped.
make[1]: Circular lvalues.mod <- modelparams.mod dependency dropped.
make[1]: Circular lvalues.mod <- modelparams.mod dependency dropped.
make[1]: Circular modelparams.mod <- modelparams.mod dependency dropped.
make[1]: Circular modelparams.mod <- modelparams.mod dependency dropped.
make[1]: Circular modelparams.mod <- modelparams.mod dependency dropped.
make[1]: Circular modelparams.mod <- modelparams.mod dependency dropped.
make[1]: Circular modelparams.mod <- modelparams.mod dependency dropped.
make[1]: Circular modelparams.mod <- modelparams.mod dependency dropped.
make[1]: Circular spherbessels.mod <- spherbessels.mod dependency dropped.
make[1]: Circular gaugeinterface.mod <- gaugeinterface.mod dependency dropped.
make[1]: Circular nonlinear.mod <- nonlinear.mod dependency dropped.
make[1]: Circular nonlinear.mod <- nonlinear.mod dependency dropped.
make[1]: `libcamb_recfast.a' is up to date.
gfortran -shared -fPIC -O3 -fopenmp -MMD -cpp -ffree-line-length-none -fmax-errors=4 -JReleaselib -IReleaselib/ -I/Users/mcdigman/Documents/hirata_research/forutils-master//Release/  \
      camb_python.f90 Releaselib/libcamb_recfast.a -lstdc++ -L/Users/mcdigman/Documents/hirata_research/forutils-master//Release -lforutils -o pycamb/camb/camblib.so
Compilation failed
Back to top
View user's profile [ Hidden ]
Antony Lewis



Joined: 23 Sep 2004
Posts: 1185
Affiliation: University of Sussex

PostPosted: February 06 2017  Reply with quote

The silent error is not very helpful! Make sure you've downloaded a "forutils" directory with shared modules:

git clone –depth=1 https://github.com/cmbant/forutils.git forutils

(it looks as though you should have already built it into Users/mcdigman/Documents/hirata_research/forutils-master//Release/)

After doing that the automated Travis-CI test just runs tests/run_tests.sh which installs the package: it runs OK on the current devel head. Might also want to check you have an up to date gfortran.
Back to top
View user's profile [ Hidden ] Visit poster's website
Matthew Digman



Joined: 03 Feb 2017
Posts: 4
Affiliation: The Ohio State University

PostPosted: February 07 2017  Reply with quote

It doesn't run. In case it was due to changes from the previous attempts, I changed the first part of the test file so it clones a completely clean version of everything camb related:
Code:
git clone -b devel --depth=1 https://github.com/cmbant/CAMB.git camb
cd camb
git clone --depth=1 https://github.com/cmbant/forutils.git forutils
cd forutils
make Release
cd ..
make Release


I get the same error message I included before, followed by

Code:
Compiling source...
Compilation failed
running test
running egg_info
creating camb.egg-info
writing camb.egg-info/PKG-INFO
writing top-level names to camb.egg-info/top_level.txt
writing dependency_links to camb.egg-info/dependency_links.txt
writing manifest file 'camb.egg-info/SOURCES.txt'
reading manifest file 'camb.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.dll' found under directory 'camb'
warning: no previously-included files matching '*.dat' found under directory 'camb'
warning: no files found matching 'Makefile*' under directory 'fortran'
warning: no files found matching '*.dat' under directory 'fortran'
warning: no files found matching '*.?90' under directory 'fortran'
writing manifest file 'camb.egg-info/SOURCES.txt'
running build_ext
Traceback (most recent call last):
  File "setup.py", line 124, in <module>
    keywords=['cosmology', 'CAMB']
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/test.py", line 211, in run
    self.run_tests()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/test.py", line 234, in run_tests
    **exit_kwarg
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/main.py", line 94, in __init__
    self.parseArgs(argv)


I have gfortran 6 installed:

Code:
gfortran --version
GNU Fortran (MacPorts gcc6 6.3.0_1) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


I also tried switching to gfortran 7, which doesn't run either.
Back to top
View user's profile [ Hidden ]
Antony Lewis



Joined: 23 Sep 2004
Posts: 1185
Affiliation: University of Sussex

PostPosted: February 07 2017  Reply with quote

setuptools installed? Only other difference I can see with the tests/run_tests.sh seems to be that you are using a Mac (can always run in CosmoBox VM instead).
Back to top
View user's profile [ Hidden ] Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    CosmoCoffee Forum Index -> Computers and software All times are GMT + 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group. Sponsored by WordWeb online dictionary and dictionary software.