Compiling WMAP

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Mario Acero
Posts: 28
Joined: November 15 2006
Affiliation: Universidad del Atlantico
Contact:

Compiling WMAP

Post by Mario Acero » January 16 2007

Hi all,

I would like not to make this question, because it is similar to one I have already made, but I cannot understant the problem I have now.
I want to install wmap_likelihoodcode_v2p2p2 on Linux, so I have modified the Makefile as follows:

Code: Select all

CFITSIO=/wrk04/acero/CosmoMC/cfitsio

#
#			Non-test object files.
#
OBJS = read_archive_map.o \
       read_fits.o \
       WMAP_3yr_options.o \
       WMAP_3yr_util.o \
       WMAP_3yr_tt_pixlike.o \
       WMAP_3yr_tt_beam_and_ptsrc_corr.o \
       WMAP_3yr_teeebb_pixlike.o \
       WMAP_3yr_likelihood.o
#
#			General Commands.
#
DIFF = diff -w
RM = rm -f

# See the CHANGES files for a description of these options
WMAPFLAGS = -DFASTERTT -DOPTIMIZE -DOPTIMIZE2 #-DTIMING

## SGI ProPack(Altix)/Intel -- gets the LAPACK functions from the system SCSL library.
F90    = ifort
FFLAGS = -O $(WMAPFLAGS) -g
INCS   = -I. -I$(CFITSIO)
#LIBS   = -L. -L$(CFITSIO)/lib -lcfitsio -lscs_mp
LIBS   = -L. -L$(CFITSIO) -lcfitsio -L/wrk04/acero/CosmoMC/lapack-3.1.0 -llapack_LINUX -lguide -lpthread -static

all: test

test: $(OBJS) test.o
	$(F90) $(FFLAGS) -o $@ $(OBJS) test.o $(LIBS)

check: test
	./test | tee output.log
	$(DIFF) output.log output.std

%.o: %.f90
	&#36;&#40;F90&#41; &#36;&#40;FFLAGS&#41; &#36;&#40;INCS&#41; -c -o &#36;@ &#36;<

%.o&#58; %.F90
	&#36;&#40;F90&#41; &#36;&#40;FFLAGS&#41; &#36;&#40;INCS&#41; -c -o &#36;@ &#36;<

clean&#58;
	&#36;&#40;RM&#41; *.o *.mod *.log *~

distclean&#58; clean
	&#36;&#40;RM&#41; test
Then, when I try to 'make' the test (using make), the following error message appears:
Multiple rules lines for `%.o'
Make: Don't know how to make read_archive_map.F90. Stop.
I think I have installed the required libraries, so I really don't understand.

Thanks for your comments and help,

MarioA.

Jason Dick
Posts: 11
Joined: November 08 2005
Affiliation: SISSA

Compiling WMAP

Post by Jason Dick » January 18 2007

It's a problem with the make rules. Try commenting out the lines:

Code: Select all

%.o&#58; %.F90
   &#36;&#40;F90&#41; &#36;&#40;FFLAGS&#41; &#36;&#40;INCS&#41; -c -o &#36;@ &#36;<
...so that you only have one rule to make the .o files.

Mario Acero
Posts: 28
Joined: November 15 2006
Affiliation: Universidad del Atlantico
Contact:

Compiling WMAP

Post by Mario Acero » January 18 2007

Well, I made a try with the suggestion given by Jason Dick.
However, it didn't work. The error message in that case is
f90 -O -DFASTERTT -DOPTIMIZE -DOPTIMIZE2 -g -I. -I/wrk04/acero/CosmoMC/cfitsio -c -o read_archive_map.o
f90 -O -DFASTERTT -DOPTIMIZE -DOPTIMIZE2 -g -I. -I/wrk04/acero/CosmoMC/cfitsio -c -o read_fits.o
Make: Don't know how to make WMAP_3yr_options.f90. Stop.
(The file 'WMAP_3yr_options.f90' doesn't exist, but there is the file 'WMAP_3yr_options.F90').
So, has someone another idea which could help me?

Thanks a lot,

MarioA.

Jason Dick
Posts: 11
Joined: November 08 2005
Affiliation: SISSA

Compiling WMAP

Post by Jason Dick » January 18 2007

Ah, rename the file so that it has a lower case f in the extension (and any others that have upper case f's).

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

Re: Compiling WMAP

Post by Antony Lewis » January 18 2007

Sometimes I think running "gmake" instead of "make" works.

Post Reply