WMAP9: test run problem

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
gongbo zhao
Posts: 73
Joined: January 04 2005
Affiliation: NAOC
Contact:

WMAP9: test run problem

Post by gongbo zhao » March 08 2013

Dear all,

I just installed WMAP9 and it compiled fine. But when I do the test run, I got this,


./test

WMAP 9-year likelihood test program
===================================

NOTE: This code uses a different CMB spectrum than previous versions.
The new spectrum(data/test_cls_v5.dat) is a better fit to the data
than the old one(data/test_cls_v4.dat).

As before, a constant offset is now being subtracted from ln(L).
The value of the offset is the sum of the determinant
contributions to ln(L) computed for the CMB spectrum in
data/test_cls_v5.dat, ln_det_C_f:

-2ln(L) = chi^2 + ln_det_C - ln_det_C_f

Reading in Cls from: data/test_cls_v5.dat
Initializing WMAP likelihood, version v5
------------------------------------------------------------
WMAP likelihood evaluation report:
no errors
------------------------------------------------------------
------------------------------------------------------------------
Breakdown of -2ln(L)
------------------------------------------------------------------
MASTER TTTT = 1203.545337 for 1170 ls
Beam/ptsrc TT correction = 0.735565
low-l TTTT chi2 = 2488.639737 for 2385 pixels
low-l TTTT det = 2286.017019
MASTER TETE chi2 = 815.433752 for 777 ls
MASTER TETE det = 3541.537184
TT/TE/EE/BB low-l chi2 = 1320.994614 for 1170 pixels
TT/TE/EE/BB low-l det = 692.874560
------------------------------------------------------------------
TOTAL -2ln(L) = 12349.777769
------------------------------------------------------------------
Expected -2ln(L) = 11068.324977
Difference = 1281.452792
------------------------------------------------------------------

Differences on the order of O(0.001) are normal between platforms.

I have no idea why the difference with the expected value is so huge. I compiled the previous WMAP data using the same flags on the same system and it was working fine. Anyone else has the same problem?

Here is the flags I used,

CFITSLIB=-lcfitsio

LAPACKDIR=/opt/gridware/compilers/intel/mkl/lib/intel64
LAPACLLIB= -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lpthread -liomp5

F90 = ifort
INCS = -I. -I[tex](CFITSIO)/include
LIBS = -L. -L[/tex](CFITSIO)/lib [tex](CFITSLIB) -L[/tex](LAPACKDIR) $(LAPACLLIB)


Many thanks,
Gongbo

Jason Dossett
Posts: 97
Joined: March 19 2010
Affiliation: The University of Texas at Dallas
Contact:

WMAP9: test run problem

Post by Jason Dossett » March 08 2013

Hi Gongbo,

Out of curiosity when did you download your likelihood_v5? I looks like it is actually just a typo in the test.F90 you have.

When I run my test program, I actually get the exact same likelihood values you do. It appears the difference is just in the reference values our test.F90's came with.

From the test.F90 I have:

Code: Select all

If (use_gibbs) Then
        expected_like_tot = 7557.9659905
    Else
#ifdef FASTERTT
        expected_like_tot = 8222.332496
#else
        expected_like_tot = 12349.777782d0
#endif
    End If

    Print '(A,F13.6)', "Expected -2ln(L)         = ", expected_like_tot
    Print '(A,F13.6)', "      Difference         = ", 2 * like_tot - expected_like_tot

It appears somehow yours must read:

Code: Select all

If (use_gibbs) Then
        expected_like_tot = 7557.9659905
    Else
#ifdef FASTERTT
        expected_like_tot = 8222.332496
#else
        expected_like_tot = 11068.324977d0
#endif
    End If

    Print '(A,F13.6)', "Expected -2ln(L)         = ", expected_like_tot
    Print '(A,F13.6)', "      Difference         = ", 2 * like_tot - expected_like_tot
I do not know how or why our two codes are different, but that appears to be the issue.


Best,
Jason

gongbo zhao
Posts: 73
Joined: January 04 2005
Affiliation: NAOC
Contact:

WMAP9: test run problem

Post by gongbo zhao » March 09 2013

Many thanks Jason. I downloaded it a while ago and as you said, it is a typo in the test code. In my version, it reads

Code: Select all

   If (use_gibbs) Then
        expected_like_tot = 7557.9659905
    Else
#ifdef FASTERTT
        !expected_like_tot = 8257.119952d0
        expected_like_tot = 8222.332496
#else
        expected_like_tot = 11068.324977d0
#endif
    End If

which is strange. I tried to switch the 'use_gibbs' on and I got the correct answer, see

Code: Select all

 Reading in Cls from: data/test_cls_v5.dat
 Initializing WMAP likelihood, version v5
 ------------------------------------------------------------
 WMAP likelihood evaluation report:
 no errors
 ------------------------------------------------------------
------------------------------------------------------------------
Breakdown of -2ln(L)
------------------------------------------------------------------
MASTER TTTT              =   1200.005224 for   1168 ls
Beam/ptsrc TT correction =      0.735565
low-l TTTT gibbs         =    -13.614869
MASTER TETE chi2         =    815.433752 for    777 ls
MASTER TETE det          =   3541.537184
TT/TE/EE/BB low-l chi2   =   1320.994614 for   1170 pixels
TT/TE/EE/BB low-l det    =    692.874560
------------------------------------------------------------------
TOTAL -2ln(L)            =   7557.966031
------------------------------------------------------------------
Expected -2ln(L)         =   7557.965820
      Difference         =      0.000210
------------------------------------------------------------------


In WMAP_9yr_options.F90, it says,

Code: Select all

! There are two options to choose from for evaluating the low-l temperature
    ! likelihood. Both options produce the same results.
    !
    ! (1) The direct evaluation of likelihood in pixel space using a resolution 4 temperature map.
    ! (2) The Gibbs sampling.
    ! 
    ! The option(2) is much faster to evaluate than the option(1).
    !
    ! To use(1), set "use_gibbs = .false." and "lowl_max = 30".
    ! To use(2), set "use_gibbs = .true." and "lowl_max = 32".
If I understand right, it says both options give equivalent result (although the \chi^2 is different) and option 2 is faster.

Cheers,
Gongbo[/code]

Jason Dossett
Posts: 97
Joined: March 19 2010
Affiliation: The University of Texas at Dallas
Contact:

WMAP9: test run problem

Post by Jason Dossett » March 09 2013

That is the way I read it too, that they both give the same results, just use_gibbs = .true. is faster.

Looking at the sample from your test code, it looks like you got a very early version of likelihood_v5 that still had some stuff from likelihood_v4 left in.

That 11068.324977d0 is exactly the value at that point in test.F90 from likelihood_v4.


Best
Jason

Post Reply