OpenFAST / openfast

Main repository for the NREL-supported OpenFAST whole-turbine and FAST.Farm wind farm simulation codes.
http://openfast.readthedocs.io
Apache License 2.0
694 stars 458 forks source link

Errors Building OpenFAST with Visual Studio 2015 Community Edition #368

Closed andreowhite closed 4 years ago

andreowhite commented 4 years ago

When building OpenFAST using VS 2015 I get 98 errors as follows and need some help:

Link /OUT:"....\build\bin\openfast_Win32_Debug.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST:NO /DEBUG /PDB:"C:\Users\awhite15\AndreOpenFast\openfast\build\bin\openfast_Win32_Debug.pdb" /SUBSYSTEM:CONSOLE /STACK:9999999 /LARGEADDRESSAWARE /IMPLIB:"C:\Users\awhite15\AndreOpenFast\openfast\build\bin\openfast_Win32_Debug.lib" -qm32 /qoffload-ldopts="-mkl=sequential" "Debug\FAST_Prog.obj" "C:\Users\awhite15\AndreOpenFast\openfast\build\bin\FASTlib_Win32_Debug.lib" mkl_core.lib(ilaenv.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx512_dgetrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx2_dgetrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx_dgetrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m3_dgetrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m_dgetrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4_dgetrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx512_sgetrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx2_sgetrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx_sgetrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m3_sgetrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m_sgetrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4_sgetrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx512_dgetrs_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx2_dgetrs_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx_dgetrs_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m3_dgetrs_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m_dgetrs_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4_dgetrs_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx512_sgetrs_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx2_sgetrs_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx_sgetrs_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m3_sgetrs_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m_sgetrs_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4_sgetrs_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx512_dgetri_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx2_dgetri_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx_dgetri_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m3_dgetri_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m_dgetri_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4_dgetri_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx512_sgetri_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx2_sgetri_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx_sgetri_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m3_sgetri_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m_sgetri_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4_sgetri_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx512_dgesvd_square_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx2_dgesvd_square_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx_dgesvd_square_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m3_dgesvd_square_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m_dgesvd_square_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4_dgesvd_square_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx512_sgesvd_square_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx2_sgesvd_square_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx_sgesvd_square_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m3_sgesvd_square_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m_sgesvd_square_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4_sgesvd_square_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx512_dpotrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx2_dpotrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx_dpotrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m3_dpotrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m_dpotrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4_dpotrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx512_spotrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx2_spotrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx_spotrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m3_spotrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m_spotrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4_spotrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_sequential.lib(dtrtri_seq.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_sequential.lib(strtri_seq.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx512_dgeqrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx2_dgeqrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx_dgeqrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m3_dgeqrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m_dgeqrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4_dgeqrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx512_sgeqrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx2_sgeqrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx_sgeqrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m3_sgeqrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m_sgeqrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4_sgeqrf_small.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(dlarfgn.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(slarfgn.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx_dtrsm_lun.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx_dtrsm_lln.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx_dtrsm_lut.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_avx_dtrsm_llt.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m3_dtrsm_lun.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m3_dtrsm_lln.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m3_dtrsm_lut.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m3_dtrsm_llt.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_cnr_p4_dtrsm_lun.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_cnr_p4_dtrsm_lln.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_cnr_p4_dtrsm_lut.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_cnr_p4_dtrsm_llt.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m_dtrsm_lun.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m_dtrsm_lln.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m_dtrsm_lut.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4m_dtrsm_llt.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4_dtrsm_lun.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4_dtrsm_lln.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4_dtrsm_lut.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) mkl_core.lib(_p4_dtrsm_llt.obj) : error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj) ....\build\bin\openfast_Win32_Debug.exe : fatal error LNK1169: one or more multiply defined symbols found

Andre

andreowhite commented 4 years ago

Hello:

I have tried to build OpenFAST using VS 2019 and another PC and I have the following errors. Can someone please assist with solving as I am new to this kind of work. See output below:

Build Log
  

Build started: Project: FAST, Configuration: Release|x64

Output
  
Performing Pre-Build Event...
..\CreateGitVersion.bat
'git' is not recognized as an internal or external command,
operable program or batch file.
'git' is not recognized as an internal or external command,
operable program or batch file.
Unversioned from $Format:IncludeFile

