Instructions for Compiling FAST

This looks like a problem with declaring variables, functions and subroutines. I found that it’s critical to get right the order in which the files are passed to the compiler.

  1. Therefore I had a lot of errors when I changed the order of the lines in the DOS batch file (see code snippet below). I have defined some different locations for some of my files, because the code is under development and some source files are in BRANCHES rather than the TRUNK. The order should be the same as in your DOS batch file though.

  2. Also, if you have added any new subroutines which USE variables, parameters or functions defined elsewhere, it’s important that these are defined in a module or file above the file in which they are used.

  3. It’s worth having a look at the first line of output from the DOS window. It may contain a small error, which you can rectify and which will make all the subsequent errors go away. This is because the subsequent errors arise because one of the files has not been compiled successfully and so the variables, parameters or functions required later are not available. There’s limited space in the DOS window and you tend to lose the earlier output when there are a lot of error messages. Try redirecting the output to a text file, which you can open later and scroll back up to the first error returned by DOS. The DOS command might look something like this below (with your path inserted).

C:\wtg_sim… …\CMD_Release>Compile_FAST DLL > TemporaryOutputs.txt

[code]REM ----------------------------------------------------------------------------
REM -------------------- LIST OF ALL SOURCE FILES ------------------------------
REM ----------------------------------------------------------------------------

SET NWTC_Files=
SET NWTC_Files=%NWTC_Files% “%NWTC_Lib_Loc%\SingPrec.f90”
SET NWTC_Files=%NWTC_Files% “%NWTC_Lib_Loc%\SysIVF.f90”
SET NWTC_Files=%NWTC_Files% “%NWTC_Lib_Loc%\NWTC_IO.f90”
SET NWTC_Files=%NWTC_Files% “%NWTC_Lib_Loc%\NWTC_Num.f90”
SET NWTC_Files=%NWTC_Files% “%NWTC_Lib_Loc%\NWTC_Aero.f90”
SET NWTC_Files=%NWTC_Files% “%NWTC_Lib_Loc%\NWTC_Library.f90”

SET Wind_Files=
SET Wind_Files=%Wind_Files% “%Wind_Loc%\SharedInflowDefs.f90”
SET Wind_Files=%Wind_Files% “%Wind_Loc%\HHWind.f90”
SET Wind_Files=%Wind_Files% “%Wind_Loc%\FFWind.f90”
SET Wind_Files=%Wind_Files% “%Wind_Loc%\HAWCWind.f90”
SET Wind_Files=%Wind_Files% “%Wind_Loc%\FDWind.f90”
SET Wind_Files=%Wind_Files% “%Wind_Loc%\CTWind.f90”
SET Wind_Files=%Wind_Files% “%Wind_Loc%\UserWind.f90”
SET Wind_Files=%Wind_Files% “%Wind_Loc%\InflowWindMod.f90”

SET AeroDyn_Files=
REM “resource” file (unchanged from trunk)
SET AeroDyn_Files=%AeroDyn_Files% “%AeroDyn_Loc2%\SharedTypes.f90”
SET AeroDyn_Files=%AeroDyn_Files% “%AeroDyn_Loc1%\AeroMods.f90”
SET AeroDyn_Files=%AeroDyn_Files% “%AeroDyn_Loc2%\GenSubs.f90”
SET AeroDyn_Files=%AeroDyn_Files% “%AeroDyn_Loc1%\AeroSubs.f90”
SET AeroDyn_Files=%AeroDyn_Files% “%AeroDyn_Loc1%\AeroDyn.f90”

SET FAST_Files=
SET FAST_Files=%FAST_Files% “%FAST_LOC2%\fftpack.f”
SET FAST_Files=%FAST_Files% “%FAST_LOC2%\FFTMod.f90”
SET FAST_Files=%FAST_Files% “%FAST_LOC1%\HydroCalc.f90”
SET FAST_Files=%FAST_Files% “%FAST_LOC1%\FAST_Mods.f90”
SET FAST_Files=%FAST_Files% “%FAST_LOC2%\Noise.f90”
SET FAST_Files=%FAST_Files% “%FAST_LOC1%\FAST_IO.f90”
SET FAST_Files=%FAST_Files% “%FAST_LOC1%\FAST.f90”
SET FAST_Files=%FAST_Files% “%FAST_LOC2%\FAST_Lin.f90”
SET FAST_Files=%FAST_Files% “%FAST_LOC2%\FAST2ADAMS.f90”

