CosmoCoffee Forum Index CosmoCoffee

 
 FAQFAQ   SearchSearch  MemberlistSmartFeed   MemberlistMemberlist    RegisterRegister 
   ProfileProfile   Log inLog in 
Arxiv New Filter | Bookmarks & clubs | Arxiv ref/author:

CABM_Make_error_in ubuntu 14.04
 
Post new topic   Reply to topic    CosmoCoffee Forum Index -> Computers and software
View previous topic :: View next topic  
Author Message
Vipin V



Joined: 10 Sep 2015
Posts: 4
Affiliation: IISER BHOPAL

PostPosted: September 11 2015  Reply with quote

I am a beginner in CAMB.I am using Ubuntu 14.04 lts. While installing CAMB using terminal,when I gave make command it shows errors

Code:

root@WorkStation:/home/vipin/Softwares/camb# make
mkdir -p Release
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c constants.f90 -o Release/constants.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c utils.F90 -o Release/utils.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c subroutines.f90 -o Release/subroutines.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c inifile.f90 -o Release/inifile.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c power_tilt.f90 -o Release/power_tilt.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c recfast.f90 -o Release/recfast.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c reionization.f90 -o Release/reionization.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c modules.f90 -o Release/modules.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c bessels.f90 -o Release/bessels.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c equations.f90 -o Release/equations.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c halofit_ppf.f90 -o Release/halofit_ppf.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c lensing.f90 -o Release/lensing.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c SeparableBispectrum.F90 -o Release/SeparableBispectrum.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c cmbmain.f90 -o Release/cmbmain.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c camb.f90 -o Release/camb.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ Release/constants.o  Release/utils.o   Release/subroutines.o Release/inifile.o  Release/power_tilt.o  Release/recfast.o Release/reionization.o Release/modules.o Release/bessels.o Release/equations.o Release/halofit_ppf.o Release/lensing.o Release/SeparableBispectrum.o Release/cmbmain.o Release/camb.o inidriver.F90 -lstdc++ -o camb
/usr/bin/ld: cannot find -lstdc++
collect2: error: ld returned 1 exit status
make: *** [camb] Error 1


What editing should I do In the make file
Back to top
View user's profile   Visit poster's website
Antony Lewis



Joined: 23 Sep 2004
Posts: 1278
Affiliation: University of Sussex

PostPosted: September 11 2015  Reply with quote

Just delete stdc++ thing, it's not needed for standard install.
Back to top
View user's profile [ Hidden ] Visit poster's website
Vipin V



Joined: 10 Sep 2015
Posts: 4
Affiliation: IISER BHOPAL

PostPosted: September 11 2015  Reply with quote

I tried deleting
Code:
F90CRLINK = -cxxlib

and
Code:

F90CRLINK = -cxxlib
MODOUT = -module $(OUTPUT_DIR)
ifneq ($(FISHER),)
FFLAGS += -mkl

Seperately
each time it is showing some error
Code:

