Hi I am new to ROMS. when I tried to compile the upwelling case, I encountered the following problems:
yaml_parser.f90(1595): error #6582: A dummy argument which has the OPTIONAL or the INTENT(OUT) attribute is not allowed in this specification expression. [LSTR]
allocate ( character(LEN=Lstr) :: OutString, STAT=ErrFlag)
---------------------------------^
yaml_parser.f90(1598): error #6582: A dummy argument which has the OPTIONAL or the INTENT(OUT) attribute is not allowed in this specification expression. [LSTR]
allocate ( character(LEN=Lstr) :: OutString, STAT=ErrFlag)
---------------------------------^
compilation aborted for yaml_parser.f90 (code 1)
make: *** [/data/yanjie/ROMS_Projects/upwelling/Build_roms/yaml_parser.o] Error 1
My compiler version is Intel-fortran2013,openmpi version is openmpi1.8.I'm not sure exactly where the problem is. I hope you can help me,Thanks
I
Compilation issue: yaml_parser.f90
- arango
- Site Admin
- Posts: 1351
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
Re: Compilation issue: yaml_parser.f90
Your compiler is too old and does not support 2003 and 2008 updates to the Fortran standard. Need to use a newer version of the ifort compiler or a recent version of gfortran.
-
- Posts: 4
- Joined: Wed Oct 18, 2017 5:53 pm
- Location: Federal University of Rio de Janeiro, LAMCE- COPPE
Re: Compilation issue: yaml_parser.f90
I faced the same problem while trying to install the latest version of ROMS. As suggested by Arango, the best solution would be to have the latest version of gfortran or ifort. However, I made a small change in the code and it appeared to work (
I ran only a test case by that time). Instead of 'character(LEN=Lstr)', use 'character(LEN_TRIM(InpString))' ......make this change in both lines of yaml_parser.f90
![Exclamation :!:](./images/smilies/icon_exclaim.gif)
- arango
- Site Admin
- Posts: 1351
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
Re: Compilation issue: yaml_parser.f90
Yes, that's a possibility. But it is a bug in the gfortan compiler! It works for me. I'm using gfortran versions Red Hat 11.3.1-2 and MacPorts gcc11 11.3.0_5. It is telling us how crappy is the gfortran compiler, and the folks at GNU have not read or misinterpreted correctly Fortran 2003 standard and probably later additions to it (2008, 2015). I rechecked the standard, and the syntax in yaml_parser.F is correct. The issue is that the developer team at GNU picks and chooses parts of the standard and makes lazy shortcuts sometimes.