Closed amg1199 closed 6 months ago
Sorry, there was some incompleteness. Please give try this
$ git clone https://github.com/jagurs-admin/jagurs.git
$ cd jagurs
$ patch -p 1 < patch
$ cd src
[Modify Makefile.gfortran if you need.]
$ make -f Makefile.gfortran
Baba, 088-656-9721 (ext. 4231) News: JAGURSが日本地震学会技術開発賞を受賞しました
From: 'amg1199' via jagurs_admin @.> Sent: Tuesday, April 2, 2024 1:00 PM To: jagurs-admin/jagurs @.> Cc: Subscribed @.***> Subject: [jagurs-admin/jagurs] Compilation of ver. 0521 error (Issue #18)
Hello,
I am attempting to compile serial version of JAGURS ver. 0521 on Ubuntu in my PC. However, I encountered several errors:
`mod_mygmt_gridio.f90:52:48:
52 | real(kind=4), parameter :: NaN = transfer(Z'FFFFFFFF', 0.e0) | 1 Error: BOZ literal constant at (1) cannot be an actual argument to ‘transfer’ mod_mygmt_gridio.f90:170:73:
170 | stat = nf_put_att_real(ncid, z_id, '_FillValue', NF_REAL, 1, NaN) | 1 Error: Symbol ‘nan’ at (1) has no IMPLICIT type mod_mygmt_gridio.f90:154:52:
86 | stat = nf_def_var(ncid, 'x_range', NF_DOUBLE, 1, x_range_dims, x_range_id ) | 2 ...... 154 | stat = nf_def_var(ncid, 'x', NF_DOUBLE, 1, x_dim, x_range_id ) | 1 Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar) mod_mygmt_gridio.f90:155:52:
86 | stat = nf_def_var(ncid, 'x_range', NF_DOUBLE, 1, x_range_dims, x_range_id ) | 2 ...... 155 | stat = nf_def_var(ncid, 'y', NF_DOUBLE, 1, y_dim, y_range_id ) | 1 Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar) make: *** [Makefile.gfortran:267: mod_mygmt_gridio.o] Error 1`
For reference, here is the snippet of my makefile (Makefile.gfortran)
`# FC: Specify Fortran90 compiler command. FC=gfortran
Added for displacement. PRJ4_DIR: Specify PROJ.4 install directory. CC&CFLAGS: Specify C compiler command and flags.
PROJ4_DIR=/usr/local/lib CC=gcc CFLAGS=-g -I/usr/local/include
BASE: Specify basic compiler options.
BASE=-cpp -fconvert=big-endian
FFTW3_INCLUDE_DIR: Specify FFTW3 include directory.
FFTW3_INCLUDE_DIR=/usr/include
FFTW3_LIB: Specify linker options to link FFTW3.
FFTW3_LIB=-L/usr/lib/x86_64-linux-gnu -lfftw3
OPT: Specify compiler options about optimization level.
OPT=-O2 -fopenmp -I$(FFTW3_INCLUDE_DIR)
NETCDF: Specify the path to NetCDF library.
NETCDF=/usr/include
LIBS: Specify linker options.
LIBS=-L/usr/lib/x86_64-linux-gnu -lnetcdff -lnetcdf -L/usr/lib/x86_64-linux-gnu/hdf5/serial -lhdf5_hl -lhdf5 -lcurl -L/usr/include -lsz -L$(PROJ4_DIR) -lproj $(FFTW3_LIB)`
Hoping for your input on this. Thank you and more power to you!
Regards, Aubry
To unsubscribe from this group and stop receiving emails from it, send an email to @.**@.>.
Hello,
Thank you for the update. I appreciate it.
Upon running $ patch -p 1 < patch
, it said:
-bash: patch: No such file or directory
Please see attach photo. Thank you!
Regards,
Please download this file https://www.dropbox.com/scl/fi/9wcyczcmp5z7wqftfciyq/patch?rlkey=n0gj4sybgm675cart31b92o9h&dl=0 and put this under ./jagurs. Please execute $ patch -p 1 < patch
Baba
Hello,
I have successfully compiled jagurs. Thank you for your help. More power!
Regards, Aubry
Hello Baba,
I was attempting to compile another version of JAGURS, now with PIXELIN=ON. I was caught up in some errors. Here are they:
aub@MSI:~/jagurs-JAGURS-D_V0521_pixel/src$ make -f Makefile_cartesian.gfortran
gcc -c -g -I/usr/local/include mapproject.c
gfortran -c -cpp -fallow-invalid-boz -O2 -fopenmp -I/usr/include -I/usr/include -DREAL_DBLE -DTIMER -DTIMER_DETAIL -DCONV_CHECK -DNCDIO -DCARTESIAN -DONEFILE -DPIXELIN -DNFSUPPORT okada.sub.f
okada.sub.f:159:72:
159 | 1111 U(I)=F0
| 1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 1111 at (1)
gfortran -c -cpp -fallow-invalid-boz -O2 -fopenmp -I/usr/include -I/usr/include -DREAL_DBLE -DTIMER -DTIMER_DETAIL -DCONV_CHECK -DNCDIO -DCARTESIAN -DONEFILE -DPIXELIN -DNFSUPPORT mod_multi.f90
gfortran -c -cpp -fallow-invalid-boz -O2 -fopenmp -I/usr/include -I/usr/include -DREAL_DBLE -DTIMER -DTIMER_DETAIL -DCONV_CHECK -DNCDIO -DCARTESIAN -DONEFILE -DPIXELIN -DNFSUPPORT mod_truncation.f90
gfortran -c -cpp -fallow-invalid-boz -O2 -fopenmp -I/usr/include -I/usr/include -DREAL_DBLE -DTIMER -DTIMER_DETAIL -DCONV_CHECK -DNCDIO -DCARTESIAN -DONEFILE -DPIXELIN -DNFSUPPORT mod_timer.f90
gfortran -c -cpp -fallow-invalid-boz -O2 -fopenmp -I/usr/include -I/usr/include -DREAL_DBLE -DTIMER -DTIMER_DETAIL -DCONV_CHECK -DNCDIO -DCARTESIAN -DONEFILE -DPIXELIN -DNFSUPPORT mod_grid.f90
gfortran -c -cpp -fallow-invalid-boz -O2 -fopenmp -I/usr/include -I/usr/include -DREAL_DBLE -DTIMER -DTIMER_DETAIL -DCONV_CHECK -DNCDIO -DCARTESIAN -DONEFILE -DPIXELIN -DNFSUPPORT mod_params.f90
gfortran -c -cpp -fallow-invalid-boz -O2 -fopenmp -I/usr/include -I/usr/include -DREAL_DBLE -DTIMER -DTIMER_DETAIL -DCONV_CHECK -DNCDIO -DCARTESIAN -DONEFILE -DPIXELIN -DNFSUPPORT mod_mygmt_gridio.f90
mod_mygmt_gridio.f90:54:38:
54 | real(kind=4), parameter :: NaN = Z'FFFFFFFF'
| 1
Warning: BOZ literal constant at (1) is neither a data-stmt-constant nor an actual argument to INT, REAL, DBLE, or CMPLX intrinsic function
gfortran -c -cpp -fallow-invalid-boz -O2 -fopenmp -I/usr/include -I/usr/include -DREAL_DBLE -DTIMER -DTIMER_DETAIL -DCONV_CHECK -DNCDIO -DCARTESIAN -DONEFILE -DPIXELIN -DNFSUPPORT mod_fxy.f90
gfortran -c -cpp -fallow-invalid-boz -O2 -fopenmp -I/usr/include -I/usr/include -DREAL_DBLE -DTIMER -DTIMER_DETAIL -DCONV_CHECK -DNCDIO -DCARTESIAN -DONEFILE -DPIXELIN -DNFSUPPORT mod_fxy_cartesian.f90
gfortran -c -cpp -fallow-invalid-boz -O2 -fopenmp -I/usr/include -I/usr/include -DREAL_DBLE -DTIMER -DTIMER_DETAIL -DCONV_CHECK -DNCDIO -DCARTESIAN -DONEFILE -DPIXELIN -DNFSUPPORT mod_nest.f90
gfortran -c -cpp -fallow-invalid-boz -O2 -fopenmp -I/usr/include -I/usr/include -DREAL_DBLE -DTIMER -DTIMER_DETAIL -DCONV_CHECK -DNCDIO -DCARTESIAN -DONEFILE -DPIXELIN -DNFSUPPORT mod_interpolation.f90
gfortran -c -cpp -fallow-invalid-boz -O2 -fopenmp -I/usr/include -I/usr/include -DREAL_DBLE -DTIMER -DTIMER_DETAIL -DCONV_CHECK -DNCDIO -DCARTESIAN -DONEFILE -DPIXELIN -DNFSUPPORT mod_fxy_disp.f90
gfortran -c -cpp -fallow-invalid-boz -O2 -fopenmp -I/usr/include -I/usr/include -DREAL_DBLE -DTIMER -DTIMER_DETAIL -DCONV_CHECK -DNCDIO -DCARTESIAN -DONEFILE -DPIXELIN -DNFSUPPORT mod_fxy_disp_cartesian.f90
gfortran -c -cpp -fallow-invalid-boz -O2 -fopenmp -I/usr/include -I/usr/include -DREAL_DBLE -DTIMER -DTIMER_DETAIL -DCONV_CHECK -DNCDIO -DCARTESIAN -DONEFILE -DPIXELIN -DNFSUPPORT mod_hxy.f90
gfortran -c -cpp -fallow-invalid-boz -O2 -fopenmp -I/usr/include -I/usr/include -DREAL_DBLE -DTIMER -DTIMER_DETAIL -DCONV_CHECK -DNCDIO -DCARTESIAN -DONEFILE -DPIXELIN -DNFSUPPORT mod_hxy_cartesian.f90
gfortran -c -cpp -fallow-invalid-boz -O2 -fopenmp -I/usr/include -I/usr/include -DREAL_DBLE -DTIMER -DTIMER_DETAIL -DCONV_CHECK -DNCDIO -DCARTESIAN -DONEFILE -DPIXELIN -DNFSUPPORT mod_bank.f90
gfortran -c -cpp -fallow-invalid-boz -O2 -fopenmp -I/usr/include -I/usr/include -DREAL_DBLE -DTIMER -DTIMER_DETAIL -DCONV_CHECK -DNCDIO -DCARTESIAN -DONEFILE -DPIXELIN -DNFSUPPORT mod_displacement.f90
mod_displacement.f90:1137:132:
1137 | hdr(dg%my%bath_file,nlon_dummy,nlat_dummy,x_inc,y_inc,x_min,x_max,y_min,y_max,z_min,z_max,nxorg,nyorg,formatid)
| 1
Error: Line truncated at (1) [-Werror=line-truncation]
mod_displacement.f90:1137:132:
1137 | hdr(dg%my%bath_file,nlon_dummy,nlat_dummy,x_inc,y_inc,x_min,x_max,y_min,y_max,z_min,z_max,nxorg,nyorg,formatid)
| 1
Error: Syntax error in argument list at (1)
mod_displacement.f90:1706:132:
1706 | hdr(dg%my%bath_file,nlon_dummy,nlat_dummy,x_inc,y_inc,x_min,x_max,y_min,y_max,z_min,z_max,nxorg,nyorg,formatid)
| 1
Error: Line truncated at (1) [-Werror=line-truncation]
mod_displacement.f90:1706:132:
1706 | hdr(dg%my%bath_file,nlon_dummy,nlat_dummy,x_inc,y_inc,x_min,x_max,y_min,y_max,z_min,z_max,nxorg,nyorg,formatid)
| 1
Error: Syntax error in argument list at (1)
f951: some warnings being treated as errors
make: *** [Makefile_cartesian.gfortran:267: mod_displacement.o] Error 1
Thank you for your help!
Regards, Aubry
Hi Aubry
Could you give a try to add -ffree-line-length-none to BASE variable in Makefile. Thus, please use BASE=-cpp -fallow-invalid-boz -ffree-line-length-none
I hope it works for your environment.
Hola,
He compilado jagurs con éxito. Gracias por su ayuda. ¡Más poder!
Saludos, Aubry. Hi can you helpme?
Hello Baba,
I'm sorry for the late reply. Your recommendation worked! Thank you so much.
More power!
Regards
Hello,
I am attempting to compile serial version of JAGURS ver. 0521 on Ubuntu in my PC. However, I encountered several errors:
For reference, here is the snippet of my makefile (Makefile.gfortran)
Hoping for your input on this. Thank you and more power to you!
Regards, Aubry