IF /I “%1”==“DLL” GOTO dllFiles

SET FAST_Files=%FAST_Files% “%FAST_LOC2%\PitchCntrl_ACH.f90”
SET FAST_Files=%FAST_Files% “%FAST_LOC2%\UserSubs.f90”
SET FAST_Files=%FAST_Files% “%FAST_LOC2%\UserVSCont_KP.f90”

GOTO endFASTfiles

:dllFiles
SET FAST_Files=%FAST_Files% “%DLL_Loc%\LRLayerDLLInterface.f90”
SET FAST_Files=%FAST_Files% “%FAST_LOC2%\UserSubs_forBladedDLL.f90”
SET FAST_Files=%FAST_Files% “%FAST_LOC2%\UserVSCont_KP_forBladedDLL.f90”

REM NOTE: UserSubs_forBladedDLL.f90 is a copy of UserSubs.f90 with SUBROUTINES UserHSSBr() and UserYawCont() commented out
REM UserVSCont_KP_forBladedDLL.f90 is a copy of UserVSCont_KP.f90 with SUBROUTINE UserVSCont() commented out

SET ROOT_NAME=%ROOT_NAME%_DLL

:endFASTfiles
SET FAST_Files=%FAST_Files% “%FAST_LOC2%\AeroCalc.f90”
SET FAST_Files=%FAST_Files% “%FAST_LOC2%\SetVersion.f90”
SET FAST_Files=%FAST_Files% “%FAST_LOC2%\FAST_Prog.f90”

:ivf
REM ----------------------------------------------------------------------------
REM ---------------- COMPILE WITH INTEL VISUAL FORTRAN -------------------------
REM ----------------------------------------------------------------------------

REM compile

ECHO.
ECHO Compiling FAST, AeroDyn, and NWTC_Library routines to create %ROOT_NAME%.exe:

ifort %COMPOPTS% %NWTC_Files% %Wind_Files% %AeroDyn_Files% %FAST_Files% %LINKOPTS% /out:%ROOT_NAME%.exe
[/code]

I hope this is helpful.

Kind Regards,

Mark

Dear Mark,
Thanks for help and suggestions. I tried as per your suggestions but still getting same series of errors.

My temporaryoutput.txt file looks like:

[size=100]Intel(R) Fortran Compiler for applications running on IA-32, Version 10.0.025
Copyright (C) 1985-2007 Intel Corporation. All rights reserved.
Compiling FAST, AeroDyn, and NWTC_Library routines to create FAST_DLL.exe:[/size]

And my Compile_FAST.bat file looks like:

[size=100]
@ECHO OFF
REM The calling syntax for this script is
REM Compile_FAST [dll]
REM
REM Add the “dll” to the command line to compile FAST for the Bladed-style dll.
REM ----------------------------------------------------------------------------
REM set compiler internal variables
REM ----------------------------------------------------------------------------
REM You can run this bat file from the IVF compiler’s command prompt (and not
REM do anything in this section). If you choose not to run from the IVF command
REM prompt, you must call the compiler’s script to set internal variables.
REM TIP: Right click on the IVF Compiler’s Command Prompt shortcut, click
REM properties, and copy the target (without cmd.exe and/or its switches) here:

REM CALL “C:\Program Files (x86)\Intel\ComposerXE-2011\bin\ipsxe-comp-vars.bat” ia32 vs2008

CALL “C:\Program Files\Intel\Compiler\Fortran\10.0.025\IA32\Bin\ifortvars.bat” ia32

REM IF “%INTEL_SHARED%”=="" CALL “C:\Program Files\Intel\Compiler\Fortran\10.0.025\IA32\Bin\ifortvars.bat”

REM ----------------------------------------------------------------------------
REM -------------------- LOCAL VARIABLES ---------------------------------------
REM ----------------------------------------------------------------------------

SET ROOT_NAME=FAST

SET COMPOPTS=/threads/O2/inline:speed/traceback/Qzero/Qsave/real_size:32/assume:byterecl
rem SET LINKOPTS=/link /stack:64000000
SET LINKOPTS=/link

