Recompile DISCON.f90 file

Hello,

I’m trying to learn how to modify the DISCON.f90 file. As a start, I have tryed to change only the power from 5MW to 8MW, but the problem is that I cannot recompile the file to create a “.dll” file because I don’t have neither gfortram or Visual Fortran.

Is there any free software with which I could recompile the “.f90” file to “.dll”?
I have never worked with Fortran and I don’t know how to deal with this.

Thank you all in advance,

You will need a Fortran compiler if you want to make changes to source code. gfortran is free, so if you don’t want to pay for something, I suggest you use that one. If you’re on Windows, you can download the MinGW binaries of gfortran (and other compilers): mingw.org/

Thank you very much for your help, I will try to download a Fortran compiler from that link.

Hello,

I’m trying to recompile the file DISCON.f90. I downloaded gfortran and I used the following command:

$gfortran -c DISCON.f90

And I found the following error:

SUBROUTINE DISCON_sub ( avrSWAP, aviFAIL, accINFILE, avcOUTNAME, avcMSG ) BIND (C, NAME=‘DISCON’)
^
gfortran: error trying to exec ‘as’: execvp: No such file or directory

Could someone help me with this error? I just want to recompile DISCON.f90 to create a .dll file.

Thank you all in advance,
regards

In the compiling directory of the FAST v8 archive is a makefile you can use to compile the DISCON dlls (see makefile_DISCON_DLL). Otherwise, you can just compile with some additional compiling options, such as: gfortran -shared -O2 -m32 -fbacktrace -ffree-line-length-none -x f95-cpp-input -C DISCON.f90

I have compiled the DISCON.f90 using the -m64 instead of -m32 compile option with the gfortran compiler, and now have a DISCON.dll. However, when I run the compiled DISCON with OpenFAST, it fails to find or load the file. Additionally, I have used the CompileDiscon.bat file to generate a 64 -bit DISCON.dll and have run into the same issue when attempting to run it with OpenFAST_x64.exe. Could one of the options be incorrect?

Dear Martin,

Is the path to the DISCON.dll you compiled set correctly in your ServoDyn input file (DLL_FileName)?

Do you have any trouble running OpenFAST with the compiled DISCON.dlls provided for Windows?

Best regards,

Jason,

I believe the path to be correct, and I have been using dll’s compiled via a CMake, VisualStudio, MATLAB2015B (32-bit) procedure. I have never used gfortran before to compile a 64-bit version, as the command string shown above does not work with -m32 option, but does with -m64 option. The compiling process seems to complete just fine, but openFAST is unable to utilize the file.

Dear Martin,

Do you have any trouble running OpenFAST with the compiled DISCON.dlls provided for Windows?

Best regards,