ADAMS2008 and AeroDyn?

Dear all,

I met a problem while creating a ADAMS.dll. The version of codes used is attached below.
IVF 2011
ADAMS 2013
FAST v7.02
AeroDyn v13
A2AD v13.01
I set the correct paths for the NWTC_lib, Aerodyn, FAST, Wind_loc, A2AD. But I don’t know how to set the compiler options (COPTS) correctly.
I attached my CompileLinkA2AD.bat below.

[code]@ECHO OFF

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 …
REM See this forum topic for instructions and help with setting the compiler
REM internal variables in this script:
REM Instructions for Compiling FAST
REM …

IF “%INTEL_SHARED%”==“” CALL “D:\software\IVF\ComposerXE-2011\bin\ipsxe-comp-vars.bat” ia32 vs2010

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

SET ROOT_NAME=ADAMS

REM ----------------------------------------------------------------------------
REM -------------------- LOCAL PATHS ------------------------------------------
REM ----------------------------------------------------------------------------
REM USERS WILL NEED TO EDIT THESE PATHS TO POINT TO FOLDERS ON THEIR LOCAL MACHINES:
REM A2AD_Loc is the location of the ADAMS-to-AeroDyn source files.
REM AeroDyn_Loc is the location of the AeroDyn source files.
REM Wind_Loc is the location of the InflowWind souce files.
REM FAST_LOC is the location of the FAST source files: FFTMod.f90, HydroCalc.f90, fftpack.f, UserSubs.f90, and possibly PitchCntrl_ACH.f90, UserVSCont_KP.f90, and/or BladedDLLInterface.f90.
REM NWTC_Lib_Loc is the location of the NWTC subroutine library files.
REM ----------------------------------------------------------------------------

REM NOTE: DO NOT USE QUOTATION MARKS HERE (AROUND THE PATH NAMES)
REM OR THE FILE CONCATENATION BELOW WILL NOT WORK

SET NWTC_Lib_Loc=C:\Users\XYY\Desktop\ADAMS2AD\A2AD_v13.01.00b-bjj_0\XU creat a DLL\source files\NWTC_Lib_v1.07.02a-mlb\Source
SET AeroDyn_Loc=C:\Users\XYY\Desktop\ADAMS2AD\A2AD_v13.01.00b-bjj_0\XU creat a DLL\source files\AeroDyn
SET Wind_Loc=C:\Users\XYY\Desktop\ADAMS2AD\A2AD_v13.01.00b-bjj_0\XU creat a DLL\source files\InflowWind
SET FAST_Loc=C:\Users\XYY\Desktop\ADAMS2AD\A2AD_v13.01.00b-bjj_0\XU creat a DLL\source files\FAST v7.02
SET A2AD_Loc=C:\Users\XYY\Desktop\ADAMS2AD\A2AD_v13.01.00b-bjj_0\XU creat a DLL\source files\A2AD v13.01

REM ----------------------------------------------------------------------------
REM -------------------- LIST OF ALL SOURCE FILES ------------------------------
REM -------- please note that all source files must have a blank line ----------
REM -------- at the end so that they can be concatenated properly ----------
REM ----------------------------------------------------------------------------

SET NWTC_Files=
SET NWTC_Files=%NWTC_Files% “%NWTC_Lib_Loc%\SingPrec.f90”
SET NWTC_Files=%NWTC_Files% + “%A2AD_Loc%\SysIVF_ADAMS.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%\ModMesh.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 Fixed_Files =
SET Fixed_Files=%Fixed_Files% “%FAST_Loc%\fftpack.f”

SET FAST_Files=
SET FAST_Files=%FAST_Files% “%FAST_Loc%\FFTMod.f90”
SET FAST_Files=%FAST_Files% + “%FAST_Loc%\HydroCalc.f90”
SET FAST_Files=%FAST_Files% + “%A2AD_Loc%\FAST_params.f90”

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

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

GOTO endFASTfiles

:dllFiles
SET FAST_Files=%FAST_Files% + “%FAST_LOC%\UserSubs_forBladedDLL.f90”
SET FAST_Files=%FAST_Files% + “%FAST_LOC%\UserVSCont_KP_forBladedDLL.f90”
SET FAST_Files=%FAST_Files% + “%FAST_LOC%\BladedDLLInterface.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

