网络书屋(Web Reading Room)

A blogging framework for hackers.

Ubuntu17.04 Install FAST8.16

Something Noted in the process of installation FAST8.16 in the 32bit ubuntu17.04 system.

1. Download Fast8.16 and decompress

1
2
3
4
mkdir FAST-816
cd FAST-816
mv FAST*.tar.gz FAST-816
tar -xvf FAST*.tar.gz

2. Download Map for generating map.so and decompress

FAST_DIR 告诉MAP FAST项目存在哪里

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
cd FAST-816
mkdir LIBMAP
cd LIBMAP
mv ../../*.MAP*.tar.gz .
tar -xvf *MAP*.tar.gz

cd compiling
vim driver_makefile<<EOF

----- FAST_DIR     = ../Source
+++++ FAST_DIR     = /paper/FAST-816/

EOF

cd ../src/

vim makefile<<EOF

----- BITS = -m64
+++++ BITS = -m32  32bit系统

EOF

make#################something error here

make Libmap.so something error here

1
2
3
4
5
6
a.o mapinit.o maperror.o lineroutines.o numeric.o outputstream.o mapapi.o lmroutines.o jacobian.o residual.o  -lm -llapacke 
/usr/bin/ld: 找不到 -llapacke
/usr/bin/ld: 找不到 -llapacke
collect2: error: ld returned 1 exit status
makefile:81: recipe for target 'all' failed
make: *** [all] Error 1

fixed it:

1
apt-get install lapacke-dev*

make again

1
2
3
4
make ### OK generate libmap-1.2.so

mkdir /paper/FAST-816/bin
cp libmap-1.20.10.so /paper/FAST-816/bin

3. Now Install FAST

1
2
3
cd /paper/FAST-816/compiling/
make 
make -f makefile_DISCON_DLL ## for Test18-26.fst case

gcc -fbacktrack FAST_Subs 可能再gcc-6会有点问题,部分f90文件得删除该选项 删掉-fbacktrace测试通过

1
2
3
4
5
6
7
8
 2 ❯ make
gfortran -I Obj_lin32 -O2 -m32 -fbacktrace -ffree-line-length-none -x f95-cpp-input -DNO_LibLoad -DUSE_DLL_INTERFACE -c ../Source/FAST_Subs.f90 -o Obj_lin32/FAST_Subs.o -J Obj_lin32 -B Obj_lin32
gfortran: internal compiler error: 已杀死 (program f951)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions.
makefile:416: recipe for target 'FAST_Subs.o' failed
make: *** [FAST_Subs.o] Error 4

4. Run Test1-18.fst

You can go to /paper/FAST-816/bin to check whether FAST_Glin32 and libmap.so have been generated or not

1
2
cd /paper/FAST-816/bin

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
❯ ./FAST_glin32 ../CertTest/Test02.fst

 **************************************************************************************************
 FAST (v8.16.00a-bjj, 27-Jul-2016)

 Copyright (C) 2016 National Renewable Energy Laboratory

 This program comes with ABSOLUTELY NO WARRANTY. See the "license.txt" file distributed with this
 software for details.
 **************************************************************************************************

  Running FAST (v8.16.00a-bjj, 27-Jul-2016), compiled as a 32-bit application using single
  precision
  linked with NWTC Subroutine Library (v2.09.00, 23-Jul-2016)

  Heading of the FAST input file:
    FAST Certification Test #02: AWT-27CR2 with many DOFs with startup and shutdown and steady wind

  Running ElastoDyn (v1.04.00a-bjj, 26-Jul-2016).

  Running AeroDyn (v15.03.00, 27-Jul-2016).

  Running AirfoilInfo (v1.01.00a-bjj, 5-Apr-2016).

  Running BEM (v1.02.00, 29-Jun-2016).

  Running InflowWind (v3.03.00, 26-Jul-2016).
  Opening InflowWind input file:  ../CertTest/AWT27/Test02_InflowWind.dat

  Running ServoDyn (v1.06.00a-bjj, 26-Jul-2016).
  Timestep: 0 of 20 seconds.

 Timestep: 2 of 20 seconds. Estimated final completion at 16:05:13.                               
 Timestep: 4 of 20 seconds. Estimated final completion at 16:05:12.    

5. Modify the ServoData for servo module

DISON_DLL running 因为FAST在运行Test18-26.fst的case时候会去读取5MW_BASELINE[只针对的是5MW]底下的ServoData的文件, 所以对应dll-filename得修改一下。

  1. make DISCON SO file
1
2
3
4
❯ make -f makefile_DISCON_DLL
gfortran  -O2 -m32 -fbacktrace -ffree-line-length-none -x f95-cpp-input -C -DIMPLICIT_DLLEXPORT -fPIC -c ../CertTest/5MW_Baseline/ServoData/Source/DISCON.f90 -o Obj_lin32/DISCON.obj -J Obj_lin32 -B Obj_lin32
gfortran -shared -O2 -m32 -fbacktrace -fPIC -I Obj_lin32 -o ../CertTest/5MW_Baseline/ServoData/DISCON_glin32.so \
 Obj_lin32/DISCON.obj
  1. Change DLL_FileName in the configure data file
1
2
3
4
cd /paper/FAST-816/CertTest/5MW_Baseline
vim NRELOffshrBsline5MW_Onshore_ServoDyn.dat 

修改DLL_FileName为 ServoData/DISCON_glin32.so

Test RESULT:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
  Running BeamDyn (v1.01.04, 26-Jul-2016).

  Running AeroDyn (v15.03.00, 27-Jul-2016).

  Running AirfoilInfo (v1.01.00a-bjj, 5-Apr-2016).

  Running BEM (v1.02.00, 29-Jun-2016).
 Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0.  BladeNode = 1, Blade = 1
 Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0.  BladeNode = 2, Blade = 1
 Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0.  BladeNode = 3, Blade = 1
 Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0.  BladeNode = 4, Blade = 1
 Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0.  BladeNode = 1, Blade = 2
 Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0.  BladeNode = 2, Blade = 2
 Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0.  BladeNode = 3, Blade = 2
 Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0.  BladeNode = 4, Blade = 2
 Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0.  BladeNode = 1, Blade = 3
 Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0.  BladeNode = 2, Blade = 3
 Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0.  BladeNode = 3, Blade = 3
 Warning: Turning off Unsteady Aerodynamics because C_nalpha is 0.  BladeNode = 4, Blade = 3

  Running InflowWind (v3.03.00, 26-Jul-2016).
  Opening InflowWind input file:  ../CertTest/5MW_Baseline/NRELOffshrBsline5MW_InflowWind_12mps.dat

    Reading a 31x31 grid (145 m wide, 17.5 m to 162.5 m above ground) with a characteristic wind
    speed of 12 m/s. This full-field file was generated by TurbSim (v1.06.00, 21-Sep-2012) on
    07-Jan-2014 at 12:50:45.

    Processed 1442 time steps of 20-Hz full-field data (72.05 seconds).

  Running ServoDyn (v1.06.00a-bjj, 26-Jul-2016).

  Running ServoDyn Interface for Bladed Controllers (using GNU Fortran for Linux, 14-Oct-2015).
  Timestep: 0 of 20 seconds.

 FAST_Solution0:CalcOutputs_And_SolveForInputs:SolveOption2:SrvD_CalcOutput:Running with torque
 and pitch control of the NREL offshore 5MW baseline wind turbine from DISCON.dll as written by J.
 Jonkman of NREL/NWTC for use in the IEA Annex XXIII OC3 studies.


 Timestep: 1 of 20 seconds. Estimated final completion at 16:20:36.                               

Okay, All things have been done.

Happy FAST programming.