- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone,
I am working on a large community code where many developers are using Intel only, others are using gfortran etc. We keep getting these kind of errors when using gfortran, because apparently the Intel compiler does not check for this by default and the developers are not aware of it:
...
attrList=(/"fhzero", "ncld", "nsoil", "imp_physics", "dtp"/), rc=rc)
1
Error: Different CHARACTER lengths (6/4) in array constructor at (1)
As far as I understand, this is part of the Fortran language standard and gfortran is correct (unless using deferred-length character arrays or other Fortran 2003+ features?) So, my question: which kind of compiler flag or switch do I have to use to make the Intel compiler exit with an error in this case?
Thanks very much in advance.
Dom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I will also note that you can use:
attrList=(/character(11)::"fhzero", "ncld", "nsoil", "imp_physics", "dtp"/), rc=rc)
This is standard-conforming and does what Intel Fortran does as an extension.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try -e03 or -e08.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-e compiler option is legacy and its use is now deprecated by Intel if I'm not mistaken.
What users should employ now is -warn stderrors
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I will also note that you can use:
attrList=(/character(11)::"fhzero", "ncld", "nsoil", "imp_physics", "dtp"/), rc=rc)
This is standard-conforming and does what Intel Fortran does as an extension.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page