cannot compile the latest versions of CosmoMC with WMAP9 likelihood

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Xin Wang
Posts: 43
Joined: January 11 2012
Affiliation: NAOC/NJU

cannot compile the latest versions of CosmoMC with WMAP9 lik

Post by Xin Wang » April 30 2013

Hi, Antony,

Using the intel fortran compiler (version 2013.2.146), I can successfully compile WMAP 9yr likelihood test program and previous versions of CosmoMC, say Oct12 version and before. However when compiling the latest two versions (March&April 2013) with WMAP9 (using exactly the same files and settings), the following error messages always occur,

Code: Select all

/home/albert/local/wmap_likelihood_v5/libwmap9.a(read_archive_map.o): In function `read_archive_map_':
read_archive_map.f90:(.text+0x35): undefined reference to `ftgiou_'
read_archive_map.f90:(.text+0x63): undefined reference to `ftopen_'
read_archive_map.f90:(.text+0x95): undefined reference to `ftmahd_'
read_archive_map.f90:(.text+0x128): undefined reference to `ftgnrw_'
read_archive_map.f90:(.text+0x2cd): undefined reference to `ftgcve_'
read_archive_map.f90:(.text+0x5e0): undefined reference to `ftgcve_'
read_archive_map.f90:(.text+0x786): undefined reference to `ftclos_'
read_archive_map.f90:(.text+0x7a1): undefined reference to `ftfiou_'
/home/albert/local/wmap_likelihood_v5/libwmap9.a(read_fits.o): In function `read_fits_real_2d_':
read_fits.f90:(.text+0x43): undefined reference to `ftgiou_'
read_fits.f90:(.text+0x71): undefined reference to `ftopen_'
read_fits.f90:(.text+0x8a): undefined reference to `ftgidm_'
read_fits.f90:(.text+0x16e): undefined reference to `ftgkyj_'
read_fits.f90:(.text+0x1a8): undefined reference to `ftgkyj_'
read_fits.f90:(.text+0x8a9): undefined reference to `ftgpve_'
read_fits.f90:(.text+0xa4b): undefined reference to `ftclos_'
read_fits.f90:(.text+0xa66): undefined reference to `ftfiou_'
/home/albert/local/wmap_likelihood_v5/libwmap9.a(read_fits.o): In function `read_fits_double_2d_':
read_fits.f90:(.text+0xc53): undefined reference to `ftgiou_'
read_fits.f90:(.text+0xc81): undefined reference to `ftopen_'
read_fits.f90:(.text+0xc9a): undefined reference to `ftgidm_'
read_fits.f90:(.text+0xd7e): undefined reference to `ftgkyj_'
read_fits.f90:(.text+0xdb8): undefined reference to `ftgkyj_'
read_fits.f90:(.text+0x1526): undefined reference to `ftgpvd_'
read_fits.f90:(.text+0x16c6): undefined reference to `ftclos_'
read_fits.f90:(.text+0x16e1): undefined reference to `ftfiou_'
/home/albert/local/wmap_likelihood_v5/libwmap9.a(read_fits.o): In function `read_fits_real_3d_':
read_fits.f90:(.text+0x1d63): undefined reference to `ftgiou_'
read_fits.f90:(.text+0x1d91): undefined reference to `ftopen_'
read_fits.f90:(.text+0x1daa): undefined reference to `ftgidm_'
read_fits.f90:(.text+0x1e9d): undefined reference to `ftgkyj_'
read_fits.f90:(.text+0x1ed7): undefined reference to `ftgkyj_'
read_fits.f90:(.text+0x1f11): undefined reference to `ftgkyj_'
read_fits.f90:(.text+0x2b37): undefined reference to `ftgpve_'
read_fits.f90:(.text+0x2d5a): undefined reference to `ftclos_'
read_fits.f90:(.text+0x2d75): undefined reference to `ftfiou_'
/home/albert/local/wmap_likelihood_v5/libwmap9.a(read_fits.o): In function `read_fits_complex_2d_lm_':
read_fits.f90:(.text+0x314d): undefined reference to `ftgiou_'
read_fits.f90:(.text+0x316c): undefined reference to `ftopen_'
read_fits.f90:(.text+0x317b): undefined reference to `ftgidm_'
read_fits.f90:(.text+0x321d): undefined reference to `ftgkyj_'
read_fits.f90:(.text+0x323b): undefined reference to `ftgkyj_'
read_fits.f90:(.text+0x3449): undefined reference to `ftgpve_'
read_fits.f90:(.text+0x34c7): undefined reference to `ftclos_'
read_fits.f90:(.text+0x34dc): undefined reference to `ftfiou_'
/home/albert/local/wmap_likelihood_v5/libwmap9.a(br_mod_dist.o): In function `br_mod_dist_mp_read_gibbs_chain_':
br_mod_dist.f90:(.text+0x164a): undefined reference to `ftopen_'
br_mod_dist.f90:(.text+0x1698): undefined reference to `ftgkyj_'
br_mod_dist.f90:(.text+0x16d2): undefined reference to `ftgkyj_'
br_mod_dist.f90:(.text+0x170c): undefined reference to `ftgkyj_'
br_mod_dist.f90:(.text+0x1749): undefined reference to `ftgkyj_'
br_mod_dist.f90:(.text+0x196b): undefined reference to `ftgpve_'
br_mod_dist.f90:(.text+0x1995): undefined reference to `ftclos_'
make[1]: *** [cosmomc] Error 1
Could you provide some comments? Thanks very much!

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

