Darwin-ifort compilation problem

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
balbin

Darwin-ifort compilation problem

#1 Unread post by balbin »

everything works fine until wrt_avg compilation.
This is what it says:

/usr/bin/cpp -P -traditional-cpp -DDARWIN -DI386 -DIFORT -D'ROOT_DIR="/Users/balbin/roms"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/Users/balbin/roms/projects/upwelling/include/upwelling.h"' -DNestedGrids=1 -D'ANALYTICAL_DIR="/Users/balbin/roms/ROMS/Functionals"' -D'SVN_REV="252M"' -IROMS/Include -IROMS/Nonlinear -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/Users/balbin/roms/projects/upwelling/include -IMaster -ICompilers -D'HEADER_DIR="/Users/balbin/roms/projects/upwelling/include"' ROMS/Utility/wrt_avg.F > /Users/balbin/roms/projects/upwelling/Build/wrt_avg.f90
ROMS/Bin/cpp_clean /Users/balbin/roms/projects/upwelling/Build/wrt_avg.f90
cd /Users/balbin/roms/projects/upwelling/Build; /opt/intel/fce/10.1.017/bin/ifort -c -ip -O3 -axP wrt_avg.f90
fortcom: Error: wrt_avg.f90, line 75: If the actual argument is scalar, the corresponding dummy argument shall be scalar unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element. [A]
status=nf_fwrite2d(ng, iNLM, ncAVGid(ng), avgVid(idFsur,ng), &
---------------^
fortcom: Error: wrt_avg.f90, line 94: If the actual argument is scalar, the corresponding dummy argument shall be scalar unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element. [A]
status=nf_fwrite2d(ng, iNLM, ncAVGid(ng), avgVid(idUbar,ng), &
---------------^
fortcom: Error: wrt_avg.f90, line 113: If the actual argument is scalar, the corresponding dummy argument shall be scalar unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element. [A]
status=nf_fwrite2d(ng, iNLM, ncAVGid(ng), avgVid(idVbar,ng), &
---------------^
fortcom: Error: wrt_avg.f90, line 132: If the actual argument is scalar, the corresponding dummy argument shall be scalar unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element. [A]
status=nf_fwrite3d(ng, iNLM, ncAVGid(ng), avgVid(idUvel,ng), &
---------------^
fortcom: Error: wrt_avg.f90, line 151: If the actual argument is scalar, the corresponding dummy argument shall be scalar unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element. [A]
status=nf_fwrite3d(ng, iNLM, ncAVGid(ng), avgVid(idVvel,ng), &
---------------^
fortcom: Error: wrt_avg.f90, line 170: If the actual argument is scalar, the corresponding dummy argument shall be scalar unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element. [A]
status=nf_fwrite3d(ng, iNLM, ncAVGid(ng), avgVid(idOvel,ng), &
---------------^
fortcom: Error: wrt_avg.f90, line 189: If the actual argument is scalar, the corresponding dummy argument shall be scalar unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element. [A]
status=nf_fwrite3d(ng, iNLM, ncAVGid(ng), avgVid(idWvel,ng), &
---------------^
fortcom: Error: wrt_avg.f90, line 209: If the actual argument is scalar, the corresponding dummy argument shall be scalar unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element. [A]
status=nf_fwrite3d(ng, iNLM, ncAVGid(ng), avgTid(itrc,ng), &
-----------------^
fortcom: Error: wrt_avg.f90, line 230: If the actual argument is scalar, the corresponding dummy argument shall be scalar unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element. [A]
status=nf_fwrite3d(ng, iNLM, ncAVGid(ng), avgVid(idDano,ng), &
---------------^
compilation aborted for wrt_avg.f90 (code 1)




This is what I found at Intel web
http://software.intel.com/en-us/forums/ ... opic/59096

Could you please help me?
Thanks and best regards
Rosa

balbin

Re: Darwin-ifort compilation problem

#2 Unread post by balbin »

Maybe it helps to know that a previous version I downloaded one month ago works fine. This one:


ROMS/TOMS Framework: September 28, 2008
===================

Copyright (c) 2002-2008 The ROMS/TOMS Group
Licensed under a MIT/X style license
See License_ROMS.txt

svn: $HeadURL: https://www.myroms.org/svn/src/trunk/ROMS/Version $
svn: $LastChangedBy: arango $
svn: $LastChangedRevision: 240 $
svn: $LastChangedDate: 2008-09-28 21:58:05 +0200 (dom, 28 sep 2008) $
svn: $Id: Version 240 2008-09-28 19:58:05Z arango $

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

Re: Darwin-ifort compilation problem

#3 Unread post by arango »

Oh yes :!: I compiled with ifort 10.0 and I didn't get that error but it seems that ifort 10.1 is more strict. The nf_fwrite*d routines are now inside of a module (see recent :arrow: trac ticket 226). Therefore we need to be careful how pointer arrays are passed as arguments. We just need to have the call as:

Code: Select all

      
      status=nf_fwrite2d(ng, iNLM, ncAVGid(ng), avgVid(idFsur,ng),      &
     &                   tAVGindx(ng), gtype,                           &
     &                   LBi, UBi, LBj, UBj, scale,                     &
#  ifdef MASKING
     &                   GRID(ng) % rmask,                              &
#  endif
     &                   TIDES(ng) % zeta_detided)
instead of:

Code: Select all

      status=nf_fwrite2d(ng, iNLM, ncAVGid(ng), avgVid(idFsur,ng),    &
     &                   tAVGindx(ng), gtype,                         &
     &                   LBi, UBi, LBj, UBj, scale,                   &
# ifdef MASKING
     &                   GRID(ng) % rmask(LBi,LBj),                   &
# endif
     &                   AVERAGE(ng) % avgzeta(LBi,LBj))
The interesting thing is that the other compilers (pgf90 and gfortran) that I tried yesterdayndidn't catch that error. I will update these routines later today. Thank you for reporting this problem.

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

Re: Darwin-ifort compilation problem

#4 Unread post by arango »

Please update you code. This problem has been corrected. See :arrow: trac ticket 228.

balbin

Re: Darwin-ifort compilation problem

#5 Unread post by balbin »

Thanks a lot.
I have compiled last version without problems!
Regards
Rosa

Post Reply