REM ----------------------------------------------------------------------------
REM ------------------------- LOCAL PATHS --------------------------------------
REM ----------------------------------------------------------------------------
REM – USERS WILL NEED TO EDIT THESE PATHS TO POINT TO FOLDERS ON THEIR LOCAL –
REM ------- NOTE: do not use quotation marks around the path names!!! ---------
REM ----------------------------------------------------------------------------
REM NWTC_Lib_Loc is the location of the NWTC subroutine library files
REM AeroDyn_Loc is the location of the AeroDyn source files
REM Wind_Loc is the location of the AeroDyn wind inflow source files
REM FAST_LOC is the location of the FAST source files
REM ----------------------------------------------------------------------------

SET NWTC_Lib_Loc=C:\Documents and Settings\Dr Ramzan\Desktop\NTWC_Library\Source
SET Wind_Loc=C:\Documents and Settings\Dr Ramzan\Desktop\AeroDyn\Source\InflowWind\Source
SET AeroDyn_Loc=C:\Documents and Settings\Dr Ramzan\Desktop\AeroDyn\Source
SET FAST_Loc=C:\Documents and Settings\Dr Ramzan\Desktop\FAST\Source

REM SET NWTC_Lib_Loc=C:\Documents and Settings\Dr Ramzan\Desktop\NTWC_Library\Source
REM SET AeroDyn_Loc=D:\DATA\DesignCodes\simulators\AeroDyn\SVNdirectory\trunk\Source
REM SET Wind_Loc=D:\DATA\DesignCodes\simulators\AeroDyn\SVNdirectory\trunk\Source\InflowWind\Source
REM SET FAST_Loc=D:\DATA\DesignCodes\simulators\FAST\SVNdirectory\trunk\Source

REM ----------------------------------------------------------------------------
REM -------------------- LIST OF ALL SOURCE FILES ------------------------------
REM ----------------------------------------------------------------------------

SET NWTC_Files=
SET NWTC_Files=%NWTC_Files% “%NWTC_Lib_Loc%\SingPrec.f90”
SET NWTC_Files=%NWTC_Files% “%NWTC_Lib_Loc%\SysIVF.f90”
SET NWTC_Files=%NWTC_Files% “%NWTC_Lib_Loc%\NWTC_IO.f90”
SET NWTC_Files=%NWTC_Files% “%NWTC_Lib_Loc%\NWTC_Num.f90”
SET NWTC_Files=%NWTC_Files% “%NWTC_Lib_Loc%\NWTC_Aero.f90”
SET NWTC_Files=%NWTC_Files% “%NWTC_Lib_Loc%\NWTC_Library.f90”

SET Wind_Files=
SET Wind_Files=%Wind_Files% “%Wind_Loc%\SharedInflowDefs.f90”
SET Wind_Files=%Wind_Files% “%Wind_Loc%\HHWind.f90”
SET Wind_Files=%Wind_Files% “%Wind_Loc%\FFWind.f90”
SET Wind_Files=%Wind_Files% “%Wind_Loc%\HAWCWind.f90”
SET Wind_Files=%Wind_Files% “%Wind_Loc%\FDWind.f90”
SET Wind_Files=%Wind_Files% “%Wind_Loc%\CTWind.f90”
SET Wind_Files=%Wind_Files% “%Wind_Loc%\UserWind.f90”
SET Wind_Files=%Wind_Files% “%Wind_Loc%\InflowWindMod.f90”

SET AeroDyn_Files=
SET AeroDyn_Files=%AeroDyn_Files% “%AeroDyn_Loc%\SharedTypes.f90”
SET AeroDyn_Files=%AeroDyn_Files% “%AeroDyn_Loc%\AeroMods.f90”
SET AeroDyn_Files=%AeroDyn_Files% “%AeroDyn_Loc%\GenSubs.f90”
SET AeroDyn_Files=%AeroDyn_Files% “%AeroDyn_Loc%\AeroSubs.f90”
SET AeroDyn_Files=%AeroDyn_Files% “%AeroDyn_Loc%\AeroDyn.f90”

