Compiling Cosmomc with gfortran

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Post Reply
Akhilesh Nautiyal(akhi)
Posts: 63
Joined: June 13 2007
Affiliation: Malaviya National Institute of Technology Jaipur

Compiling Cosmomc with gfortran

Post by Akhilesh Nautiyal(akhi) » June 04 2019

I am trying to compile Cosmomc using gfortran. I have gfortran 7.4.0
Code:
" gfortran --version
GNU Fortran (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."

I am using mpich
Code:
"akhilesh@cosmoms:~$ which mpicc
/home/akhilesh/mpich-install/bin/mpicc"

When I am running make in cosmomc, I am getting the following error.

Code:
"akhilesh@cosmoms:~/cmbsofts/CosmoMC-master$ make all
cd ./source && make cosmomc BUILD=MPI
make[1]: Entering directory '/home/akhilesh/cmbsofts/CosmoMC-master/source'
mkdir -p ReleaseMPI
cd ../camb && \
make --file=Makefile_main libcamb OUTPUT_DIR=ReleaseMPI \
RECOMBINATION=recfast EQUATIONS=equations_ppf NONLINEAR=halofit_ppf
make[2]: Entering directory '/home/akhilesh/cmbsofts/CosmoMC-master/camb'
mkdir -p ReleaseMPI
mpif90 -cpp -O3 -ffast-math -ffree-line-length-none -fopenmp -fmax-errors=4 -march=native -DMPI -DCLIK -JReleaseMPI -IReleaseMPI/ -c constants.f90 -o ReleaseMPI/constants.o
/home/akhilesh/mpich-install/bin/mpif90: line 373: ifort: command not found
Makefile_main:129: recipe for target 'ReleaseMPI/constants.o' failed
make[2]: *** [ReleaseMPI/constants.o] Error 127
make[2]: Leaving directory '/home/akhilesh/cmbsofts/CosmoMC-master/camb'
Makefile:320: recipe for target 'camb' failed
make[1]: *** [camb] Error 2
make[1]: Leaving directory '/home/akhilesh/cmbsofts/CosmoMC-master/source'
Makefile:17: recipe for target 'cosmomc' failed
make: *** [cosmomc] Error 2 "

I have compiled cfitisio and planck 2015 likelihood with gfortran. I am unable to find out why my mpif90 is looking for ifort.

I will be grateful if you can kindly help me.

thanks
akhilesh

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

Re: Compiling Cosmomc with gfortran

Post by Antony Lewis » June 04 2019

That's more to do with your mpi configuration than CosmoMC. Some mpif90 implementations have an optional argument you can pass to specific which compiler to use.

Post Reply