Background modification for CAMB-1.1.3
-
- Posts: 32
- Joined: April 12 2019
- Affiliation: Indian Institute of Science Education and Research Kolkata
Background modification for CAMB-1.1.3
Hi,
I want to evolve the background energy density using the background values grhoc, grhob etc.
BackgroundDensityAndPressure in DarkEnergyInterface cannot use these quantities. How do I solve the problem?
Previously I used to write a separate module like LambdaGeneral and call that in Init_background.
How do I keep the module intact and use it as an alternate fluid? Is it possible in the present file structure?
Thanks in advance.
Srijita
I want to evolve the background energy density using the background values grhoc, grhob etc.
BackgroundDensityAndPressure in DarkEnergyInterface cannot use these quantities. How do I solve the problem?
Previously I used to write a separate module like LambdaGeneral and call that in Init_background.
How do I keep the module intact and use it as an alternate fluid? Is it possible in the present file structure?
Thanks in advance.
Srijita
-
- Posts: 1951
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: Background modification for CAMB-1.1.3
Calculate and save what you need in the Init method, which is passed the current State. There's a complete non-trivial quintessence example (for early dark energy) at
https://github.com/cmbant/CAMB/blob/quintessence/fortran/DarkEnergyQuintessence.f90
https://github.com/cmbant/CAMB/blob/quintessence/fortran/DarkEnergyQuintessence.f90
-
- Posts: 32
- Joined: April 12 2019
- Affiliation: Indian Institute of Science Education and Research Kolkata
Re: Background modification for CAMB-1.1.3
Thanks a lot.
I missed this update.
I missed this update.
-
- Posts: 32
- Joined: April 12 2019
- Affiliation: Indian Institute of Science Education and Research Kolkata
Re: Background modification for CAMB-1.1.3
Hi
How can I use this CosmoMC May 2020?
.
What to do?
I must be very trivial and I must be missing something! Any help is appreciated.
How can I use this CosmoMC May 2020?
- changed the default 'ppf' to quintessence in subroutine CAMBCalc_ReadParams in Calculator_CAMB.f90
Code: Select all
this%dark_energy_model = Ini%Read_String_Default('dark_energy_model','quintessence')
- added use DarkEnergyQuintessence in subroutine CAMBCalc_InitCAMBParams in Calculator_CAMB.f90
- added in Calculator_CAMB.f90
Code: Select all
else if (this%dark_energy_model == 'quintessence') then if (allocated(P%DarkEnergy)) deallocate(P%DarkEnergy) allocate (TQuintessence::P%DarkEnergy)
Code: Select all
forrtl: severe (173): A pointer passed to DEALLOCATE points to an object that cannot be deallocated
What to do?
I must be very trivial and I must be missing something! Any help is appreciated.
-
- Posts: 1951
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: Background modification for CAMB-1.1.3
Not sure, but TQuintessence is intended to be an abstract base class - it does not actually implement a specific potential. The TEarlyQuintessence should be a working example, though I've not tested it with CosmoMC.
-
- Posts: 32
- Joined: April 12 2019
- Affiliation: Indian Institute of Science Education and Research Kolkata
Re: Background modification for CAMB-1.1.3
I added the potential and everything under TQuintessence. That is working fine in CAMB only. But used in CosmoMC, it gives segmentation error after
I did not add any new parameter, but I did not remove w and wa from params_CMB_defaults and CosmologyParametrizations.f90
I also added
subroutine CAMBCalc_CMBToCAMB to a/c for TQuintessence.
Cannot think of any other modifications.
Thanks
Code: Select all
27 parameters ( 6 slow ( 0 semi-slow), 21 fast ( 0 semi-fast))
starting Monte-Carlo
I also added
Code: Select all
class is (TDarkEnergyModel)
Cannot think of any other modifications.
Thanks
-
- Posts: 1951
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: Background modification for CAMB-1.1.3
Build and run cosmomc_debug and try to figure out where the error is coming from.
-
- Posts: 32
- Joined: April 12 2019
- Affiliation: Indian Institute of Science Education and Research Kolkata
Re: Background modification for CAMB-1.1.3
I did the cosmomc_debug and the errors are as follows:
Now I am at complete loss! I am attaching the log file as zipped txt.
I removed and from params_CMB_defaults and CosmologyParametrizations.f90
Code: Select all
[narayan@dirac CosmoMC2]$ ./cosmomc_debug test_planck.ini >new.log
forrtl: severe (173): A pointer passed to DEALLOCATE points to an object that cannot be deallocated
Image PC Routine Line Source
cosmomc_debug 0000000000CC3CEA Unknown Unknown Unknown
cosmomc_debug 000000000045AA94 generaltypes_mp_t 230 GeneralTypes.f90
cosmomc_debug 000000000045B13D generaltypes_mp_t 249 GeneralTypes.f90
cosmomc_debug 000000000050C34B montecarlo_mp_tme 303 MCMC.f90
cosmomc_debug 000000000050E733 montecarlo_mp_tfa 365 MCMC.f90
cosmomc_debug 0000000000507744 montecarlo_mp_tch 145 MCMC.f90
cosmomc_debug 0000000000561ED2 generalsetup_mp_t 139 GeneralSetup.f90
cosmomc_debug 000000000082C4C9 MAIN__ 270 driver.F90
cosmomc_debug 000000000041025E Unknown Unknown Unknown
libc-2.17.so 00007F974A8D1505 __libc_start_main Unknown Unknown
cosmomc_debug 0000000000410169 Unknown Unknown Unknown
Code: Select all
w_lam
Code: Select all
w0
-
- Posts: 1951
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: Background modification for CAMB-1.1.3
Is this with the latest master Cosmomc from github?
-
- Posts: 32
- Joined: April 12 2019
- Affiliation: Indian Institute of Science Education and Research Kolkata
Re: Background modification for CAMB-1.1.3
It is cosmomc May 2020, the update that came on 12/05/2020. Made cosmomc_debug in the CosmoMC master from github and the errors increased in number.
contains the error for minimization and MCMC.-
- Posts: 1951
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: Background modification for CAMB-1.1.3
Please try the latest master.
-
- Posts: 10
- Joined: February 13 2020
- Affiliation: MHRD
Re: Background modification for CAMB-1.1.3
Hi
How can I modify latest the version of CAMB with modechord. how can i write those modules which are not in both camb and modechord.
How can I modify latest the version of CAMB with modechord. how can i write those modules which are not in both camb and modechord.
Last edited by Saisandri Saini on June 05 2023, edited 3 times in total.
-
- Posts: 32
- Joined: April 12 2019
- Affiliation: Indian Institute of Science Education and Research Kolkata
Re: Background modification for CAMB-1.1.3
Latest master means
https://github.com/cmbant/CosmoMC? Released in June 29?
I did but did not help. I will try again.
-
- Posts: 32
- Joined: April 12 2019
- Affiliation: Indian Institute of Science Education and Research Kolkata
Re: Background modification for CAMB-1.1.3
I am not finding any luck here. But I have a general question.
I changed the declaration of w_lam and w from TDarkEnergyEqnOfState to TDarkEnergyModel in DarkEnergyInterface and that to
in source/Calculator_CAMB.f90 and the same errors came for fluid model (which was working pretty fine previosly). The parameters are read fine the ini file in batch3.
Why did that happen? Any reply would be helpful.
I changed the declaration of w_lam and w from TDarkEnergyEqnOfState to TDarkEnergyModel in DarkEnergyInterface and that
Code: Select all
select type(DE => P%DarkEnergy)
class is (TDarkEnergyEqnOfState)
DE%w_lam = CMB%w
DE%wa = CMB%wa
Code: Select all
select type(DE => P%DarkEnergy)
class is (TDarkEnergyModel)
DE%w_lam = CMB%w
DE%wa = CMB%wa
Why did that happen? Any reply would be helpful.