Compiling error? Executable error? - CVF 6.6.B

Hi All,

I have attemted to recompile FAST in its normal state, just to check things have worked, before making any ‘fundamental’ changes to the source code. Below I have shown the DOS output from the downloaded executable (no problems), and the output from the executable created using Compaq Visual Fortran 6.6.B (errors displayed below):

C:\FAST>fast ./Pascal03/Pascal03.fst
Using NWTC Subroutine Library (v1.04.01, 21-Feb-2012).

Running FAST (v7.01.00a-bjj, 16-Feb-2012).

Heading of the FAST input file: Tidal Turbine inputs for FAST with fixed yaw er
ror and steady
wind.
Using NWTC Subroutine Library (v1.04.01, 21-Feb-2012).

Aerodynamic loads calculated using AeroDyn (v13.00.01a-bjj, 16-Feb-2012).
Heading of the AeroDyn input file: NACA48XX blade aerodynamic parameters for FA
ST #3.
Using NWTC Subroutine Library (v1.04.01, 21-Feb-2012).

Using InflowWind (v1.00.01b-bjj, 14-Nov-2011)

Assuming ./Pascal03/Wind/LUKE/05Hz_100mm_067zHub.wnd is a binary FF wind file.
Using NWTC Subroutine Library (v1.04.01, 21-Feb-2012).

Reading a 16x16 grid (1.5 m wide, 0.46 m to 1.96 m above ground) with a charact
erstic wind speed
of 0.9 m/s.
Processed 1080 time steps of 18-Hz full-field data (59.944 seconds).
WARNING: Estimated average wind speed in wind file is less than 8 m/s. Dynami
c Inflow will be
turned off.

Total Real Time: 3.157 seconds

Total CPU Time: 3.1094 seconds
Simulated Time: 20.004 seconds
Time Ratio (Sim/CPU): 6.4334

FAST terminated normally.

C:\FAST>fast2 ./Pascal03/Pascal03.fst
Using NWTC Subroutine Library (v1.04.01, 21-Feb-2012).

Running FAST (v7.01.00a-bjj, 16-Feb-2012).

Heading of the FAST input file: Tidal Turbine inputs for FAST with fixed yaw er
ror and steady
wind.
Using NWTC Subroutine Library (v1.04.01, 21-Feb-2012).

Aerodynamic loads calculated using AeroDyn (v13.00.01a-bjj, 16-Feb-2012).
Heading of the AeroDyn input file: NACA48XX blade aerodynamic parameters for FA
ST #3.
Using NWTC Subroutine Library (v1.04.01, 21-Feb-2012).

Using InflowWind (v1.00.01b-bjj, 14-Nov-2011)

Assuming ./Pascal03/Wind/LUKE/05Hz_100mm_067zHub.wnd is a binary FF wind file.
Using NWTC Subroutine Library (v1.04.01, 21-Feb-2012).

Reading a 16x16 grid (1.5 m wide, 0.46 m to 1.96 m above ground) with a charact
erstic wind speed
of 0.9 m/s.
Processed 1080 time steps of 18-Hz full-field data (59.944 seconds).
WARNING: Estimated average wind speed in wind file is less than 8 m/s. Dynami
c Inflow will be
turned off.

forrtl: severe (157): Program Exception - access violation
Image PC Routine Line Source
FAST2.exe 004EE45C FASTSUBS_mp_RTHS 5167 FAST.f90
FAST2.exe 0051F6AD FASTSUBS_mp_SOLVE 7953 FAST.f90
FAST2.exe 00522411 FASTSUBS_mp_TIMEM 8326 FAST.f90
FAST2.exe 005A2534 FAST 106 FAST_Prog.f90
FAST2.exe 0067AAE9 Unknown Unknown Unknown
FAST2.exe 00669CC2 Unknown Unknown Unknown
kernel32.dll 7C817077 Unknown Unknown Unknown

I assume the error must lie somewhere within the changes I have had to make in order to compile the source code, I will list these below to see if this could explain to anyone why the executable did not run correctly:

  1. deleted various unnecessary source files (DoublePrec.f90, SysVF.f90 etc.)
  2. commented out references to UserWind and UD_Wind in InflowWindMod.f90 (I did not have a UserWind module file, but I assume this is irrelevant to the problem since I do not use one?)
  3. changed SharedTypes to SharedDataTypes in AeroDyn.f90 as per bjj

