[CosmoMC] Make shows gfortran errors

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Post Reply
Mason Ng
Posts: 26
Joined: May 17 2017
Affiliation: The University of Auckland

[CosmoMC] Make shows gfortran errors

Post by Mason Ng » June 12 2017

I have successfully make'd CosmoMC on my desktop (Ubuntu). It was symbolically linked to the Planck likelihood as well. Previously, I got memory errors which prevented me from successfully running CosmoMC. I am now trying to get it working on a supercomputing cluster.

I am first trying to 'make' CosmoMC on the cluster build node -> I just 'scp'-ed cosmomc onto the cluster build node.

I have these modules loaded on the cluster environment:

Code: Select all

  1) ifort/2017.1.132-GCC-5.4.0                 14) ncurses/6.0-gimkl-2017a        27) Python/2.7.13-gimkl-2017a
  2) impi/2017.1.132-GCC-5.4.0-2.26             15) libreadline/6.3-gimkl-2017a    28) GCCcore/6.3.0
  3) gimpi/2017a                                16) XZ/5.2.3-gimkl-2017a           29) binutils/2.27-GCCcore-6.3.0
  4) imkl/2017.1.132-gimpi-2017a                17) libxml2/2.9.4-gimkl-2017a      30) numactl/2.0.10-GCC-4.9.2
  5) gimkl/2017a                                18) libxslt/1.1.29-gimkl-2017a     31) hwloc/1.10.0-GCC-4.9.2
  6) bzip2/1.0.6-gimkl-2017a                    19) LLVM/3.8.1-gimkl-2017a         32) OpenBLAS/0.2.13-GCC-4.9.2-LAPACK-3.5.0
  7) CUDA/8.0.61                                20) Szip/2.1-gimkl-2017a           33) gompi/2015a
  8) zlib/1.2.11-gimkl-2017a                    21) HDF5/1.8.18-gimkl-2017a        34) FFTW/3.3.4-gompi-2015a
  9) libpng/1.6.28-gimkl-2017a                  22) cURL/7.52.1-gimkl-2017a        35) ScaLAPACK/2.0.2-gompi-2015a-OpenBLAS-0.2.13-LAPACK-3.5.0
 10) freetype/2.7.1-gimkl-2017a                 23) netCDF/4.4.1-gimkl-2017a       36) foss/2015a
 11) GEOS/3.6.1-gimkl-2017a                     24) SQLite/3.16.2-gimkl-2017a      37) CFITSIO/3.39-foss-2015a
 12) libgpuarray/0.6.2-gimkl-2017a-CUDA-8.0.61  25) METIS/5.1.0-gimkl-2017a        38) GCC/6.3.0
 13) libjpeg-turbo/1.5.1-gimkl-2017a            26) SuiteSparse/4.5.4-gimkl-2017a  39) OpenMPI/2.0.2-GCC-6.3.0
When I try to do 'make' on ~/cosmomc, I get

Code: Select all

mkdir -p ReleaseMPI
cd ../camb && \
	make --file=Makefile_main libcamb OUTPUT_DIR=ReleaseMPI \
	RECOMBINATION=recfast EQUATIONS=equations_ppf NONLINEAR=halofit_ppf
make[1]: Entering directory `/gpfs1m/projects/uoa00518/cosmomc/camb'
mkdir -p ReleaseMPI
mpif90 -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -module ReleaseMPI -IReleaseMPI/ -c constants.f90 -o ReleaseMPI/constants.o
gfortran: error: unrecognized command line option ‘-mkl’
gfortran: error: unrecognized command line option ‘-no-prec-div’; did you mean ‘-fno-tree-dce’?
gfortran: error: unrecognized command line option ‘-fpp’; did you mean ‘-cpp’?
gfortran: error: unrecognized command line option ‘-qopenmp’; did you mean ‘-fopenmp’?
gfortran: error: unrecognized command line option ‘-module’; did you mean ‘-mhle’?
make[1]: *** [ReleaseMPI/constants.o] Error 1
make[1]: Leaving directory `/gpfs1m/projects/uoa00518/cosmomc/camb'
make: *** [camb] Error 2
and I'm not quite sure what it all means. It would be great if someone could point in the right direction! The paper 1409.1354v3 did not quite resolve my issues, from what I can see.

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

Re: [CosmoMC] Make shows gfortran errors

Post by Antony Lewis » June 12 2017

You may need to use mpif90 -f90=ifort or similar.

Mason Ng
Posts: 26
Joined: May 17 2017
Affiliation: The University of Auckland

Re: [CosmoMC] Make shows gfortran errors