root@WorkStation:/home/vipin/Softwares/camb# make
Makefile:29: *** extraneous `endif'.  Stop.



Here is the entire make file code
Code:

#CAMB Makefile

#Set FISHER=Y to compile bispectrum fisher matrix code
FISHER=

#Will detect ifort/gfortran or edit for your compiler
ifortErr = $(shell which ifort >/dev/null; echo $$?)
ifeq "$(ifortErr)" "0"

#Intel compiler
F90C     = ifort
FFLAGS = -openmp -fast -W0 -WB -fpp2 -vec_report0
DEBUGFLAGS =-openmp -g -check all -check noarg_temp_created -traceback -fpp -fpe0
## This is flag is passed to the Fortran compiler allowing it to link C++ if required (not usually):
F90CRLINK = -cxxlib
MODOUT = -module $(OUTPUT_DIR)
ifneq ($(FISHER),)
FFLAGS += -mkl
endif

else
gfortErr = $(shell which gfortran >/dev/null; echo $$?)
ifeq "$(gfortErr)" "0"

#Gfortran compiler:
#The options here work in v4.6+
F90C     = gfortran
FFLAGS =  -O3 -fopenmp -ffast-math -fmax-errors=4
DEBUGFLAGS = -cpp -g -fbounds-check -fbacktrace -ffree-line-length-none -fmax-errors=4 -ffpe-trap=invalid,overflow,zero
MODOUT =  -J$(OUTPUT_DIR)

ifneq ($(shell uname -s),Darwin)
#native optimization does not work on Mac
FFLAGS+=-march=native
endif
endif
endif

IFLAG = -I

#G95 compiler
#F90C   = g95
#FFLAGS = -O2

#SGI, -mp toggles multi-processor. Use -O2 if -Ofast gives problems.
#F90C     = f90
#FFLAGS  = -Ofast -mp

#Digital/Compaq fortran, -omp toggles multi-processor
#F90C    = f90
#FFLAGS  = -omp -O4 -arch host -math_library fast -tune host -fpe1

#Absoft ProFortran, single processor:
#F90C     = f95
#FFLAGS = -O2 -cpu:athlon -s -lU77 -w -YEXT_NAMES="LCS" -YEXT_SFX="_"

#NAGF95, single processor:
#F90C     = f95
#FFLAGS = -DNAGF95 -O3

#PGF90
#F90C = pgf90
#FFLAGS = -O2 -DESCAPEBACKSLASH -Mpreprocess

#Sun V880
#F90C = mpf90
#FFLAGS =  -O4 -openmp -ftrap=%none -dalign

#Sun parallel enterprise:
#F90C     = f95
#FFLAGS =  -O2 -xarch=native64 -openmp -ftrap=%none
#try removing -openmp if get bus errors. -03, -04 etc are dodgy.

#IBM XL Fortran, multi-processor (run gmake)
#F90C     = xlf90_r
#FFLAGS  = -DESCAPEBACKSLASH -DIBMXL -qsmp=omp -qsuffix=f=f90:cpp=F90 -O3 -qstrict -qarch=pwr3 -qtune=pwr3

#Settings for building camb_fits
#Location of FITSIO and name of library
FITSDIR       ?= /usr/local/lib
FITSLIB       = cfitsio
#Location of HEALPIX for building camb_fits
HEALPIXDIR    ?= /usr/local/healpix

ifneq ($(FISHER),)
FFLAGS += -DFISHER
EXTCAMBFILES = Matrix_utils.o
else
EXTCAMBFILES =
endif

DEBUGFLAGS ?= FFLAGS
Debug: FFLAGS=$(DEBUGFLAGS)

include ./Makefile_main
Back to top
View user's profile   Visit poster's website
Antony Lewis



Joined: 23 Sep 2004
Posts: 1278
Affiliation: University of Sussex

PostPosted: September 12 2015  Reply with quote

Just
Code:
F90CRLINK =
Back to top
View user's profile [ Hidden ] Visit poster's website
Vipin V



Joined: 10 Sep 2015
Posts: 4
Affiliation: IISER BHOPAL

PostPosted: September 14 2015  Reply with quote

It is still swowing the same errors.


Code:

root@WorkStation:/home/vipin/Softwares/camb# make
mkdir -p Release
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c constants.f90 -o Release/constants.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c utils.F90 -o Release/utils.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c subroutines.f90 -o Release/subroutines.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c inifile.f90 -o Release/inifile.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c power_tilt.f90 -o Release/power_tilt.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c recfast.f90 -o Release/recfast.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c reionization.f90 -o Release/reionization.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c modules.f90 -o Release/modules.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c bessels.f90 -o Release/bessels.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c equations.f90 -o Release/equations.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c halofit_ppf.f90 -o Release/halofit_ppf.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c lensing.f90 -o Release/lensing.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c SeparableBispectrum.F90 -o Release/SeparableBispectrum.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c cmbmain.f90 -o Release/cmbmain.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ -c camb.f90 -o Release/camb.o
gfortran -O3 -fopenmp -ffast-math -fmax-errors=4 -march=native -JRelease -IRelease/ Release/constants.o  Release/utils.o   Release/subroutines.o Release/inifile.o  Release/power_tilt.o  Release/recfast.o Release/reionization.o Release/modules.o Release/bessels.o Release/equations.o Release/halofit_ppf.o Release/lensing.o Release/SeparableBispectrum.o Release/cmbmain.o Release/camb.o inidriver.F90 -lstdc++ -o camb
/usr/bin/ld: cannot find -lstdc++
collect2: error: ld returned 1 exit status
make: *** [camb] Error 1


Is there any other softwares required to run CAMB.
Why is it showing openmp error?
Back to top
View user's profile   Visit poster's website
Vipin V



Joined: 10 Sep 2015
Posts: 4
Affiliation: IISER BHOPAL

PostPosted: September 25 2015  Reply with quote

I found out the solution thank you for your support
Back to top
View user's profile   Visit poster's website
R Purnalingam



Joined: 03 Mar 2017
Posts: 19
Affiliation: IIT KANPUR

PostPosted: April 11 2017  Reply with quote

what is the solution?
Back to top
View user's profile [ Hidden ] Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    CosmoCoffee Forum Index -> Computers and software All times are GMT + 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group. Sponsored by WordWeb online dictionary and dictionary software.