FVW for multiple turbines in OpenFAST/FAST.Farm

@Jason.Jonkman Thanks a lot for your reply, that’s super clear now and it is interesting to have the coupling between OLAF and FAST.Farm in the future :+1:

Just to report, I set up a case recently for multiple-turbines simulation in FAST.Farm based on the r-test case of glue-code/fast-farm/TSinflow and activated OLAF model for rotor aerodynamic loads computation, I got an error as below:

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
==2629== Invalid read of size 8
==2629== at 0x6C96D7: __fastwrapper_MOD_fwrap_calcoutput (FASTWrapper.f90:591)
==2629== by 0x6E0735: __fastwrapper_MOD_fwrap_t0 (FASTWrapper.f90:511)
==2629== by 0x44452F: __fast_farm_subs_MOD_farm_initialco (FAST_Farm_Subs.f90:2050)
==2629== by 0x79CE6E: MAIN __ (FAST_Farm.f90:109)
==2629== by 0x79D13C: main (FAST_Farm.f90:28)
==2629== Address 0x0 is not stack’d, malloc’d or (recently) free’d

At the line FASTWrapper.f90:591,
y%D_rotor = 2.0_ReKi * maxval(m%Turbine%AD%m%rotors(1)%BEMT_u(indx)%rLocal)
! BEMT_u(indx) is calculated on inputs that were passed INTO AD_CalcOutput; Input(1) is calculated from values passed out of ED_CalcOutput AFTER AD_CalcOutput

It seems like rLocal is not allocated in FAST.Farm if we use OLAF to compute aerodynamic loads. If switching to BEMT, everything just works properly. Have you ever seen this problem when using OLAF in FAST.Farm?

Thanks for the discussion.
Best regards,
Wenchao