Error while compiling cosmomc with gfortran

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Lorenzo Faccioli
Posts: 1
Joined: June 13 2008
Affiliation: UC Berkeley

Error while compiling cosmomc with gfortran

Post by Lorenzo Faccioli » June 13 2008

Hello

I am trying to compile cosmomc with gfortran 4.1.2; I can run make fine in ./camb, but when I try to run make in ./source I get this error message:

In file Matrix_utils.F90:2206

sz = Size(Arr(1)%M,DIM=1)
1
Error: The upper bound in the last dimension must appear in the reference to the assumed size array 'arr' at (1).
In file Matrix_utils.F90:2226

if (MpiID==0) AM => Arr(i)
1
Error: The upper bound in the last dimension of the assumed_size array on the rhs of the pointer assignment at (1) must be set
make: *** [Matrix_utils.o] Error 1


The compile command from Makefile is:

gfortran -D__GFORTRAN__ -DMATRIX_SINGLE -O2 -I/usr/local/include -I/usr/local/src/likelihood_v3 -I../camb -c Matrix_utils.F90

WMAP_5 and fitsio have been installed without any problem.

Thanks a lot for your help

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

Re: Error while compiling cosmomc with gfortran

Post by Antony Lewis » June 13 2008

gfortran is supposed to have fixed this in the latest build, see report at
http://gcc.gnu.org/ml/gcc-patches/2008-03/msg00978.html

Or as a workaround change the declaration of the array (as for __GFORTRAN___ workaround in utils.f90).

Post Reply