CAMB:compile with gfortran for mac

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Andrea Maselli
Posts: 7
Joined: September 27 2008
Affiliation: Università La Sapienza

CAMB:compile with gfortran for mac

Post by Andrea Maselli » September 28 2008

Hi,
i'm an undergraduate student who has to work with cosmomc for his final work. I have to say it's the first time i work with fortran and i found some probems in compiling camb. The situation is the following:

-Macbook intel with macosx tiger
-gfortran compiler for mac
-I've set the makefile in camb directory as asked from my sistem profyle
-When i run "make" i draw the following problems:


gfc -O2 -c utils.F90
In file utils.F90:862

Temp%p => Arr(I)%p
1
Error: The upper bound in the last dimension must appear in the reference to the assumed size array 'arr' at (1).
In file utils.F90:863

Arr(I)%p => Arr(J)%p
1
Error: The upper bound in the last dimension must appear in the reference to the assumed size array 'arr' at (1).
In file utils.F90:863

Arr(I)%p => Arr(J)%p
1
Error: The upper bound in the last dimension must appear in the reference to the assumed size array 'arr' at (1).
In file utils.F90:864

Arr(J)%p => Temp%p
1
Error: The upper bound in the last dimension must appear in the reference to the assumed size array 'arr' at (1).
In file utils.F90:814

Temp%p => Arr(I)%p
1
Error: The upper bound in the last dimension must appear in the reference to the assumed size array 'arr' at (1).
In file utils.F90:815

Arr(I)%p => Arr(J)%p
1
Error: The upper bound in the last dimension must appear in the reference to the assumed size array 'arr' at (1).
In file utils.F90:815

Arr(I)%p => Arr(J)%p
1
Error: The upper bound in the last dimension must appear in the reference to the assumed size array 'arr' at (1).
In file utils.F90:816

Arr(J)%p => Temp%p
1
Error: The upper bound in the last dimension must appear in the reference to the assumed size array 'arr' at (1).
In file utils.F90:882

use Lists
1
Fatal Error: Can't open module file 'lists.mod' for reading at (1): No such file or directory
make: *** [utils.o] Error 1

I don't know where is the mistake, could you please help me in finding it?
Thanks for your attention
Andrea Maselli

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

Re: CAMB:compile with gfortran for mac

Post by Antony Lewis » September 28 2008

This is bug in gfortran - check you've got the latest version.

Andrea Maselli
Posts: 7
Joined: September 27 2008
Affiliation: Università La Sapienza

CAMB:compile with gfortran for mac

Post by Andrea Maselli » September 29 2008

I've downloaded a new version of gfortran but now there is another problem; the result is:

gfc -O2 -c utils.F90
/var/tmp//cc5VaMVR.s:3345:operands given don't match any known 386 instruction
/var/tmp//cc5VaMVR.s:3496:operands given don't match any known 386 instruction
/var/tmp//cc5VaMVR.s:4273:operands given don't match any known 386 instruction
/var/tmp//cc5VaMVR.s:4351:operands given don't match any known 386 instruction
/var/tmp//cc5VaMVR.s:6723:operands given don't match any known 386 instruction
/var/tmp//cc5VaMVR.s:10028:operands given don't match any known 386 instruction
make: *** [utils.o] Error 1


Thanks for the patience Andrea Maselli

Ivan Debono
Posts: 25
Joined: April 17 2007
Affiliation: APC, Paris 7 / OBSPM

CAMB:compile with gfortran for mac

Post by Ivan Debono » September 29 2008

I'm also having problems compiling the latest version of CAMB. In my case I get the following:
-----------------
In file subroutines.f90:7

use Precision
1
Fatal Error: Can't open module file 'precision.mod' at (1) for reading: No such file or directory
make: *** [subroutines.o] Error 1
---------------------

I'm using g95 as a compiler.

Ivan Debono
Posts: 25
Joined: April 17 2007
Affiliation: APC, Paris 7 / OBSPM

CAMB:compile with gfortran for mac

Post by Ivan Debono » September 29 2008

Hmm, I've just re-downloaded CAMB and it compiled without a hitch.

Alexandra Abate
Posts: 2
Joined: January 25 2005
Affiliation: UArizona

CAMB:compile with gfortran for mac

Post by Alexandra Abate » September 16 2011

It was because when re-downloading you removed all files created during the build process - typing make clean should have worked too.

Post Reply