Compiling with Intel(R) Visual Fortran Compiler 19.0.5.281 [Intel(R) 64]...
ifort /nologo /O2 /Qipo /fpp /I"C:\Users\Andre\AndreOpenFast\openfast\vs-build\FASTlib\x64\Release" /stand:f03 /Qdiag-disable:5268,5199 /module:"x64\Release\\" /object:"x64\Release\\" /Fd"x64\Release\vc160.pdb" /libs:static /threads /Qmkl:sequential /c /Qlocation,link,"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\bin\HostX64\x64" /Qm64 "C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90"
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(34): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [FAST_SUBS]
USE FAST_Subs   ! all of the ModuleName and ModuleName_types modules are inherited from FAST_Subs
----^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(39): error #6683: A kind type parameter must be a compile-time constant.   [DBKI]
REAL(DbKi),             PARAMETER     :: t_initial = 0.0_DbKi                    ! Initial time
-----^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(39): warning #8586: Implicit type is given to allow out-of-order declaration. Non-standard extension.   [DBKI]
REAL(DbKi),             PARAMETER     :: t_initial = 0.0_DbKi                    ! Initial time
--------------------------------------------------------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(39): error #6592: This symbol must be a defined parameter, an enumerator, or an argument of an inquiry function that evaluates to a compile-time constant.   [DBKI]
REAL(DbKi),             PARAMETER     :: t_initial = 0.0_DbKi                    ! Initial time
--------------------------------------------------------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(39): error #6975: A kind-param must be a digit-string or a scalar-int-constant-name.   [DBKI]
REAL(DbKi),             PARAMETER     :: t_initial = 0.0_DbKi                    ! Initial time
--------------------------------------------------------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(40): error #6683: A kind type parameter must be a compile-time constant.   [INTKI]
INTEGER(IntKi),         PARAMETER     :: NumTurbines = 1
--------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(43): error #6457: This derived type name has not been declared.   [FAST_TURBINETYPE]
TYPE(FAST_TurbineType)                :: Turbine(NumTurbines)                    ! Data for each turbine instance
-----^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(45): error #6683: A kind type parameter must be a compile-time constant.   [INTKI]
INTEGER(IntKi)                        :: i_turb                                  ! current turbine number
--------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(46): error #6683: A kind type parameter must be a compile-time constant.   [INTKI]
INTEGER(IntKi)                        :: n_t_global                              ! simulation time step, loop counter for global (FAST) simulation
--------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(47): error #6683: A kind type parameter must be a compile-time constant.   [INTKI]
INTEGER(IntKi)                        :: ErrStat                                 ! Error status
--------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(53): error #6683: A kind type parameter must be a compile-time constant.   [INTKI]
INTEGER(IntKi)                        :: Restart_step                            ! step to start on (for restart)
--------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(159): error #6683: A kind type parameter must be a compile-time constant.   [INTKI]
      INTEGER(IntKi), INTENT(IN)           :: ErrID       ! The error identifier (ErrStat)
--------------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(164): error #6683: A kind type parameter must be a compile-time constant.   [INTKI]
      integer(IntKi)                       :: i_turb2
--------------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(59): error #6404: This name does not have a type, and must have an explicit type.   [PROGNAME]
   ProgName = 'OpenFAST'
---^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(59): warning #6931: Fortran 2003 does not allow this assignment statement.   ['OpenFAST']
   ProgName = 'OpenFAST'
--------------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(62): error #6632: Keyword arguments are invalid without an explicit interface.   [FLAG]
   CALL CheckArgs( CheckpointRoot, ErrStat, Flag=FlagArg )  ! if ErrStat /= ErrID_None, we'll ignore and deal with the problem when we try to read the input file
--------------------------------------------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(65): error #6404: This name does not have a type, and must have an explicit type.   [TURBINE]
      CALL FAST_RestoreFromCheckpoint_Tary(t_initial, Restart_step, Turbine, CheckpointRoot, ErrStat, ErrMsg  )
--------------------------------------------------------------------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(106): warning #6187: Fortran 2003 requires an INTEGER data type in this context.   [N_TMAX_M1]
   DO n_t_global = Restart_step, Turbine(1)%p_FAST%n_TMax_m1 
