・ MacBook Pro 2017 ・ Mojave 10.14.5
Follow the steps to build the environment according to the page below.
https://personal.sron.nl/~vdtak/radex/index.shtml#install
Download the source code and unzip it.
$ tar xf radex_public.tar
Move to src in the created Radex directory.
$ cd Radex/src
Edit Makefile and specify the compiler for make. Initially use the default gfortran without editing.
Edit Radex.inc and specify the location of the molecular data and the calculation method of the photon escape probability.
parameter(radat = '/.../Radex/data/')
parameter (method = 1) ! uniform sphere
In the src directory
$ make
Hit.
Then a long error ---.
$ make
gfortran -O2 -c main.f -o main.o
gfortran -O2 -c io.f -o io.o
io.f:47:62:
47 | $ molfile = radat(1:length(radat))//molfile(1:length(molfile))
| 1
Warning: Character length of actual argument shorter than of dummy argument 'st' (120/200) at (1) [-Wargument-mismatch]
io.f:47:36:
47 | $ molfile = radat(1:length(radat))//molfile(1:length(molfile))
| 1
Warning: Character length of actual argument shorter than of dummy argument 'st' (120/200) at (1) [-Wargument-mismatch]
io.f:47:36:
47 | $ molfile = radat(1:length(radat))//molfile(1:length(molfile))
| 1
Warning: Character length of actual argument shorter than of dummy argument 'st' (120/200) at (1) [-Wargument-mismatch]
io.f:48:36:
48 | write(13,20) molfile(1:length(molfile))
| 1
Warning: Character length of actual argument shorter than of dummy argument 'st' (120/200) at (1) [-Wargument-mismatch]
io.f:52:36:
52 | write(13,20) outfile(1:length(outfile))
| 1
Warning: Character length of actual argument shorter than of dummy argument 'st' (120/200) at (1) [-Wargument-mismatch]
io.f:234:31:
234 | $ //version(1:length(version))
| 1
Warning: Character length of actual argument shorter than of dummy argument 'st' (20/200) at (1) [-Wargument-mismatch]
io.f:234:31:
234 | $ //version(1:length(version))
| 1
Warning: Character length of actual argument shorter than of dummy argument 'st' (20/200) at (1) [-Wargument-mismatch]
io.f:234:31:
234 | $ //version(1:length(version))
| 1
Warning: Character length of actual argument shorter than of dummy argument 'st' (20/200) at (1) [-Wargument-mismatch]
gfortran -O2 -c readdata.f -o readdata.o
gfortran -O2 -c matrix.f -o matrix.o
gfortran -O2 -c background.f -o background.o
background.f:405:72:
405 | if (h.eq.0.d0) pause 'Warning: bad xin input in splintrp '
|
Warning: Deleted feature: PAUSE statement at (1)
gfortran -O2 -c slatec.f -o slatec.o
slatec.f:824:72:
824 | IF (INCX .EQ. INCY) IF (INCX-1) 5,20,60
|
Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
slatec.f:1204:72:
1204 | IF (INCX .EQ. INCY) IF (INCX-1) 5,20,60
|
Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
slatec.f:1512:72:
1512 | IF (INCX .EQ. INCY) IF (INCX-1) 5,20,60
|
Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
gfortran -O2 main.o io.o readdata.o matrix.o background.o slatec.o -o radex
strip radex
install -m 755 -p -s radex ../bin/
rm *.o
rm radex
It seems that the number of characters in the argument does not match, so edit it.
Edit FUNCTION length (str) in ʻio.f. Matched to the character in radex.inc`.
CHARACTER*200 str → CHARACTER*120 str
Then the error about length (radat) disappeared. The error of length (version) is also erased.
Changed character of version in radex.inc. Align with radat.
character*20 version → character*120 version
The length (version) error has also disappeared.
However,
gfortran -O2 -c background.f -o background.o
background.f:405:72:
405 | if (h.eq.0.d0) pause 'Warning: bad xin input in splintrp '
|
Warning: Deleted feature: PAUSE statement at (1)
gfortran -O2 -c slatec.f -o slatec.o
slatec.f:824:72:
824 | IF (INCX .EQ. INCY) IF (INCX-1) 5,20,60
|
Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
These two types of errors do not go away.
Download the old gcc with Homebrew. The latest one at the moment is 9.1.0, so install the previous one.
$ brew install gcc@8
Then use the Makefile compiler
FC = gfortran-8
change to.
Then the error of Fortran 2018 deleted feature disappears and only PAUSE statement.
Edit background.f directly.
if (h.eq.0.d0) pause 'Warning: bad xin input in splintrp '
→
if (h.eq.0.d0) then
write(*,*) 'Warning: bad xin input in splintrp '
read(*,*)
endif
No more errors!
Recommended Posts