Questions about Recompile

Dear all:
【Situation】
I tried to compile OpenFAST. The IDE tool is VS 2019. There are no warning or error when debugging. However, When I build the solution, I get a lot of errors. I only changed the code in the file, not linker or include path, etc.
【Tried, but not solved】
1.With reference to OpenFAST recompile problem - #4 by Bonnie.Jonkman, I have confirmed that no problem with the file path.
(To ensure, my file path is ‘“C:\Users\aaa\Desktop\of_a+a_a\openfast-main-a\openfast-main\vs-build\FAST\FAST.sln”’)

2.With reference to OpenFAST recompile problem - #3 by Ruiliang.Wang, I have confirmed the RunRegistry. bat is CRLF format.

Can anybody help me. Thanks!
Best regards!

Dear @KeHao.Qian

Could you tell us how did you compile ?

Did you try to compile the original source code in order to check if the problem was from the code you have modified or from VS ?

Best Regards,

Riad

Dear @ Riad.Elhamoud

Thanks for your help!
Yes, I have compiled the original source code. Nothing wrong happened. So I think the problem was from the code I have modified. But I only changed the code, not linker or include path, etc.

Best Regards,
Kehao

Glad to hear that you found the problem.

Good luck in compiling and in your research !!!

Riad

Dear @Riad.Elhamoud

I’m sorry I wasn’t clear before. Actually, the problem still exists. There is nothing wrong when i compile the original source code, but a lot of errors when i compile the code changed by me.

I want to compile the changed code, but failed. So i still don‘t know what is wrong and how to solve the problem, and i still need help.

Thank you!
Best Regards

Dear @KeHao.Qian ,

That means the code you have written in fortran is not good. You should revise your code.

Best regards,

Riad

Dear @ Riad.Elhamoud

Thanks for your advice and help so much! I have solved the problem.

And I found that all the changes I made to the FAST_Types.f90 were automatically undone. I’m guessing it might have something to do with the registry.txt. Could you please tell me whether my idea is correct, and where I should learn more about the operation mechanism of registry.txt, and how to modify it? Thank you.

Best regards,
Kehao

Dear @KeHao.Qian,

I am glad that you found the source of the problem. But i am sorry, i cannot help you more because i have never faced your problem. In my research, i have changed the source code of OpenFAST but it is very simple change in such a way that i think anyone can do it. Then, i have no problems in recompiling. Further, i dont have experience in recompiling because as i told you i still at the basic level in changing the source code of OpenFAST.

I am so sorry.

Maybe, @Jason.Jonkman can help or anyone from NREL team.

Best Regards,

Riad

Dear @ Riad.Elhamoud

Thank you so much for taking the time to answer my questions. I sincerely wish you good luck in your work and scientific research!

Best regards!
Kehao

1 Like

Dear @KeHao.Qian,

You should never manually edit the _Types.f90 files of OpenFAST, which are automatically generated through execution of the FAST Registry when compiling. To change the _Types.f90 files, you should update the corresponding Registry.txt files, which the Registry makes use of. The Registry.txt files define all of the data structures used within OpenFAST modules (initialization inputs, initialization outputs, inputs, outputs, states, parameters, miscellaneous variables), except for local variables.

Best regards,

Dear @Jason.Jonkman

Thanks for your help!

Bese regards,
Kehao