FAST v8.16.00 on MAC OS v10.12.6

Hello

I’ve tried to compile FAST v8.16 on Mac OS X 10.12.6, with gfortran 6.3.0, following the instructions in the pdf document. Firstly, in MAP using make command instead of creating “libmap-1.20.10.so” file with extension .so, it creates “libmap-1.20.10.dylib” .dylib extension. My first question is does it matter? I continued the procedure with ignoring the extension difference and after creating the FAST Registry.exe an copying libmap-1.20.10 to /usr/lib, I run the command “make” in the /Compiling directory. According to instruction pdf it should generate a file called FAST_glin32 or 64 in the /bin directory.

Although, I’m still unable to compile the code. The following error is seen:


gfortran -framework Accelerate -O2 -m32 -fbacktrace -I Obj_lin32 -o ../bin/FAST_glin32 \
	 Obj_lin32/FAST_Types.o  Obj_lin32/FAST_Mods.o  Obj_lin32/FAST_Solver.o  Obj_lin32/FAST_Lin.o  Obj_lin32/FAST_Subs.o  Obj_lin32/FAST_Prog.o  Obj_lin32/SingPrec.o  Obj_lin32/NWTC_Base.o  Obj_lin32/SysGnuLinux.o  Obj_lin32/NWTC_Library_Types.o  Obj_lin32/NWTC_IO.o  Obj_lin32/NWTC_Num.o  Obj_lin32/ModMesh_Types.o  Obj_lin32/ModMesh.o  Obj_lin32/ModMesh_Mapping.o  Obj_lin32/NWTC_Library.o  Obj_lin32/NWTC_ScaLAPACK.o  Obj_lin32/NWTC_FFTPACK.o  Obj_lin32/NWTC_LAPACK.o  Obj_lin32/fftpack4.1.o  Obj_lin32/dlasrt2.o  Obj_lin32/slasrt2.o  Obj_lin32/NWTC_FitPack.o  Obj_lin32/dierckx_fitpack.o  Obj_lin32/IfW_BladedFFWind_Types.o  Obj_lin32/IfW_BladedFFWind.o  Obj_lin32/IfW_TSFFWind_Types.o  Obj_lin32/IfW_TSFFWind.o  Obj_lin32/IfW_HAWCWind_Types.o  Obj_lin32/IfW_HAWCWind.o  Obj_lin32/IfW_UniformWind_Types.o  Obj_lin32/IfW_UniformWind.o  Obj_lin32/IfW_UserWind_Types.o  Obj_lin32/IfW_UserWind.o  Obj_lin32/InflowWind_Subs.o  Obj_lin32/InflowWind_Types.o  Obj_lin32/Lidar_Types.o  Obj_lin32/Lidar.o  Obj_lin32/InflowWind.o  Obj_lin32/AeroDyn14_Types.o  Obj_lin32/GenSubs.o  Obj_lin32/AeroSubs.o  Obj_lin32/AeroDyn14.o  Obj_lin32/DWM_Types.o  Obj_lin32/DWM.o  Obj_lin32/DWM_Wake_Sub_ver2.o  Obj_lin32/OpenFOAM_Types.o  Obj_lin32/OpenFOAM.o  Obj_lin32/TMD_Types.o  Obj_lin32/TMD.o  Obj_lin32/ServoDyn_Types.o  Obj_lin32/ServoDyn.o  Obj_lin32/PitchCntrl_ACH.o  Obj_lin32/BladedInterface.o  Obj_lin32/UserSubs.o  Obj_lin32/UserVSCont_KP.o  Obj_lin32/ED_UserSubs.o  Obj_lin32/ElastoDyn_Types.o  Obj_lin32/ElastoDyn_IO.o  Obj_lin32/ElastoDyn.o  Obj_lin32/SS_Radiation_Types.o  Obj_lin32/SS_Radiation.o  Obj_lin32/Waves2_Types.o  Obj_lin32/Waves2_Output.o  Obj_lin32/Waves2.o  Obj_lin32/Waves_Types.o  Obj_lin32/UserWaves.o  Obj_lin32/Waves.o  Obj_lin32/Current_Types.o  Obj_lin32/Current.o  Obj_lin32/Morison_Types.o  Obj_lin32/Morison_Output.o  Obj_lin32/Morison.o  Obj_lin32/Conv_Radiation_Types.o  Obj_lin32/Conv_Radiation.o  Obj_lin32/WAMIT2_Types.o  Obj_lin32/WAMIT2_Output.o  Obj_lin32/WAMIT2.o  Obj_lin32/WAMIT_Types.o  Obj_lin32/WAMIT_Interp.o  Obj_lin32/WAMIT_Output.o  Obj_lin32/WAMIT.o  Obj_lin32/HydroDyn_Output.o  Obj_lin32/HydroDyn_Types.o  Obj_lin32/HydroDyn_Input.o  Obj_lin32/HydroDyn.o  Obj_lin32/qsort_c_module.o  Obj_lin32/SD_FEM.o  Obj_lin32/SubDyn_Types.o  Obj_lin32/SubDyn_Output.o  Obj_lin32/SubDyn.o  Obj_lin32/AirfoilInfo_Types.o  Obj_lin32/AirfoilInfo.o  Obj_lin32/UnsteadyAero_Types.o  Obj_lin32/UnsteadyAero.o  Obj_lin32/BEMT_Types.o  Obj_lin32/BEMTUncoupled.o  Obj_lin32/fmin_fcn.o  Obj_lin32/mod_root1dim.o  Obj_lin32/BEMT.o  Obj_lin32/AeroDyn_Types.o  Obj_lin32/AeroDyn_IO.o  Obj_lin32/AeroDyn.o  Obj_lin32/MAP_Types.o  Obj_lin32/MAP.o  Obj_lin32/FEAMooring_Types.o  Obj_lin32/FEAM.o  Obj_lin32/MoorDyn_Types.o  Obj_lin32/MoorDyn_IO.o  Obj_lin32/MoorDyn.o  Obj_lin32/OrcaFlexInterface_Types.o  Obj_lin32/OrcaFlexInterface.o  Obj_lin32/IceFloe_Types.o  Obj_lin32/iceLog.o  Obj_lin32/coupledCrushing.o  Obj_lin32/crushingIEC.o  Obj_lin32/crushingISO.o  Obj_lin32/IceFlexBase.o  Obj_lin32/IceFlexIEC.o  Obj_lin32/IceFlexISO.o  Obj_lin32/IceFloeBase.o  Obj_lin32/iceInput.o  Obj_lin32/intermittentCrushing.o  Obj_lin32/lockInISO.o  Obj_lin32/randomCrushing.o  Obj_lin32/RANLUX.o  Obj_lin32/IceFloe.o  Obj_lin32/IceDyn_Types.o  Obj_lin32/IceDyn.o  Obj_lin32/BeamDyn_Types.o  Obj_lin32/BeamDyn_IO.o  Obj_lin32/BeamDyn_Subs.o  Obj_lin32/BeamDyn.o ../bin/libmap-1.20.10.so  -ldl
