yaml_parser error with the latest update

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
tongyaop
Posts: 7
Joined: Tue Feb 15, 2022 8:59 pm
Location: University of Minnesota

yaml_parser error with the latest update

#1 Unread post by tongyaop »

Hi!

I svn updated ROMS today. Now I am encountering an error during compilation, which I have never seen before. My guess is that it's related to the recent yaml update.

Errors are reported from multiple lines in yaml_parser.f. I believe the error firstly appear at line 208:

Code: Select all

yaml_parser.f90:208:51:

         TYPE (yaml_Svec),  allocatable :: vector(:)  ! recursive vector
                                                   1
Error: Component at (1) must have the POINTER attribute
As a result,

Code: Select all

ROMS/Utility/Module.mk:15: recipe for target '/home/MY_PROJECT_DIR/Build_romsG/yaml_parser.o' failed
make: *** [/home/MY_PROJECT_DIR/Build_romsG/yaml_parser.o] Error 1

Going into yaml_parser.f90:208:51:

Code: Select all

    TYPE, PUBLIC :: yaml_Svec                      ! string structure
        character (len=:), allocatable :: value      ! scalar value
       TYPE (yaml_Svec),  allocatable :: vector(:)  ! recursive vector
      END TYPE yaml_Svec                             ! values

Seems that this line

Code: Select all

  TYPE (yaml_Svec),  allocatable :: vector(:)  ! recursive vector
has some problems?

User avatar
arango
Site Admin
Posts: 1368
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: yaml_parser error with the latest update

#2 Unread post by arango »

The most important information is missing? What compiler are you using and its version?

tongyaop
Posts: 7
Joined: Tue Feb 15, 2022 8:59 pm
Location: University of Minnesota

Re: yaml_parser error with the latest update

#3 Unread post by tongyaop »

Compiler I am using:

Code: Select all

# export           USE_MPI=on            # distributed-memory parallelism
# export        USE_MPIF90=on            # compile with mpif90 script
#export         which_MPI=intel         # compile with mpiifort library
#export         which_MPI=mpich         # compile with MPICH library
#export         which_MPI=mpich2        # compile with MPICH2 library
#export         which_MPI=mvapich2      # compile with MVAPICH2 library
# export         which_MPI=openmpi       # compile with OpenMPI library

#export        USE_OpenMP=on            # shared-memory parallelism

# export              FORT=ifort
export         FORT=gfortran
#export              FORT=pgi

export         USE_DEBUG=off            # use Fortran debugging flags
export         USE_LARGE=on            # activate 64-bit compilation

# ROMS I/O choices and combinations. A more complete description of the
# available options can be found in the wiki (https://myroms.org/wiki/IO).
# Most users will want to enable at least USE_NETCDF4 because that will
# instruct the ROMS build system to use nf-config to determine the
# necessary libraries and paths to link into the ROMS executable.

export       USE_NETCDF4=on            # compile with NetCDF-4 library
#export   USE_PARALLEL_IO=on            # Parallel I/O with NetCDF-4/HDF5
#export           USE_PIO=on            # Parallel I/O with PIO library
#export       USE_SCORPIO=on            # Parallel I/O with SCORPIO library

# If any of the coupling component use the HDF5 Fortran API for primary
# I/O, we need to compile the main driver with the HDF5 library.

#export          USE_HDF5=on            # compile with HDF5 library
Compiler versions:

Code: Select all

gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.12' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 

Code: Select all

nc-config --version
netCDF 4.4.0
If this answers your question

User avatar
arango
Site Admin
Posts: 1368
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: yaml_parser error with the latest update

#4 Unread post by arango »

Well, you have posted two bizarre errors messages due to compilation. It seems to us that you are using a very old gfortran compiler. Also, your NetCDF library is old. We are using NetCDF version 4.7.4. I think that you may need to update your compilers. If you have access to ifort, try to compile with it to see if you get the same errors.

tongyaop
Posts: 7
Joined: Tue Feb 15, 2022 8:59 pm
Location: University of Minnesota

Re: yaml_parser error with the latest update

#5 Unread post by tongyaop »

Thank you for the suggestion! I will try it out

tongyaop
Posts: 7
Joined: Tue Feb 15, 2022 8:59 pm
Location: University of Minnesota

Re: yaml_parser error with the latest update

#6 Unread post by tongyaop »

Hi,

Thank you for the suggestion. Now I have updated gfortran and NetCDF and I can successfully compile the model. However, when I was running it, there was still an error from yaml

Code: Select all

./romsG < roms_upwelling.in > roms_upwelling_003.log
At line 693 of file yaml_parser.f90
Fortran runtime error: Substring out of bounds: upper bound (538976288) of 'kstring' exceeds string length (17)

Error termination. Backtrace:
#0  0x7f4e361cdd21 in ???
#1  0x7f4e361ce869 in ???
#2  0x7f4e361ceee6 in ???
#3  0x5617d7bb8710 in __yaml_parser_mod_MOD_yaml_tree_extract
	at /home/PROJECT_DIR/upwelling_003/Build_romsG/yaml_parser.f90:693
#4  0x5617d7b6dc93 in __yaml_parser_mod_MOD_yaml_get_s_struc
	at /home/PROJECT_DIR/upwelling_003/Build_romsG/yaml_parser.f90:1945
#5  0x5617d7aace14 in __get_metadata_mod_MOD_io_metadata
	at /home/PROJECT_DIR/upwelling_003/Build_romsG/get_metadata.f90:886
#6  0x5617d8268c94 in __mod_ncparam_MOD_initialize_ncparam
	at /home/PROJECT_DIR/upwelling_003/Build_romsG/mod_ncparam.f90:1141
#7  0x5617d7bf8314 in read_phypar_
	at /home/PROJECT_DIR/upwelling_003/Build_romsG/read_phypar.f90:233
#8  0x5617d737263a in __inp_par_mod_MOD_inp_par
	at /home/PROJECT_DIR/upwelling_003/Build_romsG/inp_par.f90:85
#9  0x5617d5a3614c in __roms_kernel_mod_MOD_roms_initialize
	at /home/PROJECT_DIR/upwelling_003/Build_romsG/roms_kernel.f90:86
#10  0x5617d5a31ce2 in myroms
	at /home/PROJECT_DIR/upwelling_003/Build_romsG/master.f90:75
#11  0x5617d5a32510 in main
	at /home/PROJECT_DIR/upwelling_003/Build_romsG/master.f90:50
The line 693 of yaml_parser.f90 is:

Code: Select all

      nkeys=COUNT((/ (Kstring(i:i), i=1,Lstr) /) == CHAR(46)) + 1
I believe it's an error reading Lstr?

I have made sure there is a varinfo.yaml file in the project folder and I am referencing to in the *.in file.

robertson
Site Admin
Posts: 227
Joined: Wed Feb 26, 2003 3:12 pm
Location: IMCS, Rutgers University

Re: yaml_parser error with the latest update

#7 Unread post by robertson »

The fix for this was released two days ago in revision 1119 (Ticket 913). Please update your ROMS code.

User avatar
arango
Site Admin
Posts: 1368
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: yaml_parser error with the latest update

#8 Unread post by arango »

This an a issue with the gfortran compiler. I already took care of this issue. See the following :arrow: track ticket. It seems that you are ignoring track ROMS updates.

tongyaop
Posts: 7
Joined: Tue Feb 15, 2022 8:59 pm
Location: University of Minnesota

Re: yaml_parser error with the latest update

#9 Unread post by tongyaop »

Thank you! This solves my problem.

Post Reply