---------------------------------------------------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(112): error #6363: The intrinsic data types of the arguments must be the same.   [MOD]
      IF (mod(n_t_global, Turbine(1)%p_FAST%n_ChkptTime) == 0 .AND. Restart_step /= n_t_global) then
--------------------------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(113): error #6362: The data types of the argument(s) are invalid.   [TRIM]
         CheckpointRoot = TRIM(Turbine(1)%p_FAST%OutFileRoot)//'.'//TRIM(Num2LStr(n_t_global))
-------------------------------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(113): error #6404: This name does not have a type, and must have an explicit type.   [NUM2LSTR]
         CheckpointRoot = TRIM(Turbine(1)%p_FAST%OutFileRoot)//'.'//TRIM(Num2LStr(n_t_global))
-------------------------------------------------------------------------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(113): error #6362: The data types of the argument(s) are invalid.   [TRIM]
         CheckpointRoot = TRIM(Turbine(1)%p_FAST%OutFileRoot)//'.'//TRIM(Num2LStr(n_t_global))
-------------------------------------------------------------------------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(116): error #6404: This name does not have a type, and must have an explicit type.   [ABORTERRLEV]
            IF(ErrStat >= AbortErrLev .and. AbortErrLev >= ErrID_Severe) THEN
--------------------------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(116): error #6404: This name does not have a type, and must have an explicit type.   [ERRID_SEVERE]
            IF(ErrStat >= AbortErrLev .and. AbortErrLev >= ErrID_Severe) THEN
-----------------------------------------------------------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(117): error #6363: The intrinsic data types of the arguments must be the same.   [MIN]
               ErrStat = MIN(ErrStat,ErrID_Severe) ! We don't need to stop simulation execution on this error
-------------------------------------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(118): error #6404: This name does not have a type, and must have an explicit type.   [NEWLINE]
               ErrMsg = TRIM(ErrMsg)//Newline//'WARNING: Checkpoint file could not be generated. Simulation continuing.'
--------------------------------------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(118): error #6054: A CHARACTER data type is required in this context.   [NEWLINE]
               ErrMsg = TRIM(ErrMsg)//Newline//'WARNING: Checkpoint file could not be generated. Simulation continuing.'
--------------------------------------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(148): error #6404: This name does not have a type, and must have an explicit type.   [ERRID_NONE]
      CALL ExitThisProgram_T( Turbine(i_turb), ErrID_None, i_turb==NumTurbines )
