CosmoMC test likelihod calculation problem with gfortran

 Posts: 29
 Joined: August 14 2016
 Affiliation: HarishChandra Research Institute
CosmoMC test likelihod calculation problem with gfortran
The test_planck.ini runs quite correctly with ifortran 14 on the cluster but I am getting the following error while running the code in Ubuntu 14.04 LTS (having gcc 6.1.0) on my desktop. Any help towards a solution will be greatly appreciated!
mpirun np 1 ./cosmomc test_planck.ini
Number of MPI processes: 1
file_root:test
Random seeds: 24407, 10194 rand_inst: 1
Using clik with likelihood file ./data/clik/hi_l/plik/plik_dx11dr2_HM_v18_TT.clik

clik version 723c1a4b0580
smica
Checking likelihood './data/clik/hi_l/plik/plik_dx11dr2_HM_v18_TT.clik' on test data. got 380.979 expected 380.979 (diff 8.6809e09)

TT from l=0 to l= 2508
Clik will run with the following nuisance parameters:
A_cib_217
cib_index
xi_sz_cib
A_sz
ps_A_100_100
ps_A_143_143
ps_A_143_217
ps_A_217_217
ksz_norm
gal545_A_100
gal545_A_143
gal545_A_143_217
gal545_A_217
calib_100T
calib_217T
A_planck
Using clik with likelihood file ./data/clik/low_l/bflike/lowl_SMW_70_dx11d_2014_10_03_v5c_Ap.clik
BFLike Ntemp = 2876
BFLike Nq = 1407
BFLike Nu = 1407
BFLike Nside = 16
BFLike Nwrite = 32393560
WARNING: camb_tau0.06_r0.00_Aprior.dat not found or not enough columns
using default values
info = 0

clik version 723c1a4b0580
bflike_smw
Checking likelihood './data/clik/low_l/bflike/lowl_SMW_70_dx11d_2014_10_03_v5c_Ap.clik' on test data. got 7899.49 expected 5247.87 (diff 2651.62)

TT from l=0 to l= 29
EE from l=0 to l= 29
BB from l=0 to l= 29
TE from l=0 to l= 29
Clik will run with the following nuisance parameters:
A_planck
Doing nonlinear Pk: F
Doing CMB lensing: T
Doing nonlinear lensing: T
TT lmax = 2508
EE lmax = 2500
ET lmax = 2500
BB lmax = 2500
PP lmax = 2500
lmax_computed_cl = 2508
Computing tensors: F
max_eta_k = 14000.0000
transfer kmax = 5.00000000
adding parameters for: lowl_SMW_70_dx11d_2014_10_03_v5c_Ap
adding parameters for: smica_g30_ftl_full_pp
adding parameters for: BKPlanck_detset_comb_dust
adding parameters for: plik_dx11dr2_HM_v18_TT
Fast divided into 1 blocks
23 parameters ( 9 slow ( 0 semislow), 14 fast ( 0 semifast))
Time for theory: 1.32788
Time for lowl_SMW_70_dx11d_2014_10_03_v5c_Ap: 2.4409822990000976
Time for smica_g30_ftl_full_pp: 1.2694500037468970E004
Time for BKPlanck_detset_comb_dust: 9.8964400058321189E004
Note: The following floatingpoint exceptions are signalling: Time for plik_dx11dr2_HM_v18_TT: 4.7428020006918814E003
loglike chisq
22.258 44.516 CMB: BKPLANCK = BKPlanck_detset_comb_dust
6.079 12.157 CMB: lensing = smica_g30_ftl_full_pp
581.392 1162.783 CMB: plik = plik_dx11dr2_HM_v18_TT
7900.861 15801.722 CMB: lowTEB = lowl_SMW_70_dx11d_2014_10_03_v5c_Ap
Test likelihoods done, total logLike, chieq = 8510.714 17021.428
Expected likelihoods, total logLike, chieq = 5859.141 11718.282
IEEE_UNDERFLOW_FLAG
ERROR STOP ** Likelihoods do not match **
Error termination. Backtrace:
#0 0x7f9311285f07 in ???
#1 0x7f9311286a45 in ???
#2 0x7f93112879c6 in ???
#3 0x48819c in ???
#4 0x5080f4 in ???
#5 0x40408c in ???
#6 0x7f931031ef44 in ???
#7 0x4040db in ???
#8 0xffffffffffffffff in ???

Primary job terminated normally, but 1 process returned
a nonzero exit code.. Per userdirection, the job has been aborted.


mpirun detected that one or more processes exited with nonzero status, thus causing
the job to be terminated. The first process to do so was:
Process name: [[40216,1],0]
Exit code: 1
mpirun np 1 ./cosmomc test_planck.ini
Number of MPI processes: 1
file_root:test
Random seeds: 24407, 10194 rand_inst: 1
Using clik with likelihood file ./data/clik/hi_l/plik/plik_dx11dr2_HM_v18_TT.clik

clik version 723c1a4b0580
smica
Checking likelihood './data/clik/hi_l/plik/plik_dx11dr2_HM_v18_TT.clik' on test data. got 380.979 expected 380.979 (diff 8.6809e09)

