Compiling the Fortran command-line

Announcements, suggestions for new forums, ideas, etc.
Jose Lozano
Posts: 11
Joined: June 27 2023
Affiliation: Universidad Nacional Autónoma de México

Compiling the Fortran command-line

Post by Jose Lozano » June 27 2023

Hello, I'm trying to run CAMB in the fortran directory by typing "make camb". However, I get the following error

make camb
/Library/Developer/CommandLineTools/usr/bin/make -C Release --no-print-directory -f../Makefile FORUTILS_SRC_DIR=.. libforutils.a
make[1]: Circular precision.mod <- precision.mod dependency dropped.
make[1]: Circular results.mod <- results.mod dependency dropped.
make[1]: Circular spherbessels.mod <- spherbessels.mod dependency dropped.
gfortran -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/Users/planck/Desktop/CAMB-master/fortran/../forutils/Release/" -c ../cmbmain.f90 -o cmbmain.o
../cmbmain.f90:58:9:

58 | use ModelParams
| 1
Fatal Error: Cannot open module file 'modelparams.mod' for reading at (1): No such file or directory
compilation terminated.
make[1]: *** [cmbmain.o] Error 1
make: *** [camb] Error 2

Do you know how to fix this? I'm doing this compilation in my MacOS M2 chip.
I hope you can help me out

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

Re: Compiling the Fortran command-line

Post by Antony Lewis » July 03 2023

Should be in Computers and Software forum. (try make clean first)

Post Reply