-----------------------------------------------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(39): error #6404: This name does not have a type, and must have an explicit type.   [DBKI]
REAL(DbKi),             PARAMETER     :: t_initial = 0.0_DbKi                    ! Initial time
--------------------------------------------------------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(168): error #6054: A CHARACTER data type is required in this context.   [NEWLINE]
         CALL WrScr( NewLine//TRIM(Msg)//NewLine )
---------------------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(168): error #6054: A CHARACTER data type is required in this context.   [NEWLINE]
         CALL WrScr( NewLine//TRIM(Msg)//NewLine )
-----------------------------------------^
C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90(174): error #6837: The leftmost part-ref in a data-ref can not be a function reference.   [TURBINE]
               SimMsg = 'at simulation time '//TRIM(Num2LStr(Turbine(1)%m_FAST%t_global))//' of '//TRIM(Num2LStr(Turbine(1)%p_FAST%TMax))//' seconds'
-------------------------------------------------------------^
C:\Users\Andre\AppData\Local\Temp\160013.i90(191): catastrophic error: Too many errors, exiting
compilation aborted for C:\Users\Andre\AndreOpenFast\openfast\glue-codes\openfast\src\FAST_Prog.f90 (code 1)

FAST - 30 error(s), 3 warning(s)
andrew-platt commented 4 years ago

Which version of intel fortran are you using? And which version of OpenFAST are you trying to compile?

The errors in your first post look suspiciously like two versions of the intel MKL (math kernel library) are getting linked simultaneously. Perhaps @rafmudaf has some insight into this.

andreowhite commented 4 years ago

The version of intel Fortran I am using is the one that comes with Intel Parallel XE 2019. I am not sure which version of OpenFAST tbh. I just cloned it from the GitHub site.

bjonkman commented 4 years ago

I think the issue with your second build is because you checked out a copy of OpenFAST using git, then moved it to a PC that doesn't have git installed. It looks like that is causing an issue with the CreateGitVersion.bat file. You can edit it to get around that issue: open the file vs-build\CreateGitVersion.bat in a text editor and replace $Format:%H$ on line 7 with the text unknown.

Also, I would guess that it is the Intel Fortran version that is the issue with the original problem you reported. I have occasionally seen this error when building debug versions of code with the 2019 Intel compiler you are using. I have seen it in some OpenFAST-releated driver codes, but not in the main FAST executable. I think there is a bug related to the 2019 Intel compilers using the sequential MKL and debug static libraries.

I would first check that you have the latest OpenFAST code, in case the issue has been fixed (my current development branch builds fine in Debug mode with static libraries, even with "rebuild"). If that does not fix the problem, you may have to build with dynamic libraries. For both the FAST and FASTlib projects:

  • Right click on the project, and select Properties
  • Make sure the configuration is set to Debug.
  • Select Configuration Properties->Fortran->Libraries.
  • In the RunTime Library pull-down menu, select Debug Multithread DLL. image image
andreowhite commented 4 years ago

Thank you Bonnie. With the second build issue I sent I replaced the text with unknown as you have said and that worked. For the first one I changed to Debug Multithreaded DLL and that worked. For this first one I got this at the end.

5>Build log written to "file://C:\Users\awhite15\AndreOpenFast\openfast\vs-build\FAST\Debug\BuildLog.htm" 5>FAST - 0 error(s), 0 warning(s) ========== Build: 4 succeeded, 0 failed, 0 up-to-date, 1 skipped ========== I think that means it was successful but I am just sending to confirm.

andreowhite commented 4 years ago

Bonnie when I tried to open the openfast_Win32_Debug.exe file I get an error: The application was unable to start correctly (0xc000007b). Not sure if you have a fix for this. Nonetheless I am doing some reading up which might see me reinstalling C++ and openfast.

andreowhite commented 4 years ago

Bonnie I have tried many things: 1) Restarted computer

2) Update the .NetFramework

3) Updated Windows

4) Tried to run in compatibility mode

5)Inserted LoadAppinit_dlls string in WindowsNT registry for the application

But still have the problem. I do not have permission to check disk so I did not do that.

bjonkman commented 4 years ago

Yes, it looks like it did build successfully. However, if it can't run, there are two things I would check:

  1. Since you have now built with the dynamic libraries, it will need to find those libraries when the executable runs. If you run the code on the same computer you built it on, use the Intel Parallel Studio 2019 command prompt where the environment variables are set. Otherwise, make sure you have installed the redistributable libraries for the compiler: https://software.intel.com/en-us/articles/redistributable-libraries-for-intel-c-and-fortran-2019-compilers-for-windows Usually if this is the problem, it will tell you it can't find a dll.

  2. What I think is more likely is that your system may not have enough memory for the specified stack space. I would try to change the stack reserve size (open the FAST project properties, then select Configuration Properties->Linker->System and change the number listed by Stack Reserve Size). Reduce it by an order of magnitude or two, rebuild, and see if that helps. Reducing this number may limit the size of models that you can simulate, but it is worth a try. image

bjonkman commented 4 years ago

FYI, Intel says they are going to fix this issue with debug static linking in MKL 2020. Here is another potential workaround: https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/805616

andreowhite commented 4 years ago

Thanks Bonnie.

  • For the Debug File I used x64_Debug instead of Win32_Debug and that worked.
  • When I realized that worked, I reinstalled OpenFAST and used the static libarary and the build was done successfully.

I have a few questions as I try to understand:

  1. For TESTING OpenFAST I did not see where a unit test can be performed with Visual Studio, please clarify?
  2. Do I need to download Math Libraries separately? If yes, where should I save them?
  3. I have downloaded the binaries, which folder should I save them?
  4. Also do I need to compile MatPlotLib?

In essence I would like to find out if there is a way to test OpenFAST with Visual Studio similar to building it.

Thank you.

andreowhite commented 4 years ago

I will await your response before attempting to carry out the regression test with Visual Studio.

bjonkman commented 4 years ago