Re: cannot compile the latest versions of CosmoMC with WMAP9

Post by Antony Lewis » April 30 2013

Probably just missing/wrong Makefile definition of cfitsio location?

Xin Wang
Posts: 43
Joined: January 11 2012
Affiliation: NAOC/NJU

Re: cannot compile the latest versions of CosmoMC with WMAP9

Post by Xin Wang » May 01 2013

I'm pretty sure I set the route parameter to cfitsio (version 3.34) correctly in Makefile, otherwise previous versions of Cosmomc cannot be successfully compiled. Yet it seems that I cannot obtain libcfitsio.so in /cfitsio/lib, following the standard procedures of installation given in cfitsio's README. Do you think that's the key and how to fix it?

Thanks a great deal!

PS, I use 32-bit Ubuntu 12.04 LTS OS
Antony Lewis wrote:Probably just missing/wrong Makefile definition of cfitsio location?

Sheng Li
Posts: 57
Joined: May 26 2009
Affiliation: University of Sussex
Contact:

cannot compile the latest versions of CosmoMC with WMAP9 lik

Post by Sheng Li » May 04 2013

That is really 00000dddd...

But I guess there are some options you might consider to try either or some:

1): CD to your cfitsio directory and find if libcfitsio.a exist. If not, try to recompile cfitsio;
for this case, I strongly expect that there will be no file named libcfitsio.so if you compiled the cfitsio package from http://heasarc.gsfc.nasa.gov/fitsio/.

2): Are you certain that your Makefile or shell environment claimed the correct, in this case, the latest version of ifort, since its deployment?
Try:

Code: Select all

ifort --version
or

Code: Select all

ifort -V
to reveal this answer.

3): Naively guess: when your compiling, some unexpected errors incurred on the file system --- (it is not usually happened but a possibility.)
if it was this case, you have no choice but reboot your OS or wait for the maintenance of the FS (or NFS if necessary).

4): suggestion: make clean && make is suggested to use at any case, and particularly if your local file/packages is/are updated.

5): If all above are tried but no-go, you may unload your Makefile specifically for your WMAP9.
Since you said the recent package (wmap9 + cosmomc) cannot be made through, I expect to see there is nothing wrong in your Makefile. But, for exploring any bug or blind mistake, it is always helpful for other ppl to give your comment or help if the configuration file is presented.

Xin Wang
Posts: 43
Joined: January 11 2012
Affiliation: NAOC/NJU

Re: cannot compile the latest versions of CosmoMC with WMAP9

Post by Xin Wang » May 05 2013

Hi, Sheng,

Thank you very much for this detailed and thoughtful assistance! I should've posted earlier that my problem was solved by specifying the command of make shared rather than make itself to create the shared library file libcfitsio.so; I was unfortunately misled by README. After adding the relative directory to some certain EV, I can compile every version of CosmoMC with WMAP (and Planck as well). Anyway I'll note your suggestions whenever coming across similar problems in the future.

Again, greatly acknowledge your sharing and help to me, as well as to this whole community!
Sheng Li wrote:That is really 00000dddd...

But I guess there are some options you might consider to try either or some:

1): CD to your cfitsio directory and find if libcfitsio.a exist. If not, try to recompile cfitsio;
for this case, I strongly expect that there will be no file named libcfitsio.so if you compiled the cfitsio package from http://heasarc.gsfc.nasa.gov/fitsio/.

2): Are you certain that your Makefile or shell environment claimed the correct, in this case, the latest version of ifort, since its deployment?
Try:

Code: Select all

ifort --version
or

Code: Select all

ifort -V
to reveal this answer.

3): Naively guess: when your compiling, some unexpected errors incurred on the file system --- (it is not usually happened but a possibility.)
if it was this case, you have no choice but reboot your OS or wait for the maintenance of the FS (or NFS if necessary).

4): suggestion: make clean && make is suggested to use at any case, and particularly if your local file/packages is/are updated.

5): If all above are tried but no-go, you may unload your Makefile specifically for your WMAP9.
Since you said the recent package (wmap9 + cosmomc) cannot be made through, I expect to see there is nothing wrong in your Makefile. But, for exploring any bug or blind mistake, it is always helpful for other ppl to give your comment or help if the configuration file is presented.

Post Reply