I will aslo include the compiler build info (with the warnings):

Deleting intermediate files and output files for project ‘FASTrecompile - Win32 Debug’.
--------------------Configuration: FASTrecompile - Win32 Debug--------------------
Compiling Fortran…
C:\FAST\Source\SingPrec.f90
C:\FAST\Source\SysCVF.f90
C:\FAST\Source\SysCVF.f90(515) : Warning: Fortran 95 does not allow this intrinsic procedure. [ISNAN]
Is_NaN = IsNaN( DblNum )
------------^
C:\FAST\Source\SysCVF.f90(632) : Warning: Fortran 95 does not allow this keyword. [CONVERT]
ACTION=‘READ’, CONVERT=‘BIG_ENDIAN’ ) ! Use this for PC systems.
----------------------------------^
C:\FAST\Source\SysCVF.f90(656) : Warning: Fortran 95 does not allow this keyword. [CARRIAGECONTROL]
OPEN ( CU , FILE=‘CON’ , STATUS=‘UNKNOWN’ , CARRIAGECONTROL=‘FORTRAN’, RECL=ConRecL )
-----------------------------------------------^
C:\FAST\Source\SysCVF.f90(676) : Warning: Fortran 95 does not allow this intrinsic procedure. [EXIT]
CALL EXIT ( StatCode )
--------^
C:\FAST\Source\NWTC_IO.f90
C:\FAST\Source\NWTC_Num.f90
C:\FAST\Source\NWTC_Aero.f90
C:\FAST\Source\NWTC_Aero.f90(54) : Warning: Allocatable fields of derived types are non-standard [ALPHA]
REAL(ReKi), ALLOCATABLE :: Alpha (:slight_smile: ! The angle of attack vector.
--------------------------------------^
C:\FAST\Source\NWTC_Aero.f90(55) : Warning: Allocatable fields of derived types are non-standard [CL]
REAL(ReKi), ALLOCATABLE :: Cl (:slight_smile: ! The lift-coefficient vector.
--------------------------------------^
C:\FAST\Source\NWTC_Aero.f90(56) : Warning: Allocatable fields of derived types are non-standard [CD]
REAL(ReKi), ALLOCATABLE :: Cd (:slight_smile: ! The drag-coefficient vector.
--------------------------------------^
C:\FAST\Source\NWTC_Aero.f90(57) : Warning: Allocatable fields of derived types are non-standard [CM]
REAL(ReKi), ALLOCATABLE :: Cm (:slight_smile: ! The pitching-moment-coefficient vector.
--------------------------------------^
C:\FAST\Source\NWTC_Aero.f90(58) : Warning: Allocatable fields of derived types are non-standard [CPMIN]
REAL(ReKi), ALLOCATABLE :: Cpmin (:slight_smile: ! The minimum-pressure-coefficient vector.
--------------------------------------^
C:\FAST\Source\NWTC_Aero.f90(59) : Warning: Allocatable fields of derived types are non-standard [FTB]
REAL(ReKi), ALLOCATABLE :: FTB (:slight_smile: ! The normal-coefficient divided by the Cn slope at zero lift.
--------------------------------------^
C:\FAST\Source\NWTC_Aero.f90(60) : Warning: Allocatable fields of derived types are non-standard [FTBC]
REAL(ReKi), ALLOCATABLE :: FTBC (:slight_smile: ! The chordwise-coefficient divided by the Cn slope at zero lift.
--------------------------------------^
C:\FAST\Source\NWTC_Aero.f90(66) : Warning: Allocatable fields of derived types are non-standard [IND]
INTEGER, ALLOCATABLE :: Ind (:,:slight_smile: ! The tables in this supertable.
--------------------------------------^
C:\FAST\Source\NWTC_Aero.f90(71) : Warning: Allocatable fields of derived types are non-standard [TAB]
TYPE(AeroTable), ALLOCATABLE :: Tab (:slight_smile: ! The tables in this supertable.
--------------------------------------^
C:\FAST\Source\NWTC_Library.f90
C:\FAST\Source\UserVSCont_KP.f90
C:\FAST\Source\UserSubs.f90
C:\FAST\Source\SharedInflowDefs.f90
C:\FAST\Source\AeroMods.f90
C:\FAST\Source\GenSubs.f90
C:\FAST\Source\HAWCWind.f90
C:\FAST\Source\CTWind.f90
C:\FAST\Source\FDWind.f90
C:\FAST\Source\HHWind.f90
C:\FAST\Source\FFWind.f90
C:\FAST\Source\InflowWindMod.f90
C:\FAST\Source\AeroSubs.f90
C:\FAST\Source\NWTC_SharedDataTypes.f90
C:\FAST\Source\NWTC_SharedDataTypes.f90(35) : Warning: Allocatable fields of derived types are non-standard [BLADE]
TYPE(Marker), ALLOCATABLE :: Blade(:,:slight_smile:
------------------------------------^
C:\FAST\Source\NWTC_SharedDataTypes.f90(36) : Warning: Allocatable fields of derived types are non-standard [HUB]
TYPE(Marker), ALLOCATABLE :: Hub(:slight_smile:
------------------------------------^
C:\FAST\Source\NWTC_SharedDataTypes.f90(37) : Warning: Allocatable fields of derived types are non-standard [ROTORFURL]
TYPE(Marker), ALLOCATABLE :: RotorFurl(:slight_smile:
------------------------------------^
C:\FAST\Source\NWTC_SharedDataTypes.f90(38) : Warning: Allocatable fields of derived types are non-standard [NACELLE]
TYPE(Marker), ALLOCATABLE :: Nacelle(:slight_smile:
------------------------------------^
C:\FAST\Source\NWTC_SharedDataTypes.f90(39) : Warning: Allocatable fields of derived types are non-standard [TOWER]
TYPE(Marker), ALLOCATABLE :: Tower(:slight_smile:
------------------------------------^
C:\FAST\Source\NWTC_SharedDataTypes.f90(40) : Warning: Allocatable fields of derived types are non-standard [TAIL]
TYPE(Marker), ALLOCATABLE :: Tail(:slight_smile:
------------------------------------^
C:\FAST\Source\NWTC_SharedDataTypes.f90(44) : Warning: Allocatable fields of derived types are non-standard [BLADE]
TYPE(Load), ALLOCATABLE :: Blade(:,:slight_smile:
------------------------------------^
C:\FAST\Source\NWTC_SharedDataTypes.f90(45) : Warning: Allocatable fields of derived types are non-standard [HUB]
TYPE(Load), ALLOCATABLE :: Hub(:slight_smile:
------------------------------------^
C:\FAST\Source\NWTC_SharedDataTypes.f90(46) : Warning: Allocatable fields of derived types are non-standard [ROTORFURL]
TYPE(Load), ALLOCATABLE :: RotorFurl(:slight_smile:
------------------------------------^
C:\FAST\Source\NWTC_SharedDataTypes.f90(47) : Warning: Allocatable fields of derived types are non-standard [NACELLE]
TYPE(Load), ALLOCATABLE :: Nacelle(:slight_smile:
------------------------------------^
C:\FAST\Source\NWTC_SharedDataTypes.f90(48) : Warning: Allocatable fields of derived types are non-standard [TOWER]
TYPE(Load), ALLOCATABLE :: Tower(:slight_smile:
------------------------------------^
C:\FAST\Source\NWTC_SharedDataTypes.f90(49) : Warning: Allocatable fields of derived types are non-standard [TAIL]
TYPE(Load), ALLOCATABLE :: Tail(:slight_smile:
------------------------------------^
C:\FAST\Source\NWTC_SharedDataTypes.f90(54) : Warning: Allocatable fields of derived types are non-standard [BLADE]
TYPE(Marker), ALLOCATABLE :: Blade(:slight_smile:
------------------------------------^
C:\FAST\Source\AeroDyn.f90
C:\FAST\Source\AeroDyn.f90(58) : Warning: Allocatable fields of derived types are non-standard [SETMULTABLOC]
LOGICAL ,ALLOCATABLE :: SetMulTabLoc(:,:slight_smile:
------------------------------------^
C:\FAST\Source\AeroDyn.f90(59) : Warning: Allocatable fields of derived types are non-standard [MULTABLOC]
REAL(ReKi),ALLOCATABLE :: MulTabLoc(:,:slight_smile: ! MulTabLoc from GetElemParams()
------------------------------------^
C:\FAST\Source\FAST_Mods.f90
C:\FAST\Source\SetVersion.f90
C:\FAST\Source\PitchCntrl_ACH.f90
C:\FAST\Source\Noise.f90
C:\FAST\Source\FFTMod.f90
C:\FAST\Source\HydroCalc.f90
C:\FAST\Source\fftpack.f
C:\FAST\Source\fftpack.f(24) : Warning: Fixed form source is an obsolescent feature in Fortran 95.
SUBROUTINE RFFTI (N,WSAVE)
^
C:\FAST\Source\fftpack.f(47) : Warning: The Arithmetic IF statement is obsolete. Use the IF statement or the IF construct
IF (J-4) 102,102,103
^
C:\FAST\Source\fftpack.f(53) : Warning: The Arithmetic IF statement is obsolete. Use the IF statement or the IF construct
IF (NR) 101,105,101
^
C:\FAST\Source\fftpack.f(235) : Warning: The Arithmetic IF statement is obsolete. Use the IF statement or the IF construct
IF (IDO-2) 107,105,102
^
C:\FAST\Source\fftpack.f(310) : Warning: The Arithmetic IF statement is obsolete. Use the IF statement or the IF construct
IF (IDO-2) 107,105,102
^
C:\FAST\Source\fftpack.f(683) : Warning: The Arithmetic IF statement is obsolete. Use the IF statement or the IF construct
IF (N-2) 106,101,102
^
C:\FAST\Source\fftpack.f(857) : Warning: The Arithmetic IF statement is obsolete. Use the IF statement or the IF construct
IF (IDO-2) 107,105,102
^
C:\FAST\Source\fftpack.f(928) : Warning: The Arithmetic IF statement is obsolete. Use the IF statement or the IF construct
IF (IDO-2) 107,105,102
^
C:\FAST\Source\fftpack.f(1304) : Warning: The Arithmetic IF statement is obsolete. Use the IF statement or the IF construct
IF (N-2) 101,102,103
^
C:\FAST\Source\FAST_IO.f90
C:\FAST\Source\FAST.f90
C:\FAST\Source\FAST2ADAMS.f90
C:\FAST\Source\FAST_Lin.f90
C:\FAST\Source\FAST_Prog.f90
C:\FAST\Source\AeroCalc.f90
Linking…

FAST.exe - 0 error(s), 37 warning(s)

Sorry for the very long message but I am completely lost at this stage, so close and yet so far!

Kind regards,

Pascal

  1. I don’t recommend actually deleting source files. You can remove the files from your Visual Studio project without deleting them.
  2. You should not have to change anything in UserWind to compile it. The UserWind.f90 file should be in the archive (did you delete it in step 1?).
  3. Again, you should not have to change this to compile the code. (Any comments you saw from me were notes to myself for a future release…)

Your traceback information can help you figure out where the problem occurred:

This tells you that the problem was on line 5167 of FAST.f90, in subroutine RtHS(). (The other lines tell you which routines called RtHS().)

An access violation means that you are trying to access memory at an invalid address or write to a protected address. This usually happens if you haven’t allocated arrays before you use them or you try to access an element of an array that doesn’t exist (e.g., you have a 3 element array and you ask for element 4).

Because this code compiles and runs with IVF, my guess is that the Compaq compiler–which has been known to have issues with allocatable arrays (there are forum posts on this)–is not compiling the source code properly. You could try to compile in “Release” mode instead of “Debug”, but I wouldn’t trust it. I highly recommend that you upgrade to a newer compiler that supports Fortran 2003 features.

Hi Bonnie,

I have taken your advice and gone over to IVF 2008. I have succeeded in getting the program to compileand run and it matches (except for tiny discrepancies which are probably smaller than any mathemtaical error.

One final question relates to the properties settings you use in IVF. I used ‘release’ mode and it’s default settings. What settings would you recommend I use?

My executable is not currently as fast as the downloaded one, only about 89% of the speed.

Thanks,

Pascal

Incidentally, I didn’t bother with the Compile_FAST.bat file, I simply created a project (empty console app), loaded all the relevant source files and built it after changing the configuration manager to ‘release’ instead of debug.

I typically just update the default Release and/or Debug configurations, adding the /Qsave, /Qzero, and /assume:byterecl options (under the properties/fortran/data?).

You can play around with the optimization levels; different compilers/versions will have different optimizations. Sometimes certain test cases will run faster compiled on one compiler while others run faster with a different compiler.