TT from l=0 to l= 2508
Clik will run with the following nuisance parameters:
A_cib_217
cib_index
xi_sz_cib
A_sz
ps_A_100_100
ps_A_143_143
ps_A_143_217
ps_A_217_217
ksz_norm
gal545_A_100
gal545_A_143
gal545_A_143_217
gal545_A_217
calib_100T
calib_217T
A_planck
Using clik with likelihood file ./data/clik/low_l/bflike/lowl_SMW_70_dx11d_2014_10_03_v5c_Ap.clik
BFLike Ntemp = 2876
BFLike Nq = 1407
BFLike Nu = 1407
BFLike Nside = 16
BFLike Nwrite = 32393560
WARNING: camb_tau0.06_r0.00_Aprior.dat not found or not enough columns
using default values
info = 0

clik version 723c1a4b0580
bflike_smw
Checking likelihood './data/clik/low_l/bflike/lowl_SMW_70_dx11d_2014_10_03_v5c_Ap.clik' on test data. got 7899.49 expected 5247.87 (diff 2651.62)

TT from l=0 to l= 29
EE from l=0 to l= 29
BB from l=0 to l= 29
TE from l=0 to l= 29
Clik will run with the following nuisance parameters:
A_planck
Doing nonlinear Pk: F
Doing CMB lensing: T
Doing nonlinear lensing: T
TT lmax = 2508
EE lmax = 2500
ET lmax = 2500
BB lmax = 2500
PP lmax = 2500
lmax_computed_cl = 2508
Computing tensors: F
max_eta_k = 14000.0000
transfer kmax = 5.00000000
adding parameters for: lowl_SMW_70_dx11d_2014_10_03_v5c_Ap
adding parameters for: smica_g30_ftl_full_pp
adding parameters for: BKPlanck_detset_comb_dust
adding parameters for: plik_dx11dr2_HM_v18_TT
Fast divided into 1 blocks
23 parameters ( 9 slow ( 0 semislow), 14 fast ( 0 semifast))
Time for theory: 1.32788
Time for lowl_SMW_70_dx11d_2014_10_03_v5c_Ap: 2.4409822990000976
Time for smica_g30_ftl_full_pp: 1.2694500037468970E004
Time for BKPlanck_detset_comb_dust: 9.8964400058321189E004
Note: The following floatingpoint exceptions are signalling: Time for plik_dx11dr2_HM_v18_TT: 4.7428020006918814E003
loglike chisq
22.258 44.516 CMB: BKPLANCK = BKPlanck_detset_comb_dust
6.079 12.157 CMB: lensing = smica_g30_ftl_full_pp
581.392 1162.783 CMB: plik = plik_dx11dr2_HM_v18_TT
7900.861 15801.722 CMB: lowTEB = lowl_SMW_70_dx11d_2014_10_03_v5c_Ap
Test likelihoods done, total logLike, chieq = 8510.714 17021.428
Expected likelihoods, total logLike, chieq = 5859.141 11718.282
IEEE_UNDERFLOW_FLAG
ERROR STOP ** Likelihoods do not match **
Error termination. Backtrace:
#0 0x7f9311285f07 in ???
#1 0x7f9311286a45 in ???
#2 0x7f93112879c6 in ???
#3 0x48819c in ???
#4 0x5080f4 in ???
#5 0x40408c in ???
#6 0x7f931031ef44 in ???
#7 0x4040db in ???
#8 0xffffffffffffffff in ???

Primary job terminated normally, but 1 process returned
a nonzero exit code.. Per userdirection, the job has been aborted.


mpirun detected that one or more processes exited with nonzero status, thus causing
the job to be terminated. The first process to do so was:
Process name: [[40216,1],0]
Exit code: 1

 Posts: 1534
 Joined: September 23 2004
 Affiliation: University of Sussex
 Contact:
Re: CosmoMC test likelihod calculation problem with gfortran
Looks like a problem with the lowL planck likelihood. You can tests on that first independent of cosmomc.

 Posts: 29
 Joined: August 14 2016
 Affiliation: HarishChandra Research Institute
CosmoMC test likelihod calculation problem with gfortran
The error went away after upgrading to Ubuntu 16.04 LTS and reinstalling everything. Weird. I am not sure if its a problem with the data. Possibly some error with gcc 6 in Ubuntu 14.04? It still shows the following: "Note: The following floatingpoint exceptions are signalling: IEEE_UNDERFLOW_FLAG" at the end of the output.

 Posts: 1534
 Joined: September 23 2004
 Affiliation: University of Sussex
 Contact:
Re: CosmoMC test likelihod calculation problem with gfortran
Underflow warnings are fairly normal.

 Posts: 1
 Joined: March 01 2017
 Affiliation: Perimeter Institute for Theoretical Physics
 Contact:
CosmoMC test likelihod calculation problem with gfortran
I encountered the same problem, and found the cause: There is an error in the Fortran code shipped with plc2.0 (http://irsa.ipac.caltech.edu/data/Planc ... 00.tar.bz2). There is an undefined variable leading to a read error that might (or might not) trigger, depending on random circumstances.
This patch solves the problem:
This patch solves the problem:
Code: Select all
 a/src/bflike/bflike_smw.f90
+++ b/src/bflike/bflike_smw.f90
@@ 1600,6 +1600,8 @@
ok = .false.
call fid%init()
+
+ unit = 3001
open(unit = unit,file=trim(filein),status='old',action='read',&
iostat=istat)