I'm trying to reproduce figure 11 of astro-ph/0603494 with massive neutrinos. This figure shows the density contrast for CDM, photons, baryons, massive neutrino,\phi and \psi in the Newtonian gauge. To do this in CAMB I'm following the examples in the jupyter notebook ScalEqs.
For example, the piece of code below
Code: Select all
Delta_photon_N = make_frame_invariant(Delta_g, 'Newtonian')
ev_photon_N = data.get_time_evolution(k, eta, Delta_photon_N)
Code: Select all
Delta_nu_sync = make_frame_invariant(Delta_nu, 'CDM')
ev_nu_sync = data.get_time_evolution(k, eta, Delta_nu_sync)
Code: Select all
Delta_nu_N = make_frame_invariant(Delta_nu, 'Newtonian')
ev_nu_N = data.get_time_evolution(k, eta, Delta_nu_N)
Code: Select all
gfortran -shared -fPIC -O1 -fmax-errors=4 camb_source12.f90 -o camb_source12.dll
Error compiling generated code:
b'camb_source12.f90:24:45:\n\n 24 | sources(1) = (-3*adotoa*sigma*(a**2*kappa*p_nu + grhonu_t) + &\n |
1\nError: Symbol \xe2\x80\x98kappa\xe2\x80\x99 at (1) has no IMPLICIT type\ncamb_source12.f90:24:50:\n\n 24 |
sources(1) = (-3*adotoa*sigma*(a**2*kappa*p_nu + grhonu_t) + &\n |
1\nError: Symbol \xe2\x80\x98p_nu\xe2\x80\x99 at (1) has no IMPLICIT type\n'
Source is:
sources(1) = (-3*adotoa*sigma*(a**2*kappa*p_nu + grhonu_t) + &
clxnu*grhonu_t*k)/(grhonu_t*k)
---------------------------------------------------------------------------
CalledProcessError Traceback (most recent call last)
Input In [79], in <cell line: 17>()
15 ev_photon = data.get_time_evolution(k, eta, Delta_photon_N)
16 ev_cdm = data.get_time_evolution(k, eta, Delta_cdm_N)
---> 17 ev_nu = data.get_time_evolution(k, eta, Delta_nu_N)
18 ev_psi = data.get_time_evolution(k, eta, Psi_N)
19 ev_phi = data.get_time_evolution(k, eta, Phi_N)
File ~/CAMBVersions/code/CAMB/camb/results.py:550, in CAMBdata.get_time_evolution(self, q, eta, vars, lAccuracyBoost, frame)
548 if ncustom:
549 from . import symbolic
--> 550 funcPtr = symbolic.compile_sympy_to_camb_source_func(custom_vars, frame=frame)
551 custom_source_func = ctypes.cast(funcPtr, ctypes.c_void_p)
552 else:
File ~/CAMBVersions/code/CAMB/camb/symbolic.py:856, in compile_sympy_to_camb_source_func(sources, code_path, frame)
854 for i, source in enumerate(sources):
855 code += camb_fortran(source, 'sources(%s)' % (i + 1), frame=frame) + '\n'
--> 856 return compile_source_function_code(code, file_path=code_path)
File ~/CAMBVersions/code/CAMB/camb/symbolic.py:821, in compile_source_function_code(code_body, file_path, compiler, fflags, cache)
819 command = " ".join([compiler, fflags, source_file, "-o", dll_name])
820 try:
--> 821 subprocess.check_output(command, stderr=subprocess.STDOUT, shell=True, cwd=workdir, env=compiler_environ)
822 except subprocess.CalledProcessError as E:
823 print(command)
File /usr/lib/python3.10/subprocess.py:420, in check_output(timeout, *popenargs, **kwargs)
417 empty = b''
418 kwargs['input'] = empty
--> 420 return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
421 **kwargs).stdout
File /usr/lib/python3.10/subprocess.py:524, in run(input, capture_output, timeout, check, *popenargs, **kwargs)
522 retcode = process.poll()
523 if check and retcode:
--> 524 raise CalledProcessError(retcode, process.args,
525 output=stdout, stderr=stderr)
526 return CompletedProcess(process.args, retcode, stdout, stderr)
CalledProcessError: Command 'gfortran -shared -fPIC -O1 -fmax-errors=4 camb_source12.f90 -o camb_source12.dll' returned non-zero exit status 1.
I will appreciate any help.
Thanks.