Page 12 of 17

Re: Instructions for Compiling FAST

Posted: Wed Jun 22, 2016 7:14 am
by David.Kolodziej
Hello Mr.Jonkman!

with your help I was able to compile the Fast.exe and and the Sfunc successfully! Thank you very much for that! In a further step I compiled the FastDLL.exe successfully by following these instructions:

"(Note that if you choose to use the user-defined control options for interfacing with a GH Bladed-style DLL in FAST v7.01.00a-bjj, your list of FAST source files will include BladedDLLInterface.f90, UserSubs_forBladedDLL.f90, and UserVSCont_KP_forBladedDLL.f90. It will not include PitchCntrl_ACH.f90, UserSubs.f90, or UserVSCont_KP.f90. The file UserSubs_forBladedDLL.f90 is a copy of UserSubs.f90 with subroutines UserHSSBr and UserYawCont commented out. The file UserVSCont_KP_forBladedDLL.f90 is a copy of UserVSCont_KP with subroutine UserVSCont commented out.)"

But as soon as I try to run this executable file within my simulation folder I get the following errors:

speed of 5.9 m/s.
Processed 21092 time steps of 20-Hz full-field data (1054.6 seconds).

forrtl: severe (159): Program Exception - breakpoint
Image PC Routine Line Source
FAST.exe 00B5BFCC Unknown Unknown Unknown
FAST.exe 00B5BC19 Unknown Unknown Unknown
FAST.exe 00B5B56F Unknown Unknown Unknown
FAST.exe 005C2595 _DLL_INTERFACE_mp 174 BladedDLLInterface.f90
FAST.exe 005C3864 _BLADEDDLLINTERFA 472 BladedDLLInterface.f90
FAST.exe 005C4B70 _PITCHCNTRL 615 BladedDLLInterface.f90
FAST.exe 00749B96 _FASTSUBS_mp_CONT 4787 FAST.f90
FAST.exe 0077F904 _FASTSUBS_mp_RTHS 7555 FAST.f90
FAST.exe 00979230 _FASTSUBS_mp_SOLV 11903 FAST.f90
FAST.exe 0098A72C _FASTSUBS_mp_TIME 12308 FAST.f90
FAST.exe 00B4F045 _MAIN__ 106 FAST_Prog.f90
FAST.exe 00B591CF Unknown Unknown Unknown
FAST.exe 00B5B94E Unknown Unknown Unknown
FAST.exe 00B5B81A Unknown Unknown Unknown
FAST.exe 00B5B6BD Unknown Unknown Unknown
FAST.exe 00B5B968 Unknown Unknown Unknown
KERNEL32.DLL 75A3DEA4 Unknown Unknown Unknown
ntdll.dll 774400BE Unknown Unknown Unknown
ntdll.dll 7744008D Unknown Unknown Unknown


