CAMB and g95 on Powerbook

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Post Reply
David Parkinson
Posts: 23
Joined: January 19 2005
Affiliation: KASI
Contact:

CAMB and g95 on Powerbook

Post by David Parkinson » January 19 2005

Hi,

Has anyone managed to compile CAMB (and cosmomc) using the new g95 compiler on a Apple POWERBOOK G4. When I tried it, I got the following error message while compiling recfast

g95 -O2 -c recfast.f90
recfast.f90: In function `recfast_MP_initrecfast_':
recfast.f90:435: error: unrecognizable insn:
(insn:HI 1005 1141 1007 15 (set (reg/f:SI 721)
(plus:SI (reg/f:SI 722)
(const_int 4294967288 [0xfffffff8]))) -1 (insn_list 1141 (nil))
(expr_list:REG_DEAD (reg/f:SI 722)
(expr_list:REG_EQUAL (const:SI (plus:SI (symbol_ref:SI ("recfast_MP_zrec.data") [flags 0x182] <var_decl 0x40c320f8 recfast_MP_zrec.data>)
(const_int 4294967288 [0xfffffff8])))
(nil))))

David

Ben Gold
Posts: 81
Joined: September 25 2004
Affiliation: University of Minnesota
Contact:

CAMB and g95 on Powerbook

Post by Ben Gold » January 20 2005

What version of g95 are you using?

I have:

G95 (GCC 3.5.0 20040814 (experimental) (g95!) 10/08/04)

on my PowerBook and CAMB compiles just fine for me. You could try turning off optimization, but I just checked and it compiles either way for me.

David Parkinson
Posts: 23
Joined: January 19 2005
Affiliation: KASI
Contact:

CAMB and g95 on Powerbook

Post by David Parkinson » January 24 2005

I am using the binaries downloaded from:

g95.sourceforge.net.

I tried turning off the optimisation, and recfast did then sucessfully compile. However, that time modules.f90 failed to compile with a similar message.

Anze Slosar
Posts: 183
Joined: September 24 2004
Affiliation: Brookhaven National Laboratory
Contact:

Re: CAMB and g95 on Powerbook

Post by Anze Slosar » January 24 2005

David Parkinson wrote:I tried turning off the optimisation, and recfast did then sucessfully compile. However, that time modules.f90 failed to compile with a similar message.
Ok, I know it is completelly obvious, but I wasted my time several times on this: every time you change compiler options and stuff like that you should make clean first... It often helps get rid of dodgy compiler complaints or unexpected crashes. This is because all the auxiliary files f90 makes need updating even if .o is unchanged...

Ben Gold
Posts: 81
Joined: September 25 2004
Affiliation: University of Minnesota
Contact:

Re: CAMB and g95 on Powerbook

Post by Ben Gold » January 25 2005

David Parkinson wrote:I am using the binaries downloaded from:

g95.sourceforge.net.

I tried turning off the optimisation, and recfast did then sucessfully compile. However, that time modules.f90 failed to compile with a similar message.
I also downloaded g95 from there, but my version is probably older. You can find the exact version by looking at the first line output when you type "g95 --version". Have you edited CAMB's Makefile at all? I used the following compiler flags:

F90C = /tmp/g95/bin/powerpc-apple-darwin6.8-g95
FFLAGS = -O2

The first one is just where I put the actual g95 executable. I didn't use any other flags than these, and CAMB compiled and ran OK. You could try starting over from a fresh CAMB, and removing all the compiler flags (even turn optimization off) from the Makefile. If it still doesn't work, then it must be a bug in the new version of g95 itself and you probably should email the author and see if you can get a hold of a previous version to use in the meantime.

Post Reply