SET FAST_Files=
SET FAST_Files=%FAST_Files% “%FAST_Loc%\fftpack.f”
SET FAST_Files=%FAST_Files% “%FAST_Loc%\FFTMod.f90”
SET FAST_Files=%FAST_Files% “%FAST_Loc%\HydroCalc.f90”
SET FAST_Files=%FAST_Files% “%FAST_Loc%\FAST_Mods.f90”
SET FAST_Files=%FAST_Files% “%FAST_Loc%\Noise.f90”
SET FAST_Files=%FAST_Files% “%FAST_Loc%\FAST_IO.f90”
SET FAST_Files=%FAST_Files% “%FAST_Loc%\FAST.f90”
SET FAST_Files=%FAST_Files% “%FAST_Loc%\FAST_Lin.f90”
SET FAST_Files=%FAST_Files% “%FAST_Loc%\FAST2ADAMS.f90”

IF /I “%1”==“DLL” GOTO dllFiles

SET FAST_Files=%FAST_Files% “%FAST_Loc%\PitchCntrl_ACH.f90”
SET FAST_Files=%FAST_Files% “%FAST_Loc%\UserSubs.f90”
SET FAST_Files=%FAST_Files% “%FAST_Loc%\UserVSCont_KP.f90”

GOTO endFASTfiles

:dllFiles
SET FAST_Files=%FAST_Files% “%FAST_Loc%\BladedDLLInterface.f90”
SET FAST_Files=%FAST_Files% “%FAST_Loc%\UserSubs_forBladedDLL.f90”
SET FAST_Files=%FAST_Files% “%FAST_Loc%\UserVSCont_KP_forBladedDLL.f90”

REM NOTE: UserSubs_forBladedDLL.f90 is a copy of UserSubs.f90 with SUBROUTINES UserHSSBr() and UserYawCont() commented out
REM UserVSCont_KP_forBladedDLL.f90 is a copy of UserVSCont_KP.f90 with SUBROUTINE UserVSCont() commented out

SET ROOT_NAME=%ROOT_NAME%_DLL

:endFASTfiles
SET FAST_Files=%FAST_Files% “%FAST_Loc%\AeroCalc.f90”
SET FAST_Files=%FAST_Files% “%FAST_Loc%\SetVersion.f90”
SET FAST_Files=%FAST_Files% “%FAST_Loc%\FAST_Prog.f90”

:ivf
REM ----------------------------------------------------------------------------
REM ---------------- COMPILE WITH INTEL VISUAL FORTRAN -------------------------
REM ----------------------------------------------------------------------------

REM compile

ECHO.
ECHO Compiling FAST, AeroDyn, and NWTC_Library routines to create %ROOT_NAME%.exe:

ifort %COMPOPTS% %NWTC_Files% %Wind_Files% %AeroDyn_Files% %FAST_Files% %LINKOPTS% /out:%ROOT_NAME%.exe

:end
REM ----------------------------------------------------------------------------
REM ------------------------- CLEAR MEMORY -------------------------------------
REM ------------- and delete all .mod and .obj files ---------------------------
REM ----------------------------------------------------------------------------
ECHO.

DEL *.mod
DEL *.obj

SET ROOT_NAME=
SET COPTS=

SET NWTC_Files=
SET Wind_Files=
SET AeroDyn_Files=
SET FAST_Files=
SET A2AD_Files=
SET Fixed_Files=

SET NWTC_Lib_Loc=
SET Wind_Loc=
SET AeroDyn_Loc=
SET A2AD_Loc=
SET FAST_Loc=

SET COMPOPTS=
SET LINKOPTS=[/size]

I would highly appreciate for any guidance regarding this.

Best regards,
Ramzan

Dear Ramzan,

Your output file does not contain all the output. I think this is the case because it only contains a few lines and also you included a screen-shot of the command window (black with white text). What did you type at the command line?

It ought to look something like this.

compile_fast > TemporaryOutputs.txt

Then all the output should be in the text file and the command window should have nothing output to it. The DOS command window will wait a few seconds and then return control to the prompt (once the batch process has crashed).

Please can you try again and send me the text file with the outputs. The clue should be near the top, when the first error was reported by the compiler.

Kind Regards,

Mark

Dear Mark,

Thanks for the swift reply. I am using command like you suggested:

Compile_FAST DLL>TemporaryOutputs.txt
also
Compile_FAST>TemporaryOutputs.txt

Once again I repeated right now but still same three lines in text file and same series of errors in commmad window (in black and white).

Best regards,
Ramzan

Dear Ramzan,

Could you try putting spaces around the right arrow > when you type at the prompt?

You could also try changing the line in the DOS batch file which calls the compiler so that it redirects all output to the text file.

ifort %COMPOPTS% %NWTC_Files% %Wind_Files% %AeroDyn_Files% %FAST_Files% %LINKOPTS% /out:%ROOT_NAME%.exe > TempOuts.TXT

Kind Regards,

Mark

Dear Mark,

  1. Same results by playing with spaces around > prompt
  2. Same series of errors with empty TempOuts.txt file using
    ifort %COMPOPTS% %NWTC_Files% %Wind_Files% %AeroDyn_Files% %FAST_Files% %LINKOPTS% /out:%ROOT_NAME%.exe > TempOuts.txt

Best Regards,
Ramzan

I have just found a setting for the DOS command window which controls “screen buffer size”. Could you try to increase the “height” and see if the window can be made big enough for all the output?

  1. Right click with the mouse on the blue ribbon at the top of the DOS command window
  2. select properties or defaults
  3. select “layouts” tab
  4. adjust the height parameter in the screen buffer size group (mine was set to 300, how about asking for 3000 or 10000 or more?)

Kind Regards,

Mark

Dear Ramzan,

I have just checked and you are right, if you try to redirect the output from the DOS batch file, you only get the first few lines and then the rest are sent to the DOS command windows as per usual. However, if I change the call to ifort within the DOS batch file, the output lines are all redirected to the temporary text file. An example is attached (successful compile).

Kind Regards,

Mark

TempOuts.txt (1.06 KB)

you could also try

  1. editing the DOS batch file and deleting all the lines below (and including) the call to ifort.
  2. submit the call to ifort directly from the DOS command prompt
    (a) you would copy the whole line (as below) from a text file containing the DOS batch file (or copy from this posting)
    (b) make sure the “focus” of the desktop is on the DOS command window (try hitting return a few times and make sure the cursor moves down the window)
    (c) paste the contents of the clipboard into the DOS command window (right click on the blue ribbon, select “edit” and “paste”)

ifort %COMPOPTS% %NWTC_Files% %Wind_Files% %AeroDyn_Files% %FAST_Files% %LINKOPTS% /out:%ROOT_NAME%.exe > TempOuts.TXT

Kind Regards,

Mark

Dear Mark,
Here are the starting lines, the hight setting worked. I guess the problem is in red lines:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Ramzan\Desktop\FAST>cd FAST
The system cannot find the path specified.

C:\Documents and Settings\Ramzan\Desktop\FAST>Compile_FAST

Intel(R) Fortran Compiler for applications running on IA-32, Version 10.0.025
Copyright (C) 1985-2007 Intel Corporation. All rights reserved.

Compiling FAST, AeroDyn, and NWTC_Library routines to create FAST.exe:
Intel(R) Visual Fortran Compiler for applications running on IA-32, Version 10.0
Build 20070426 Package ID: W_FC_P_10.0.025
Copyright (C) 1985-2007 Intel Corporation. All rights reserved.
ifort: command line warning #10006: ignoring unknown option ‘/threads/O2/inline:
speed/traceback/Qzero/Qsave/real_size:32/assume:byterecl’

C:\Documents and Settings\Ramzan\Desktop\NTWC_Library\Source\SysIVF.f90(552)
: Error: Not a valid value for the char-expr in this connect-spec. [‘STREAM’]
OPEN( Un, FILE=TRIM( OutFile ), STATUS=‘UNKNOWN’, FORM=‘UNFORMATTED’ , ACCESS
=‘STREAM’, IOSTAT=IOS )