:endFASTfiles

SET A2AD_Files=
SET A2AD_Files=%A2AD_Files% “%A2AD_Loc%\A2AD_Mod.f90”
SET A2AD_Files=%A2AD_Files% + “%A2AD_Loc%\Adams_subs.f90”

REM echo File list

REM ----------------------------------------------------------------------------
REM ----------- Concatenate them into one file for free-format -----------------
REM ----------- Fortran and one file for fixed-format Fortran -----------------
REM ----------------------------------------------------------------------------

COPY %NWTC_Files% + %Wind_Files% + %AeroDyn_Files% + %FAST_Files% + %A2AD_Files% %ROOT_NAME%.f90
COPY %Fixed_Files% %ROOT_NAME%.f

REM ----------------------------------------------------------------------------
REM ------- SET CREATE OBJECT FILE BASED ON SPECIFIED COMPILER -----------------
REM ----------------------------------------------------------------------------

REM ----------------------------------------------------------------------------
REM --------------------- INTEL VISUAL FORTRAN ---------------------------------
REM --------------------- with Adams 2013 ---------------------------------
REM ----------------------------------------------------------------------------

REM …
REM … set compiler options …
REM …
REM SET COPTS= /c /automatic /architecture:pn4 /Ob2 /MD /Gm /O1 /traceback /real_size:32 /assume:byterecl /stand:f95 /check:bounds
REM SET COPTS= /c /automatic /architecture:pn4 /Ob2 /MD /Gm /Ot /O3 /traceback /real_size:32 /assume:byterecl /stand:f95 /Qdiag-disable:5268

SET COPTS= /c /01 /automatic /architecture:pn4 /Ob2 /MD /Gm /Ot /O3 /traceback /real_size:32 /assume:byterecl /stand:f95 /Qdiag-disable:5268

REM …
REM … compile …
REM …

ECHO.
ECHO Compiling ADAMS2AD and AeroDyn routines to create ADAMS.obj:
ifort %COPTS% /object:%ROOT_NAME%.obj %ROOT_NAME%.f90
ifort %COPTS% /object:%ROOT_NAME%f.obj %ROOT_NAME%.f

REM …
REM … link with Adams …
REM …

ECHO Linking ADAMS2AD and AeroDyn routines with ADAMS 2013:
SET DLLName=%ROOT_NAME%13
IF /I “%1”==“DLL” SET DLLName=%DLLName%_forBladedDLL

CALL D:\software\ADAMS2013\common\mdi.bat ru-st -n cr-user n %ROOT_NAME%.obj %ROOT_NAME%f.obj -n %DLLName%.dll exit < NewLine.txt

GOTO end

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

DEL *.mod
DEL *.obj

SET MyCompiler=
SET DF_LOC=
SET IVF_LOC=
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 DLLName=[/code]
When I run it with a command window, it seemed to be a problem when Linking ADAMS2AD and AeroDyn routines with ADAMS 2013. I attached part of command window file below.