I have used the python file reg_tests/manualRegressionTest.py to run regression test cases and compare to baselines, but @rafmudaf or @andrew-platt would be better able to answer questions about testing OpenFAST.

andrew-platt commented 4 years ago

The regression tests are all python based, so I'm not sure if there is a good way to run those from VS. The script @bjonkman mentioned requires python 3 with the matplotlib libraries (this can be installed using the pip3 package manager for python 3).

I usually run the regression tests using ctest, though I rarely run them on Windows since most of my development work is Mac and Linux based. @rafmudaf may have some additional suggestions for other ways to run the test suite on Windows.

andreowhite commented 4 years ago

@bjonkman thanks and noted; can you please respond to questions 2 and 3 as well; where to save.

@andrew-platt the manual sets out how to run the regression with VS and it involves using Python; I am fine with that. I am sorry that I was not clear but what I was asking is if there is any way to carry out unit test in VS. Based on the responses, I think the answer is No. So I will proceed as outlined in OpenFAST vs 2.1.0 manual. Thank you.

bjonkman commented 4 years ago

@andreowhite I am not sure I understand which libraries and binaries you are asking about in 2 and 3. Are you talking about the MKL (math kernel library)? That is included with the Intel compiler, so that wouldn't need to be downloaded again. If you've downloaded the redistributable libraries for the compiler, I think it has an installer that will save them in the appropriate places. Otherwise, just make sure they are somewhere on your Windows path.

andreowhite commented 4 years ago

@bjonkman Thanks. I was referring to the BLAS/LAPACK Math libraries but if I have the MKL, I am assuming that is sufficient. Wit regard to the binaries I downloaded a folder called windows_openfast_binaries which is referred to in the openFAST manual. The folder contains:

  • DISCON_DLSS folder with DISCON.dll, DISCON_ITIBarge.dll,DISCON_OC3Hywind.dll
  • MAP_Win32.dll
  • MAPx64.dll
  • openfast_Win32 application
  • openfast_x64 application
  • opefast_x64_Double Not sure if I have these already or if they will be needed and I just need to locate when needed.
bjonkman commented 4 years ago

Yes, if you have MKL, you don't need any additional BLAS/LAPACK libraries.

The applications and MAP dlls are generated when you build using visual studio, so you probably don't need those binaries (If you just want to run the code without building it, you could use those executables instead.) It doesn't matter where you put those; just make sure the MAP dlls are located in the same directory as the openfast application files.

The DISCON dlls are required if you are going to run the OpenFAST regression tests of the NREL 5MW turbine. So, I'd recommend that you put them in the <openfast>\reg_tests\r-test\glue-codes\openfast\5MW_Baseline\ServoData directory. Alternatively, you could build them using the <openfast>\vs-build\Discon\Discon.sln file in Visual Studio.

andreowhite commented 4 years ago

Thank you. The r-test folder is empty. Is it that I have to create the other folders or is something missing from that folder? Also I am trying to understand how to configure CMake but making an error. Please clarify for me:

  • Where is the source code? Is this my openfast folder where all installation files are?
  • Where to build the binaries? Is this the buld folder in openfast\build?

This is supposed to be basic but it's pretty new to me. Also are the binaries the location where executable files are stored and are they atumoatically created?

andreowhite commented 4 years ago

Or should the source code be where CMake was installed and binaries can be at another location of my choosing.

andreowhite commented 4 years ago

Hello @bjonkman not sure if you had chance to look at my last two queries that I made yesterday. Would be most grateful if you could respond.

Thank you.

bjonkman commented 4 years ago

Hi @andreowhite. The source code is part of the OpenFAST git repository, mostly located in the modules and glue-codes directories. I have not worked with cmake in OpenFAST for some time; @andrew-platt and @rafmudaf would be better able to answer those questions.

rafmudaf commented 4 years ago

@andreowhite The r-test directory is a git-submodule, so you have to do an additional command to populate it: https://openfast.readthedocs.io/en/master/source/testing/index.html#configuring-the-test-suite.

As for CMake, the "source" directory is the root directory for the OpenFAST project. This is the highest level directory that contains modules, glue-codes, and, most importantly in this case, the primary CMakeLists.txt. And yes, the build folder is openfast/build.

andreowhite commented 4 years ago

Thank you very much @bjonkman and @rafmudaf .