Post by Mason Ng » June 12 2017

Antony Lewis wrote:You may need to use mpif90 -f90=ifort or similar.
Hi Antony, thanks for the reply. The relevant part of source/Makefile now looks like

Code: Select all

OUTPUT_DIR ?= Release

BUILD ?= MPI
#set BUILD to MPI to force MPI, should be set in ../Makefile

#MPIF90C ?= mpif90
MPIF90C ?= mpiifort

ifortErr = $(shell which ifort >/dev/null; echo $$?)

#these settings for ifort 14 and higher. Earlier versions will not work.
ifeq "$(ifortErr)" "0"
#ifort; Can remove -xHost if your cluster is not uniform, or specify specific processor optimizations -x...

#F90C     = ifort
mpif90 -f90=ifort
#use this if mpif90 is trying to use gfortran: MPIF90C = mpif90 -f90=ifort
but the output is

Code: Select all

cd ./source && make cosmomc BUILD=MPI
make[1]: Entering directory `/gpfs1m/projects/uoa00518/cosmomc/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 `/gpfs1m/projects/uoa00518/cosmomc/camb'
mkdir -p ReleaseMPI
mpiifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -module ReleaseMPI -IReleaseMPI/ -c constants.f90 -o ReleaseMPI/constants.o
gfortran: error: unrecognized command line option ‘-mkl’
gfortran: error: unrecognized command line option ‘-no-prec-div’; did you mean ‘-fno-tree-dce’?
gfortran: error: unrecognized command line option ‘-fpp’; did you mean ‘-cpp’?
gfortran: error: unrecognized command line option ‘-qopenmp’; did you mean ‘-fopenmp’?
gfortran: error: unrecognized command line option ‘-module’; did you mean ‘-mhle’?
make[2]: *** [ReleaseMPI/constants.o] Error 1
make[2]: Leaving directory `/gpfs1m/projects/uoa00518/cosmomc/camb'
make[1]: *** [camb] Error 2
make[1]: Leaving directory `/gpfs1m/projects/uoa00518/cosmomc/source'
make: *** [cosmomc] Error 2
unfortunately..

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

Re: [CosmoMC] Make shows gfortran errors

Post by Antony Lewis » June 12 2017

Looks like a local configuration problem, presumably mpiifort is not supposed to be calling gfortran.

Mason Ng
Posts: 26
Joined: May 17 2017
Affiliation: The University of Auckland

Re: [CosmoMC] Make shows gfortran errors

Post by Mason Ng » June 15 2017

Antony Lewis wrote:Looks like a local configuration problem, presumably mpiifort is not supposed to be calling gfortran.
That sounds right. I took this up with the cluster technical support team and it boiled down to loading the right modules/environments for CosmoMC to run it. Thanks!

Jaykumar Patel
Posts: 4
Joined: September 25 2017
Affiliation: U of A

[CosmoMC] Make shows gfortran errors

Post by Jaykumar Patel » November 05 2017

Mason Ng

How did you end up solving this issue I am having have issue.

Code: Select all

cd ./source && make cosmomc BUILD=MPI
make[1]: Entering directory '/home/jay/Desktop/Phys_499/CosmoMC/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/jay/Desktop/Phys_499/CosmoMC/camb'
mkdir -p ReleaseMPI
mpif90 -mkl -openmp -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -module ReleaseMPI -IReleaseMPI/ -c constants.f90 -o ReleaseMPI/constants.o
gfortran: error: unrecognized command line option ‘-mkl’
gfortran: error: unrecognized command line option ‘-no-prec-div’
gfortran: error: unrecognized command line option ‘-fpp’
gfortran: error: unrecognized command line option ‘-qopenmp’
gfortran: error: unrecognized command line option ‘-module’
Makefile_main:138: recipe for target 'ReleaseMPI/constants.o' failed
make[2]: *** [ReleaseMPI/constants.o] Error 1
make[2]: Leaving directory '/home/jay/Desktop/Phys_499/CosmoMC/camb'
Makefile:320: recipe for target 'camb' failed
make[1]: *** [camb] Error 2

Nishanth Sasankan
Posts: 27
Joined: September 07 2016
Affiliation: university of notre dame

[CosmoMC] Make shows gfortran errors

Post by Nishanth Sasankan » November 06 2017

if your cluster has access to multiple compilers , play around with only loading the necessary ones. I usually "make " with gcc/6.2.0 and mpich/3.2-gcc-6.2.0 only. Sometimes i only use intel/17.1 and ompi/2.1.1-intel-17.1 . Most of the time these fixes my compile time issues.

Post Reply