[code]-----------------------------------^
ADAMS.f90(2405): warning #7416: Fortran 95 does not allow this intrinsic procedu
re. [COMMAND_ARGUMENT_COUNT]
IF ( InArg > COMMAND_ARGUMENT_COUNT() ) THEN
----------------^
ADAMS.f90(2415): warning #7416: Fortran 95 does not allow this intrinsic procedu
re. [GET_COMMAND_ARGUMENT]
CALL GET_COMMAND_ARGUMENT( InArg, InFile )
--------^
ADAMS.f90(6056): warning #7847: Allocatable fields of derived types is an extens
ion of Standard F95. [ALPHA]
REAL(ReKi), ALLOCATABLE :: Alpha (:slight_smile:
! The angle of attack vector.
--------------------------------------^
ADAMS.f90(6057): warning #7847: Allocatable fields of derived types is an extens
ion of Standard F95. [CL]
REAL(ReKi), ALLOCATABLE :: Cl (:slight_smile:
! The lift-coefficient vector.
--------------------------------------^
ADAMS.f90(6058): warning #7847: Allocatable fields of derived types is an extens
ion of Standard F95. [CD]
REAL(ReKi), ALLOCATABLE :: Cd (:slight_smile:
! The drag-coefficient vector.
--------------------------------------^
ADAMS.f90(6059): warning #7847: Allocatable fields of derived types is an extens
ion of Standard F95. [CM]
REAL(ReKi), ALLOCATABLE :: Cm (:slight_smile:
! The pitching-moment-coefficient vector.
--------------------------------------^
ADAMS.f90(6060): warning #7847: Allocatable fields of derived types is an extens
ion of Standard F95. [CPMIN]
REAL(ReKi), ALLOCATABLE :: Cpmin (:slight_smile:
! The minimum-pressure-coefficient vector.
--------------------------------------^
ADAMS.f90(6061): warning #7847: Allocatable fields of derived types is an extens
ion of Standard F95. [FTB]
REAL(ReKi), ALLOCATABLE :: FTB (:slight_smile:
! The normal-coefficient divided by the Cn slope at zero lift.
--------------------------------------^
ADAMS.f90(6062): warning #7847: Allocatable fields of derived types is an extens
ion of Standard F95. [FTBC]
REAL(ReKi), ALLOCATABLE :: FTBC (:slight_smile:
! The chordwise-coefficient divided by the Cn slope at zero lift.
--------------------------------------^
ADAMS.f90(6068): warning #7847: Allocatable fields of derived types is an extens
ion of Standard F95. [IND]
INTEGER, ALLOCATABLE :: Ind (:,:slight_smile:
! The tables in this supertable.
--------------------------------------^
ADAMS.f90(6073): warning #7847: Allocatable fields of derived types is an extens
ion of Standard F95. [TAB]
TYPE(AeroTable), ALLOCATABLE :: Tab (:slight_smile:
! The tables in this supertable.
--------------------------------------^
ADAMS.f90(14046): warning #7847: Allocatable fields of derived types is an exten
sion of Standard F95. [BLADE]
TYPE(Marker), ALLOCATABLE :: Blade(:,:slight_smile:
------------------------------------^
ADAMS.f90(14047): warning #7847: Allocatable fields of derived types is an exten
sion of Standard F95. [HUB]
TYPE(Marker), ALLOCATABLE :: Hub(:slight_smile:
------------------------------------^
ADAMS.f90(14048): warning #7847: Allocatable fields of derived types is an exten
sion of Standard F95. [ROTORFURL]
TYPE(Marker), ALLOCATABLE :: RotorFurl(:slight_smile:
------------------------------------^
ADAMS.f90(14049): warning #7847: Allocatable fields of derived types is an exten
sion of Standard F95. [NACELLE]
TYPE(Marker), ALLOCATABLE :: Nacelle(:slight_smile:
------------------------------------^
ADAMS.f90(14050): warning #7847: Allocatable fields of derived types is an exten
sion of Standard F95. [TOWER]
TYPE(Marker), ALLOCATABLE :: Tower(:slight_smile:
------------------------------------^
ADAMS.f90(14051): warning #7847: Allocatable fields of derived types is an exten
sion of Standard F95. [TAIL]
TYPE(Marker), ALLOCATABLE :: Tail(:slight_smile:
------------------------------------^
ADAMS.f90(14055): warning #7847: Allocatable fields of derived types is an exten
sion of Standard F95. [BLADE]
TYPE(Load), ALLOCATABLE :: Blade(:,:slight_smile:
------------------------------------^
ADAMS.f90(14056): warning #7847: Allocatable fields of derived types is an exten
sion of Standard F95. [HUB]
TYPE(Load), ALLOCATABLE :: Hub(:slight_smile:
------------------------------------^
ADAMS.f90(14057): warning #7847: Allocatable fields of derived types is an exten
sion of Standard F95. [ROTORFURL]
TYPE(Load), ALLOCATABLE :: RotorFurl(:slight_smile:
------------------------------------^
ADAMS.f90(14058): warning #7847: Allocatable fields of derived types is an exten
sion of Standard F95. [NACELLE]
TYPE(Load), ALLOCATABLE :: Nacelle(:slight_smile:
------------------------------------^
ADAMS.f90(14059): warning #7847: Allocatable fields of derived types is an exten
sion of Standard F95. [TOWER]
TYPE(Load), ALLOCATABLE :: Tower(:slight_smile:
------------------------------------^
ADAMS.f90(14060): warning #7847: Allocatable fields of derived types is an exten
sion of Standard F95. [TAIL]
TYPE(Load), ALLOCATABLE :: Tail(:slight_smile:
------------------------------------^
ADAMS.f90(14070): warning #7847: Allocatable fields of derived types is an exten
sion of Standard F95. [BLADE]
TYPE(Marker), ALLOCATABLE :: Blade(:slight_smile:
------------------------------------^
ADAMS.f90(20596): warning #7847: Allocatable fields of derived types is an exten
sion of Standard F95. [SETMULTABLOC]
LOGICAL ,ALLOCATABLE :: SetMulTabLoc(:,:slight_smile:
------------------------------------^
ADAMS.f90(20597): warning #7847: Allocatable fields of derived types is an exten
sion of Standard F95. [MULTABLOC]
REAL(ReKi),ALLOCATABLE :: MulTabLoc(:,:slight_smile: ! MulTab
Loc from GetElemParams()
------------------------------------^
ADAMS.f90(25157): warning #5112: Extension to FORTRAN-90: tab formatting
WRITE(*, *)‘LINE 3120’, I
^
ADAMS.f90(25158): warning #7356: The PAUSE statement has been deleted in Fortran
95.
PAUSE
------------------------^
ADAMS.f90(29768): warning #6477: Fortran 95 does not allow this statement or dir
ective.
POINTER ( DLL_ProcAddr, DLL_Procedure )
—^
ADAMS.f90(29768): warning #7028: Integer pointer non-standard
POINTER ( DLL_ProcAddr, DLL_Procedure )
—^
ADAMS.f90(29774): warning #7372: Procedures as pointees is not supported in Fort
ran 95 standard. [DLL_PROCEDURE]
SUBROUTINE DLL_Procedure ( avrSWAP, aviFAIL, accINFILE, avcOUTNAME, avcMSG
)
-----------------^
ADAMS.f90(29908): warning #6233: Fortran 95 does not allow character and nonchar
acter objects to be equivalenced. [CINFILE]
EQUIVALENCE (iInFile , cInFile )
-----------------------^
ADAMS.f90(29908): warning #7165: If an equiv-object is of type other than defaul
t integer, real, double precision, complex, logical, or character, all of the ob
jects in the equiv set must be of the same type with the same kind type paramete
r value. [CINFILE]
EQUIVALENCE (iInFile , cInFile )
-----------------------^
ADAMS.f90(29909): warning #6233: Fortran 95 does not allow character and nonchar
acter objects to be equivalenced. [CMESSAGE]
EQUIVALENCE (iMessage, cMessage)
-----------------------^
ADAMS.f90(29909): warning #7165: If an equiv-object is of type other than defaul
t integer, real, double precision, complex, logical, or character, all of the ob
jects in the equiv set must be of the same type with the same kind type paramete
r value. [CMESSAGE]
EQUIVALENCE (iMessage, cMessage)
-----------------------^
ADAMS.f90(29910): warning #6233: Fortran 95 does not allow character and nonchar
acter objects to be equivalenced. [COUTNAME]
EQUIVALENCE (iOutName, cOutName)
-----------------------^
ADAMS.f90(29910): warning #7165: If an equiv-object is of type other than defaul
t integer, real, double precision, complex, logical, or character, all of the ob
jects in the equiv set must be of the same type with the same kind type paramete
r value. [COUTNAME]
EQUIVALENCE (iOutName, cOutName)
-----------------------^
ADAMS.f90(35395): warning #5199: Too many continuation lines
4101701:4101799, 4102701:4102799, 4103701:4103799, &
------^
Intel(R) Visual Fortran Compiler XE for applications running on IA-32, Version 1
2.0.5.221 Build 20110719
Copyright (C) 1985-2011 Intel Corporation. All rights reserved.
ifort: command line remark #10010: option ‘/automatic’ is deprecated and will be
removed in a future release. See ‘/help deprecated’
ifort: command line remark #10010: option ‘/architecture:pn4’ is deprecated and
will be removed in a future release. See ‘/help deprecated’
ifort: command line remark #10010: option ‘/architecturepn4’ is deprecated and w
ill be removed in a future release. See ‘/help deprecated’

ADAMS.f(24): warning #7373: Fixed form source is an obsolescent feature in Fortr
an 95.
SUBROUTINE RFFTI (N,WSAVE)
^
ADAMS.f(47): warning #6031: The Arithmetic IF statement is an obsolescent featur
e in Fortran 95. Use the IF statement or the IF construct
IF (J-4) 102,102,103
^
ADAMS.f(53): warning #6031: The Arithmetic IF statement is an obsolescent featur
e in Fortran 95. Use the IF statement or the IF construct
IF (NR) 101,105,101
^
ADAMS.f(235): warning #6031: The Arithmetic IF statement is an obsolescent featu
re in Fortran 95. Use the IF statement or the IF construct
IF (IDO-2) 107,105,102
^
ADAMS.f(310): warning #6031: The Arithmetic IF statement is an obsolescent featu
re in Fortran 95. Use the IF statement or the IF construct
IF (IDO-2) 107,105,102
^
ADAMS.f(683): warning #6031: The Arithmetic IF statement is an obsolescent featu
re in Fortran 95. Use the IF statement or the IF construct
IF (N-2) 106,101,102
^
ADAMS.f(857): warning #6031: The Arithmetic IF statement is an obsolescent featu
re in Fortran 95. Use the IF statement or the IF construct
IF (IDO-2) 107,105,102
^
ADAMS.f(928): warning #6031: The Arithmetic IF statement is an obsolescent featu
re in Fortran 95. Use the IF statement or the IF construct
IF (IDO-2) 107,105,102
^
ADAMS.f(1304): warning #6031: The Arithmetic IF statement is an obsolescent feat
ure in Fortran 95. Use the IF statement or the IF construct
IF (N-2) 101,102,103
^
Linking ADAMS2AD and AeroDyn routines with ADAMS 2013:


| … … |
| ####*. ####. |
| ###*. #. MSC Software |
| ###. #. ------------ | | ##. ## |
| ##. ## | | ## ##’ A d a m s C++ S o l v e r |
| #### [Build: 2013.0.0-CL177174] |
| ###. Version: 2013 |
| ####. Patch Version: None | | .### # |
| #### # | | #### #. | | ##### # http://www.mscsoftware.com |
| .##### |
| #####’ |
| #### |
| |
| ********************************************************************* |
| * * |
| * MSC Software Corporation * |
| * * |
| * A d a m s * |
| * * |
| * Automatic Dynamic Analysis of Mechanical Systems * |
| * * |
| ********************************************************************* |
| * * |
| * LEGAL INFORMATION * |
| * * |
| * Warning: This computer program is protected by copyright law * |
| * and international treaties. Unauthorized reproduction or * |
| * distribution of this computer program, or any portion of it, * |
| * may result in severe civil and criminal penalties. * |
| * * |
| * Copyright (C) 2013 MSC Software Corporation and its licensors. * |
| * All rights reserved. * |
| * * |
| * This computer program may contain certain third-party software * |
| * that is protected by copyright and licensed from MSC Software * |
| * suppliers. Portions of this software are owned by UGS Corp. * |
| * (C) Copyright 1997. All Rights Reserved. Portions, (C) 1998 * |
| * Spacetec IMC Corporation (“Spacetec”). * |
| * * |
| * The MSC Software logo, MSC, MSC Adams, MD Adams, Adams and * |
| * Adams/ are trademarks or registered trademarks of MSC Software * |
| * Corporation or its subsidiaries in the United States and/or * |
| * other countries. FLEXlm is a registered trademark of * |
| * Macrovision Corporation. Parasolid is a registered trademark of * |
| * UGS Corp. All other trademarks are the property of their * |
| * respective owners. * |
| * * |
| ********************************************************************* |

*********************************************************************
* *
* Local Time: 2016-04-05 13:40:38 *
* Host Name: XYY-PC *
* Uname: MS Windows NT *
* OS Info: 6.1 *
* User: XYY *
* Customer ID: 2B887301-D14G178B *
* Current dir: C:\Users\XYY\Desktop\ADAMS2AD\A2AD_v13.01.00b-bjj_0\XU crea
t a DLL*
* *
*********************************************************************

command: FILE/COMMAND= ! read commands from standard input
command: command:
command:
command: stop

Finished -----
Elapsed time = 0.00s, CPU time = 0.00s, 0.00%
can’t find C:\Windows*.mod
can’t find C:\Windows*.obj

C:\Windows>[/code]

Please solve this problem for me.

Best regards.
Yingyu.Xu