gfortran: error: ../bin/libmap-1.20.10.so: No such file or directory
make: *** [../bin/FAST_glin32] Error 1

Any ideas?

Thanks a lot for your help!

This error message indicates that it is looking for a file called …/bin/libmap-1.20.10.so; however you seem to have named that file /usr/lib/libmap-1.20.10.dylib.

You should be able to either copy your file to the location the makefile is looking, or tell the makefile to look for your .dylib file instead.

Thank you Bonnie for your response. I have tried to generate libmap-1.20.10.so by changing the makefile in the map/src folder and move it to /usr/lib directory but still getting the same error. Now I will try to tell makefile in the /Compiling directory to look for my .dylib file instead. To do that which part do I need to change? Changing “MAP_lib = $(BIN_DIR)/libmap-1.20.10.dylib” to “MAP_lib = $(BIN_DIR)/libmap-1.20.10.so” is enough or do I need to change an extra line?

Best Regards.

[code]BIN_DIR = …/bin

Names and locations of the Registry, MAP libraries, and instructions for linking with LAPACK.

You will probably need to change these for your system.

ifeq ($(OS),Windows_NT)

Registry = $(BIN_DIR)/Registry_win32.exe
MAP_lib = $(MAP_DIR)/MAP_win32.lib
LDFLAGS := $(LDFLAGS) -llapack -lblas -LC:/LAPACK/win32
LAPACK_LINK :=

UNAME := $(OS)
else

Registry = $(FAST_DIR)/dependencies/registry.exe
MAP_lib = $(BIN_DIR)/libmap-1.20.10.dylib

 # skip the OrcaFlex interface, which seems to be causing issues with gfortran v5 on Mac (The OrcaFlex DLL is for Windows only, anyway)

FFLAGS := $(FFLAGS) -DNO_LibLoad

UNAME := $(shell uname -s)

ifeq ($(UNAME), Darwin)
# Mac needs some additional flags prepended for linking to get lapack working:
LDFLAGS := -framework Accelerate $(LDFLAGS)
LAPACK_LINK :=
#DLL_EXT := dylib
else
# ifeq ($(UNAME), Linux)
# bjj verify this: # I’ve been told that the lapack linking needs to occur at the end of the line (after all the object files) on linux:
LAPACK_LINK = -llapack -lblas
#DLL_EXT := so
endif

some options to dynamically load .so libraries (loaded when called in ServoDyn) for DLL control

the dl library (-ldl) is used for dynamic libraries; needs to be used in conjunction with preprocessor directive USE_DLL_INTERFACE

FFLAGS := $(FFLAGS) -DUSE_DLL_INTERFACE
LAPACK_LINK := $(LAPACK_LINK) -ldl

endif

[/code]

That should be the only line you have to change. Your $(BIN_DIR) is set to …/bin at the top of that makefile, so I would set

MAP_lib = /usr/lib/libmap-1.20.10.dylib or if you changed it to have a .so extension, you would use

MAP_lib      = /usr/lib/libmap-1.20.10.so

I don’t think the file extension that you choose to use should matter.