Camb: compilling error with "gomp 4.0"

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Marco Xoca
Posts: 1
Joined: October 23 2016
Affiliation: Universidad Autónoma de Baja California

Camb: compilling error with \"gomp 4.0\"

Post by Marco Xoca » October 23 2016

Hi, I was trying to run for first time camb (in the jupyter notebook) with the CAMBdemo file. I used this line codes:

Code: Select all

%matplotlib inline
import sys, platform, os
from matplotlib import pyplot as plt
import numpy as np
#uncomment this if you are running remotely and want to keep in synch with repo changes
#if platform.system()!='Windows':
#    !cd $HOME/git/camb; git pull github master; git log -1
print('Using CAMB installed at '+ os.path.realpath(os.path.join(os.getcwd(),'..')))
sys.path.insert(0,os.path.realpath(os.path.join(os.getcwd(),'..')))
import camb
from camb import model, initialpower

But, I got this error:

Code: Select all

Using CAMB installed at /home/xoca/Desktop

---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-1-e5176863e3af> in <module>&#40;&#41;
     10 print&#40;'Using CAMB installed at '+ os.path.realpath&#40;os.path.join&#40;os.getcwd&#40;&#41;,'..'&#41;&#41;&#41;
     11 sys.path.insert&#40;0,os.path.realpath&#40;os.path.join&#40;os.getcwd&#40;&#41;,'..'&#41;&#41;&#41;
---> 12 import camb
     13 from camb import model, initialpower
     14 

/home/xoca/.local/lib/python2.7/site-packages/camb/__init__.py in <module>&#40;&#41;
     10 __version__ = "0.1.2"
     11 
---> 12 from .baseconfig import dll_import
     13 from .camb import CAMBdata, MatterTransferData, get_results, get_transfer_functions, get_background, \
     14     get_age, get_zre_from_tau, set_z_outputs, set_feedback_level, set_params, get_matter_power_interpolator

/home/xoca/.local/lib/python2.7/site-packages/camb/baseconfig.py in <module>&#40;&#41;
     33     if not osp.isfile&#40;CAMBL&#41;&#58; sys.exit&#40;
     34         '%s does not exist.\nPlease remove any old installation and install again.' % DLLNAME&#41;
---> 35     camblib = ctypes.LibraryLoader&#40;ifort_gfortran_loader&#41;.LoadLibrary&#40;CAMBL&#41;
     36 # camblib = ctypes.cdll.LoadLibrary&#40;CAMBL&#41;
     37 else&#58;

/home/xoca/anaconda2/lib/python2.7/ctypes/__init__.pyc in LoadLibrary&#40;self, name&#41;
    438 
    439     def LoadLibrary&#40;self, name&#41;&#58;
--> 440         return self._dlltype&#40;name&#41;
    441 
    442 cdll = LibraryLoader&#40;CDLL&#41;

/home/xoca/anaconda2/lib/python2.7/ctypes/__init__.pyc in __init__&#40;self, name, mode, handle, use_errno, use_last_error&#41;
    360 
    361         if handle is None&#58;
--> 362             self._handle = _dlopen&#40;self._name, mode&#41;
    363         else&#58;
    364             self._handle = handle

OSError&#58; /home/xoca/anaconda2/bin/../lib/libgomp.so.1&#58; version `GOMP_4.0' not found &#40;required by /home/xoca/.local/lib/python2.7/site-packages/camb/camblib.so&#41;

So, can anyone help me with this error please? I really don't understand what is happening.

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

Re: Camb: compilling error with \\\"gomp 4.0\\\"

Post by Antony Lewis » October 24 2016

Check you have a consistent and up-to-date gcc installation.

Post Reply