When I use the FASTv710malx32.exe provided by Prof Lackner no errors occur within the simulation! Have you seen the error before? (As requested "DISCON.dll and DFORRT.dll are in the same folder as the exectuable file). Ialso checked in the "NREL 5MW controls (DLL interface)" forum, but I couldnt really find my mistake!

Thank you very much in advance!

Best regards,

David

Re: Instructions for Compiling FAST

Posted: Mon Jun 27, 2016 10:13 pm
by Bonnie.Jonkman
If you look at the last line of the stack track that gives you useful information:
FAST.exe 005C2595 _DLL_INTERFACE_mp 174 BladedDLLInterface.f90
you can see that the error occurs on line 174 of BladedDLLInterface.f90. You should verify this with the source code you are actually compiling, but it looks like this is where the code is trying to call to the DLL. This could be caused by a problem in your DLL (though if it runs in Dr. Lackner's executable, that is probably not the problem); it could be a problem in the way you compiled the executable (is it using the correct calling convention when it calls the DLL?) or it could be something in the source code. That part of the code in FAST v7 uses some non-standard Fortran, so if you've used a newer compiler, it may treat it differently. It's hard for me to tell.

DFFORT.dll is required only if you've compiled the DLL with the old Compaq Visual Fortran compiler. If you used the Intel compiler, you shouldn't need it.

Re: Instructions for Compiling FAST

Posted: Thu Jul 14, 2016 1:29 am
by Srinivasa.Sudharsan
hi Dr. Bonnie ;
I am trying to compile FAST8.10 using visual studio2013 with Intel parallel studio 2016 as per your instructions, but while dubugging i get the following errors, kindly help me to rectify it. I have attached the cmd image:

Re: Instructions for Compiling FAST

Posted: Thu Jul 14, 2016 9:50 am
by Bonnie.Jonkman
Hi, Srinivasa.

I have taken a look at your build log and I am a little confused.

The first three errors I see are these:

Code: Select all

F:\FAST8.10micro\Source\FAST_Subs.f90(3979): error #6818: The statement following a CONTAINS is not a function-stmt or a subroutine-stmt.
   TYPE(FAST_MiscVarType),      INTENT(IN   )   :: m_FAST      ! Misc variables (including external inputs) for the glue code
--------^
F:\FAST8.10micro\Source\FAST_Subs.f90(4004): error #6218: This statement is positioned incorrectly and/or has syntax errors.
SUBROUTINE AD_InputSolve( u_AD, y_ED, MeshMapData, ErrStat, ErrMsg )
-----------^
F:\FAST8.10micro\Source\FAST_Subs.f90(4129): error #6702: END statement confusion.
END SUBROUTINE AD_InputSolve
^


However, when I took a look at these specific lines in the FAST v8.10 version of FAST_Subs.f90, they do not match the error messages. (Lines 3979, 6218, and 6702 should match the three lines mentioned in the error.) It looks like you are compiling a different version of the code or have made some changes to the source file(s).

Re: Instructions for Compiling FAST

Posted: Mon Jul 18, 2016 10:20 pm
by Srinivasa.Sudharsan
hi Dr. Bonnie ;
I am trying to compile FAST8.10 using visual studio2013 with Intel parallel studio 2016 as per your instructions, but while dubugging i get the following errors, kindly help me to rectify it. I have attached the cmd image:

Re: Instructions for Compiling FAST

Posted: Tue Jul 19, 2016 9:43 am
by Bonnie.Jonkman
Hi, Srivnivasa.

It looks like you are not linking with the MAP++ library.

If you use Visual Studio, you need to have the appropriate MAP*.lib file specified under Project -> Properties -> Linker -> Input -> Additional Dependencies. In the VS project distributed with FAST, it is "..\..\Source\dependencies\MAP\MAP_$(PlatformName).lib".

I don't really recommend using the batch file for compiling any more. But if you do use it, make sure the link options point to the MAP library. You should have these lines in your batch file (it's possible some were missing in 8.10):

Code: Select all

SET MAP_Loc=%FAST_Loc%\dependencies\MAP
<code skipped>
SET MAP_Include_Lib=%MAP_Loc%\map_win32.lib
IF "%BITS%"=="64" SET MAP_Include_Lib=%MAP_Loc%\map_x64.lib
<code skipped>
SET LINKOPTS=/link %MAP_Include_Lib% <other link options skipped>

Re: Instructions for Compiling FAST

Posted: Wed Jul 20, 2016 1:00 am
by Srinivasa.Sudharsan
hi Dr. Bonnie;
thank you very much for you reply. As per your instruction i have successfully compiled the FAST8.10 using VS2013 making some changes in source code and FAST_Project_32.exe file is generated. But the thing is how to interface with simulink. Can we use the same FAST_Library.dll, MAP.dll in the bin for this newly compiled FAST exe file. If no then how to make these dll files to use in simulink?? As a whole what is the procedure to link the newly compiled FAST.exe with simulink??? kindly help me in clarifying this doubt....thank you!!!!!!

Re: Instructions for Compiling FAST

Posted: Wed Jul 20, 2016 11:43 am
by Bonnie.Jonkman
If you want to use FAST v8 with Simulink, you don't actually use the FAST executable you just compiled. Instead, you need to compile the FAST source code as a dynamic library (FAST_Library.dll), which the Simulink mex file loads and uses. There are instructions for compiling the DLL in the FAST v8 ReadMe and a Visual Studio project file for compiling it is in the <FAST8>/Simulink/VisualStudio directory.

Re: Instructions for Compiling FAST

Posted: Thu Jul 21, 2016 3:23 am
by Srinivasa.Sudharsan
hi Keshan.He ,
i am trying to enable MultiTab option as per your instruction in post: viewtopic.php?f=4&t=642&p=5653&hilit=fast_library#p5653, but iam getting errors as shown in buildlog attached. Is it the total changes required that you mentioned in the post or we need to do more changes to compile FAST_Library.dll without errors???kindly help to rectify the errors in buid log.

Re: Instructions for Compiling FAST

Posted: Tue Jul 26, 2016 12:59 am
by Harm.Tillema
update: found solution

Re: Instructions for Compiling FAST

Posted: Wed Jul 27, 2016 1:49 am
by Danupon.Subanapong
Hi,
I am trying to compile FAST 7.02.00d-bjj using visual studio2015 with Intel parallel studio 2016. I followed the instructions (http://wind.nrel.gov/public/bjonkman/De ... ctions.pdf). I got a lot of errors during debugging. Majority of them are caused by the followings.
error #7002: Error in opening the compiled module file. Check INCLUDE paths.,
error #6404: This name does not have a type, and must have an explicit type.,
error #6460: This is not a field name that is defined in the encompassing structure.
error #6911: The syntax of this substring is invalid.
error #6457: This derived type name has not been declared.
error #6683: A kind type parameter must be a compile-time constant.
So, I would like to ask how to fix these kind of errors. I have been spending very long time searching for the solution for this but I still have no clue.
Best Regards,
Danupon Subanapong

Re: Instructions for Compiling FAST

Posted: Fri Aug 19, 2016 7:11 am
by Baptiste.Elie
Hi Bonnie,

I'm currently trying to compile FAST_v8.16.00 in a Linux environment.
As mentioned on the FAST_v8 compiling instructions PDF,
* I ran the makefile contained in <FAST8>/Source/dependencies/Registry folder, which gave me registry.exe .
* Then, I downloaded MAP++ and ran the makefile contained in its 'src' folder. When I did so, I got '/usr/bin/ld: cannot find -llapacke' errors. (I included a screenshot for you to see the log).

Is it a common problem ? My guess is I don't have the lapack library installed on my linux environment. I tried to install it but it did not resolved my problem. Could you give me some advice please ?

Thank you very much for your time,

Baptiste.

Re: Instructions for Compiling FAST

Posted: Wed Nov 30, 2016 10:36 pm
by Dana.Martin
Hello,

My current question is in regards to additional control inputs for FASTv8 S Function. I read the instruction manual for compiling FAST, and it refers to a section that discusses additional inputs for the S Function. There is not a great deal of information (concerning additional control inputs) in this document and am not sure how to go about declaring additional control inputs for the S Function. Are all possible turbine states allowed to be used as control inputs? When declaring them, do we simply use the channel names preceeding by the number of additions?

Is it possible to create additional control inputs during a linearization routine without recompiling FAST source code?

Regards,
Dana Martin

Re: Instructions for Compiling FAST

Posted: Mon Dec 05, 2016 5:52 pm
by Etana.Ferede
Dear Dr. Bonnie/Jason Jonkman,

I tried to compile the FAST_Library (FAST V8.16) using visual studio 2015. I followed the compiling instructions provided with the archive.
Unfortunately, i am getting errors when i tried to compile the FAST_library.
I get the following error:

1>------ Build started: Project: FAST_Library_et, Configuration: Debug x64 ------
1>Compiling with Intel(R) Visual Fortran Compiler 17.0.0.109 [Intel(R) 64]...
1>OrcaFlexInterface.F90
1>C:\Users\ferede\Documents\Project_Morphing_WTB\FAST_v8\Source\dependencies\OrcaFlex\OrcaFlexInterface.F90(114): error #6994: A procedure in an ABSTRACT interface must not be specified with DEC$ ALIAS or DEC$ ATTRIBUTES ALIAS. [ORCAFLEXUSERPTFMLDINITIALISE]
1>C:\Users\ferede\Documents\Project_Morphing_WTB\FAST_v8\Source\dependencies\OrcaFlex\OrcaFlexInterface.F90(127): error #6994: A procedure in an ABSTRACT interface must not be specified with DEC$ ALIAS or DEC$ ATTRIBUTES ALIAS. [ORCAFLEXUSERPTFMLD]
1>C:\Users\ferede\Documents\Project_Morphing_WTB\FAST_v8\Source\dependencies\OrcaFlex\OrcaFlexInterface.F90(145): error #6994: A procedure in an ABSTRACT interface must not be specified with DEC$ ALIAS or DEC$ ATTRIBUTES ALIAS. [ORCAFLEXUSERPTFMLDFINALISE]
1>compilation aborted for C:\Users\ferede\Documents\Project_Morphing_WTB\FAST_v8\Source\dependencies\OrcaFlex\OrcaFlexInterface.F90 (code 1)
1>FAST_Solver.f90
1>C:\Users\ferede\Documents\Project_Morphing_WTB\FAST_v8\Source\FAST_Solver.f90(43): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [ORCAFLEXINTERFACE]
1>C:\Users\ferede\Documents\Project_Morphing_WTB\FAST_v8\Source\FAST_Solver.f90(1767): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [ORCAFLEXINTERFACE]
1>compilation aborted for C:\Users\ferede\Documents\Project_Morphing_WTB\FAST_v8\Source\FAST_Solver.f90 (code 1)
1>FAST_Lin.f90
1>C:\Users\ferede\Documents\Project_Morphing_WTB\FAST_v8\Source\FAST_Lin.f90(29): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [FAST_SOLVER]

I also looked at this forum for any compiling error that is similar as the one i get, but i couldn't find any solution.
Could you please help me with this issue.
Thank you in advance.

Etana Ferede

Re: Instructions for Compiling FAST

Posted: Tue Jan 10, 2017 12:48 pm
by Matteo.Strada
Dear all,

I have the same problem as Etana (see previous post).

I'll be very pleased if someone could help us.

Thank you in advance.

----- EDIT: Question Solved -----
The problem is that Intel Parallel Studio XE2017 no longer accepts the attribute ALIAS, so it is necessary to modify OrcaFlexInterface.F90 this way:

Code: Select all

   ABSTRACT INTERFACE      ! These are interfaces to the DLL

#ifdef __GFORTRAN__
      SUBROUTINE OrcaFlexUserPtfmLdInitialise(DT,TMax)   BIND(C)
#else
      SUBROUTINE OrcaFlexUserPtfmLdInitialise(DT,TMax)   !!!BIND(C)
#endif
         USE, INTRINSIC :: ISO_C_BINDING, ONLY: C_FLOAT
!         !DEC$ ATTRIBUTES DEFAULT, STDCALL, DECORATE, ALIAS:'OrcaFlexUserPtfmLdInitialise'::OrcaFlexUserPtfmLdInitialise
         !DEC$ ATTRIBUTES DEFAULT, STDCALL, DECORATE ::OrcaFlexUserPtfmLdInitialise ! <<<<<<<<<<<<<<<<<<<<<<< MOD
         !GCC$ ATTRIBUTES STDCALL :: OrcaFlexUserPtfmLdInitialise
         REAL(C_FLOAT),             INTENT(IN   )  :: DT
         REAL(C_FLOAT),             INTENT(IN   )  :: TMax
      END SUBROUTINE OrcaFlexUserPtfmLdInitialise


#ifdef __GFORTRAN__
      SUBROUTINE OrcaFlexUserPtfmLd( X, XD, ZTime, DirRoot, PtfmAM, PtfmFt) BIND(C)
#else
      SUBROUTINE OrcaFlexUserPtfmLd( X, XD, ZTime, DirRoot, PtfmAM, PtfmFt) !!!BIND(C)
#endif
         USE, INTRINSIC :: ISO_C_Binding, ONLY: C_FLOAT, C_CHAR
!         !DEC$ ATTRIBUTES DEFAULT, STDCALL, DECORATE, ALIAS:'OrcaFlexUserPtfmLd'::OrcaFlexUserPtfmLd
         !DEC$ ATTRIBUTES DEFAULT, STDCALL, DECORATE ::OrcaFlexUserPtfmLd ! <<<<<<<<<<<<<<<<<<<<<<< MOD
         !GCC$ ATTRIBUTES STDCALL :: OrcaFlexUserPtfmLd
         CHARACTER(KIND=C_CHAR),    INTENT(IN   )  :: DirRoot
         REAL(C_FLOAT),             INTENT(IN   )  :: X(6)           !< Translational and rotational displacement (m, radians) relative to inertial frame.
         REAL(C_FLOAT),             INTENT(IN   )  :: XD(6)          !< Translational and rotational velocity (m/s, radians/s) relative to inertial frame.
         REAL(C_FLOAT),             INTENT(IN   )  :: ZTime          !< Current time in seconds
         REAL(C_FLOAT),             INTENT(  OUT)  :: PtfmAM(6,6)    !< Added mass matrix (kg, kg-m, kg-m^2)
         REAL(C_FLOAT),             INTENT(  OUT)  :: PtfmFt(6)      !< Platform forces -- [3 translation (N), 3 moments (N-m)] at reference point.
      END SUBROUTINE OrcaFlexUserPtfmLd



#ifdef __GFORTRAN__
      SUBROUTINE OrcaFlexUserPtfmLdFinalise()  BIND(C)
#else
      SUBROUTINE OrcaFlexUserPtfmLdFinalise()  !!!BIND(C)
#endif
         USE, INTRINSIC :: ISO_C_BINDING
!         !DEC$ ATTRIBUTES DEFAULT, STDCALL, DECORATE, ALIAS: 'OrcaFlexUserPtfmLdFinalise'::OrcaFlexUserPtfmLdFinalise
         !DEC$ ATTRIBUTES DEFAULT, STDCALL, DECORATE ::OrcaFlexUserPtfmLdFinalise ! <<<<<<<<<<<<<<<<<<<<<<< MOD
         !GCC$ ATTRIBUTES STDCALL :: OrcaFlexUserPtfmLdFinalise
         ! There is no data to pass.
      END SUBROUTINE OrcaFlexUserPtfmLdFinalise

   END INTERFACE


Best Regards,