CosmoMC: segmentation fault occurred

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Kiyotomo Ichiki
Posts: 3
Joined: April 13 2016
Affiliation: Nagoya university

CosmoMC: segmentation fault occurred

Post by Kiyotomo Ichiki » April 13 2016

Dear Lewis and all,

Thank you very much for your maintenance of the code.
Recently I downloaded the latest version of cosmomc, compiled it with ifort 14.0.2.
The compilation was completed without errors, but I got "forrtl: severe (174):" when I run it.
I have no idea why I got this error message.

Below is the message I got with the debug compiler option. I would appreciate it if you could help.

Thank you very much,

Kiyotomo

> ./cosmomc_debug params_generic.ini
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
cosmomc_debug 0000000000C971D9 Unknown Unknown Unknown
cosmomc_debug 0000000000C95AAE Unknown Unknown Unknown
cosmomc_debug 0000000000C34E92 Unknown Unknown Unknown
cosmomc_debug 0000000000BCD0C8 Unknown Unknown Unknown
cosmomc_debug 0000000000BD5AFB Unknown Unknown Unknown
libpthread.so.0 00007F1C524F1870 Unknown Unknown Unknown
libpthread.so.0 00007F1C524F3198 Unknown Unknown Unknown
cosmomc_debug 0000000000BDFBCD Unknown Unknown Unknown
cosmomc_debug 0000000000BCC521 Unknown Unknown Unknown
cosmomc_debug 0000000000BFB917 Unknown Unknown Unknown
cosmomc_debug 0000000000BF90B3 Unknown Unknown Unknown
cosmomc_debug 000000000043031B fileutils_mp_read 755 FileUtils.f90
cosmomc_debug 00000000004312D8 fileutils_mp_read 784 FileUtils.f90
cosmomc_debug 00000000004DDDED iniobjects_mp_ini 462 IniObjects.f90
cosmomc_debug 000000000091C368 MAIN__ 65 driver.F90
cosmomc_debug 00000000004046A6 Unknown Unknown Unknown
libc.so.6 00007F1C51F57B05 Unknown Unknown Unknown
cosmomc_debug 0000000000404599 Unknown Unknown Unknown




if I remove -DMPI and -openmp options, I get this....

file_root:test
Random seeds: 23570, 4387 rand_inst: 0
Fast divided into 1 blocks
2 parameters
starting Monte-Carlo
forrtl: severe (408): fort: (7): Attempt to use pointer THEORY when it is not associated with a target

Image PC Routine Line Source
cosmomc_debug 00000000005AD25E generaltypes_mp_t 264 GeneralTypes.f90
cosmomc_debug 00000000006A207A samplecollector_m 101 SampleCollector.f90
cosmomc_debug 00000000006735C6 montecarlo_mp_tch 178 MCMC.f90
cosmomc_debug 00000000006773A7 montecarlo_mp_tme 290 MCMC.f90
cosmomc_debug 000000000067282F montecarlo_mp_tch 144 MCMC.f90
cosmomc_debug 00000000006B0043 generalsetup_mp_t 137 GeneralSetup.f90
cosmomc_debug 000000000090D67F MAIN__ 268 driver.F90
cosmomc_debug 0000000000403E76 Unknown Unknown Unknown
libc.so.6 00007F0CC6BCDB05 Unknown Unknown Unknown
cosmomc_debug 0000000000403D69 Unknown Unknown Unknown

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

Re: CosmoMC: segmentation fault occurred

Post by Antony Lewis » April 13 2016

I pushed a fix for the latter issue:

https://github.com/cmbant/cosmomc

Kiyotomo Ichiki
Posts: 3
Joined: April 13 2016
Affiliation: Nagoya university

CosmoMC: segmentation fault occurred

Post by Kiyotomo Ichiki » April 13 2016

Dear Lewis,

Thank you very much for your quick response. I see that the latter issue is resolved with your fix now.

It seems we are getting close to the cause of the problem. Compiling by "make cosmomc_debug" without -DMPI -openmp works fine, with -DMPI works fine as well, but with -openmp always fails printing "forrtl: severe (174):".

I looked into FileUtils.f90 around L755 as suggested by the error message, but I could not find any place that would lead the segmentation fault...

Any input from you will greatly help me. Thank you.

Kiyotomo

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

Re: CosmoMC: segmentation fault occurred

Post by Antony Lewis » April 13 2016

It runs OK for me with the same compiler version. It might be worth trying to update the compiler though (the other error doesn't happen on 14.0.3, but I fixed it anyway since it was strictly a code error).

Kiyotomo Ichiki
Posts: 3
Joined: April 13 2016
Affiliation: Nagoya university

Re: CosmoMC: segmentation fault occurred

Post by Kiyotomo Ichiki » April 14 2016

Thank you for the suggestion.

I have spent some time to make clear the first issue. I have re-installed a Linux and the intel compiler (14.0.2) into two computers (one is my laptop and the other is a desktop). My laptop writes the same error message posted above, but the desktop computer does not!

A simple openmp code runs OK in both the computers.... and I am getting stuck.

Anyway, I will try to update the compiler. Thank you very much!

Kiyotomo

Post Reply