-^
C:\Documents and Settings\Ramzan\Desktop\NTWC_Library\Source\SysIVF.f90(594)
: Error: Not a valid value for the char-expr in this connect-spec. [‘STREAM’]
OPEN( Un, FILE=TRIM( InFile ), STATUS=‘OLD’, FORM=‘UNFORMATTED’, ACCESS=‘STRE
AM’, IOSTAT=IOS, ACTION=‘READ’ )
---------------------------------------------------------------------------^
compilation aborted for C:\Documents and Settings\Ramzan\Desktop\NTWC_Library
\Source\SysIVF.f90 (code 1)
C:\Documents and Settings\Ramzan\Desktop\NTWC_Library\Source\NWTC_IO.f90(88)
: Error: Error in opening the compiled module file. Check INCLUDE paths. [SYS
SUBS]
USE SysSubs
xt ) 'DEACTIVATE/MOTION, ID = '//TRIM(Int2LStr( 10000*K
))
---------------------------------------------------------------^

Best Regards,
Ramzan

Dear Ramzan,

The ifort warning appears because your COMPOPTS variable doesn’t contain spaces between the various compiler switches. Your code: SET COMPOPTS=/threads/O2/inline:speed/traceback/Qzero/Qsave/real_size:32/assume:byterecl should instead be: SET COMPOPTS=/threads /O2 /inline:speed /traceback /Qzero /Qsave /real_size:32 /assume:byterecl

However, it looks to me that the bigger issue is these two errors in the NWTC Library’s SysIVF.f90 file:

Apparently your older compiler doesn’t like the “STREAM” access, which is a standard Fortran 2003 feature. I tested this on IVF 10.1 (and it worked) before we moved to the new standard method, but it looks like you have IVF 10.0. So, you can either (1) update your compiler with a newer version or (2) change the ACCESS=‘STREAM’ in SysIVF.f90 as indicated below:

Line 552 for IVF 10.0 >> OPEN( Un, FILE=TRIM( OutFile ), STATUS='UNKNOWN', FORM='BINARY' , ACCESS='SEQUENTIAL', RECL=RecLen , IOSTAT=IOS )
Line 594 for IVF 10.0 >> OPEN( Un, FILE=TRIM( InFile ), STATUS='OLD', FORM='BINARY', IOSTAT=IOS, ACTION='READ' )

Hope that helps.

P.S. Thanks, Mark, for helping to answer some compiling questions!

Dear Mark and Bonnie,

Thanks for the guidance and sorry for late response due to undergoing a scheduled minor surgery.
I have tried your suggestions and got rid of very few initial errors specially connected to SysIVF.90 by trying Bonnie’s (2) Option “change of ACCESS=‘STREAM’”. However still getting the series of errors as in text file attached herewith.

TemporaryOutput.txt (36.2 KB)

I have not yet tried with Bonnie’s (1) option i.e. “update your compiler with a newer version”

Best regards,
Ramzan

Hi Ramzan,

The first error in your file now says it can’t open the compiled ModMesh module file. ModMesh.f90 is a new file in recent versions of the NWTC Library, which wasn’t available when the version of FAST you have was released.

I’d recommend downloading an older version of the NWTC Library and compiling with that… the FAST website should tell you what version it was compiled with.

You can also add the ModMesh.f90 file to the compile script, but the library has undergone a lot of changes recently, and you may have to update a few more things in the code to get it to work.

Dear Bonnie,

Thanks a lot. It worked now by downloading the older version of NWTC_Library as suggested by you.
The compilation takes 3 to 4 minutes in my case.

Best regards,
Ramzan

Hi,

I’m doing my final year proyect. I’m trying to study de forces in the box of a wind turbine offshore. I have to use Fast and ADAMS. First of all, I run a file with the Fast.exe and I get another file with .adm extension that I have to introduce in ADAMS/view. If I open ADAMS with this file and try to run, I have lots of problems with the subroutines.
With the A2AD I run the CompileLinkA2AD.bat and I get de file ADAMS.f90, that I have to compile it to get the .dll that I have to introduce in ADAMS/view. This file, I try to compile it with Force 2.0, but there’s lots of incompatibilities, so I download the Intel Visual Fortran , and the Microsoft Visual Studio 2010. I open de ADAMS.f90 with the Microsoft Visual Studio and I get this error when I try to debugg:

[i][i]Error 2 This number is outside the allowable range for 32-bit signed integers C:\Documents and Settings\Lucia\Mis documentos\Visual Studio 2010\Projects\ConsoleApplication2\ConsoleApplication2\Program.fs 358 34 ConsoleApplication2

