CAMB error

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Gansukh Tumurtushaa
Posts: 34
Joined: October 05 2013
Affiliation: Sogang univ.

CAMB error

Post by Gansukh Tumurtushaa » October 27 2014

Dear All,

I have been compiling CAMB code with its default, and obtained following IOError even though the data file exits in the camb directory for both cases.

Code: Select all

 
gansuh2@soliton2:~/camb$ python python/CLCompare.py 
Traceback (most recent call last):
  File "python/CLCompare.py", line 13, in <module>
    plot_compare&#40;&#91;root, root2&#93;, ncl=4, x='sqrt'&#41;
  File "/home/gansuh2/camb/python/cambPlots.py", line 200, in plot_compare
    clResults&#91;i&#93; = checkClResult&#40;res&#41;
  File "/home/gansuh2/camb/python/cambPlots.py", line 148, in checkClResult
    if lensedCl&#58; return ClResult&#40;result&#41;
  File "/home/gansuh2/camb/python/cambPlots.py", line 38, in __init__
    if isinstance&#40;lensedcl, basestring&#41;&#58; lensedcl = np.loadtxt&#40;lensedcl, skiprows=skiprows&#41;
  File "/usr/lib/python2.7/dist-packages/numpy/lib/npyio.py", line 690, in loadtxt
    fh = iter&#40;open&#40;fname, 'U'&#41;&#41;
IOError&#58; &#91;Errno 2&#93; No such file or directory&#58; '../test_lensedCls.dat'
gansuh2@soliton2&#58;~/camb&#36; python python/covCompare.py 
Traceback &#40;most recent call last&#41;&#58;
  File "python/covCompare.py", line 12, in <module>
    plot_array&#40;&#91;root&#93;, y='log', x='log', half=True, diff=False&#41;
  File "/home/gansuh2/camb/python/cambPlots.py", line 159, in plot_array
    if isinstance&#40;res, basestring&#41;&#58; clResults&#91;i&#93; = ClResult&#40;cov_cls=res&#41;
  File "/home/gansuh2/camb/python/cambPlots.py", line 49, in __init__
    self.set_cov_cls&#40;cov_cls, scaling&#41;
  File "/home/gansuh2/camb/python/cambPlots.py", line 52, in set_cov_cls
    arr = np.loadtxt&#40;cov_cls&#41;
  File "/usr/lib/python2.7/dist-packages/numpy/lib/npyio.py", line 690, in loadtxt
    fh = iter&#40;open&#40;fname, 'U'&#41;&#41;
IOError&#58; &#91;Errno 2&#93; No such file or directory&#58; '../test_lensing_scalCovCls.dat'
gansuh2@soliton2&#58;~/camb&#36; 
I am new for camb and have no idea after looking at the cambPlots.py file. Please, let me know what I can do in this case.
Thank you.

-Gansukh

Antony Lewis
Posts: 1941
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: CAMB error

Post by Antony Lewis » October 28 2014

The file path probably needs to be relative to your current active path.

Gansukh Tumurtushaa
Posts: 34
Joined: October 05 2013
Affiliation: Sogang univ.

CAMB error

Post by Gansukh Tumurtushaa » November 01 2014

The file path probably needs to be relative to your current active path.
Thank you, you are right. Now it is okay after providing correct path.

Post Reply