I don’t know what I have to do. I don’t know if I have to do other things to can run the ADAMS/view with the Fast files. I don´t know if the file that i get with A2AD is not the correct and I have to find other. I don´t know how to compile well.

Somebody could help me, please?

Thanks, Lucia.

Lucia,

Compiling the DLL for Adams can be tricky because you need to make sure all of the versions of the software you are linking together are compatible. The CompileLinkA2AD.bat script is designed to compile the A2AD/AeroDyn/InflowWind/NWTC Subroutine library (etc) source files and link them with Adams files to create a DLL. You should not compile the Adams.f90 file in Visual Studio.

Which versions of FAST and Adams are you using?

Boniie,

First of all thanks. I’m using the Adams 2005, the Intel Visual Fortran 2013, and the Fast, I’m using the last version that you can dowloand.

Other problem that I have is the wind files. When I edit the compile_ Fast.bat I have to change the local paths:

SET Wind_Files=
SET Wind_Files=%Wind_Files% “%Wind_Loc%\SharedInflowDefs.f90”
SET Wind_Files=%Wind_Files% “%Wind_Loc%\HHWind.f90”
SET Wind_Files=%Wind_Files% “%Wind_Loc%\FFWind.f90”
SET Wind_Files=%Wind_Files% “%Wind_Loc%\HAWCWind.f90”
SET Wind_Files=%Wind_Files% “%Wind_Loc%\FDWind.f90”
SET Wind_Files=%Wind_Files% “%Wind_Loc%\CTWind.f90”
SET Wind_Files=%Wind_Files% “%Wind_Loc%\UserWind.f90”
SET Wind_Files=%Wind_Files% “%Wind_Loc%\InflowWindMod.f90”

But when I downloaded Fast with its files, the wind file is called by the turbSim and there isn’t the same files that in the wind files, so I dont know if I have to change everything.

Hi, Lucia.

I do not think Adams 2005 will work with IVF 2013. You will probably have to use an older version of the compiler (or ask the support personel at MSC.Adams if they can help). We use Adams 2008 with IVF 10.1 and/or 11.1. We have had trouble using IVF 12 because the compiler uses some libraries that Adams doesn’t know about when it tries to link everything together.

The wind files mentioned in the compile script are found in the InflowWind archive; they are not TurbSim source files. The instructions in the first post of this thread show you which lines in the Compile_FAST.bat script that you will have to change. You shouldn’t have to change any other lines.

Hope that helps.

Thanks Bonnie, it’s perfect that you help me.

When I run de compilelinkA2AD.bat appears the file ADAMS.f90, is this that I have to compile to create a .dll? I try to open with de Microsoft Visual studio, but I have lots of problems so I think that you’re right and the problems is the incompatibility of the programs. Do you know other way to do it?

Thats so much.

The ADAMS2AD CompileLinkA2AD.bat script does several things:

[]Sets up the paths and variables that are necessary when you call the Intel Fortran Compiler compiler from the command line,[/]
[]Concatenates all of the source files that are needed into two files: (1) Adams.f90, which contains all of the free-format Fortran files and (2) Adams.f, which contains the fixed-format Fortran files,[/]
[]Compiles Adams.f90 and Adams.f (using the Intel Fortran Compiler) to create the object files Adams.obj and Adamsf.obj,[/]
[]Links Adams.obj and Adamsf.obj with Adams libraries (which is done by calling Adams 2008r1) to create the DLL (called Adams08r1.dll unless you change it in CompileLinkA2AD.bat), and[/]
[*]Deletes the intermediate files that are created when compiling (i.e., deletes all of the *.mod and .obj files).[/]
All of the compiling and linking is done in this script–you do not have to open Visual Studio at all.

You need to have compatible versions of Adams and the IVF compiler, otherwise you will just be frustrated and wasting time with this. I think you should be able to use Adams 2005, but you will have to change CompileLinkA2AD.bat to use it instead of Adams 2008r1. And as I mentioned earlier, you will need an older version of the compiler (I think IVF 10.1 will work).

If you can use Adams 2008 and aren’t making changes to any of the A2AD source code, you can use the dlls supplied in the A2AD archive instead of trying to compile them.