# SOWFA FAST compilation error

**URL:** <https://forums.nlr.gov/t/sowfa-fast-compilation-error/454>\
**Category:** Computer-Aided Engineering Software Tools\
**Created:** [February 28, 2012, 5:31pm UTC](https://forums.nlr.gov/t/sowfa-fast-compilation-error/454 "2012-02-28T17:31:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jordan.Wilson](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@Jordan.Wilson](https://forums.nlr.gov/u/Jordan.Wilson)\
**Post date:** [February 28, 2012, 5:31pm UTC](https://forums.nlr.gov/t/sowfa-fast-compilation-error/454/1 "2012-02-28T17:31:55Z")

</div>

I am having difficulty compiling FAST as part of the SOWFA archive for use with the windPlantPisoSolverFAST on both ubuntu and OpenSUSE 11 linux environments. The errors for ubuntu and OpenSUSE, respectively:

…  
gfortran -c …/FAST/Source/fastgetbldpos.f90 -o fastgetbldpos.o  
gfortran -c …/FAST/Source/fastgetbldforce.f90 -o fastgetbldforce.o  
gfortran Precision.o Sys.o NWTC\_IO.o NWTC\_Num.o NWTC\_Aero.o NWTC\_Library.o Blade.o Blades.o SharedInflowDefs.o HHWind.o FFWind.o FDWind.o CTWind.o UserWind.o InflowWindMod.o SharedTypes.o AeroMods.o GenSubs.o AeroSubs.o AeroDyn.o fftpack.o FFTMod.o HydroCalc.o FAST\_Mods.o Noise.o FAST\_IO.o FAST.o FAST\_Lin.o FAST2ADAMS.o PitchCntrl\_ACH.o UserSubs.o UserVSCont\_KP.o AeroCalc.o SetVersion.o FAST\_Prog.o fastinit.o fastrun.o fastend.o fastread.o fastgetbldpos.o fastgetbldforce.o -o FAST

/usr/lib/gcc/x86\_64-linux-gnu/4.6.1/…/…/…/x86\_64-linux-gnu/crt1.o: In function `_start': (.text+0x20): undefined reference to `main’  
collect2: ld returned 1 exit status  
make: \*\*\* [FAST] Error 1  
…

and

/usr/lib/…/lib64/crt1.o: In function `_start': /usr/src/packages/BUILD/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:109: undefined reference to `main’  
collect2: ld returned 1 exit status  
make: \*\*\* [FAST] Error 1

I would greatly appreciate any guidance on this issue.

Thanks,  
Jordan Wilson

---

<div class="post-metadata">

**Author:** ![Sang.Lee](https://avatars.discourse-cdn.com/v4/letter/s/858c86/32.png) [@Sang.Lee](https://forums.nlr.gov/u/Sang.Lee)\
**Post date:** [March 14, 2012, 10:04pm UTC](https://forums.nlr.gov/t/sowfa-fast-compilation-error/454/2 "2012-03-14T22:04:52Z")

</div>

Earlier, I sent an email regarding this issue. The messages are harmless and should compile SOWFA to the end.

However, I cleaned up the code and the make files to eliminate the messages in the newer version (SOWFA v1.0.1-alpha)

[wind.nrel.gov/designcodes/simulators/sowfa/](http://wind.nrel.gov/designcodes/simulators/sowfa/)

-Sang

---

<div class="post-metadata">

**Author:** ![Kutalmis.Bercin](https://avatars.discourse-cdn.com/v4/letter/k/8e7dd6/32.png) [@Kutalmis.Bercin](https://forums.nlr.gov/u/Kutalmis.Bercin)\
**Post date:** [May 14, 2013, 11:04am UTC](https://forums.nlr.gov/t/sowfa-fast-compilation-error/454/3 "2013-05-14T11:04:43Z")

</div>

Hi,

==1==  
I am having difficulty in compiling SOWFA.

The operating system is Ubuntu 12.04.1 LTS - 64-bit.  
The version of OpenFOAM is 2.1.1.

==2==  
The steps taken to compile SOWFA are:

- Put “sowfa.tgz” under the user directory ( $WM\_PROJECT\_USER\_DIR).
- “tar -xvzf sowfa.tgz”
- Rename the “sowfa” to the “kb8e10-2.1.1”
- Run ./Allwclean
- Run ./Allwmake

==3==  
Nevertheless, I obtain a group of errors. The entire log file is as follows:  
[url][http://txtup.net/J9vxF[/url]](http://txtup.net/J9vxF%5B/url%5D)

In short, I obtain FAST and windPlantPisoSolver errors.

==4==  
In detail,  
FAST

[code]…/FAST/Source/HydroCalc.f90:812.29:

```
  CALL RANDOM_SEED ( PUT=WaveSeed(1:2) )
                         1

```

Error: Size of ‘put’ argument of ‘random\_seed’ intrinsic at (1) too small (2/12)  
…/FAST/Source/HydroCalc.f90:2701.40:

USE Waves  
1  
Fatal Error: Can’t open module file ‘waves.mod’ for reading at (1): No such file or directory  
…/FAST/Source/FAST\_IO.f90:7256.60:

USE Waves, ONLY:WavePkShpDefault  
1  
Fatal Error: Can’t open module file ‘waves.mod’ for reading at (1): No such file or directory  
…/FAST/Source/FAST.f90:1056.85:

```
                  FloatingPlatform, ONLY:AnchorTension, FairleadTension
                                                                       1          

```

Fatal Error: Can’t open module file ‘floatingplatform.mod’ for reading at (1): No such file or directory  
…/FAST/Source/FAST\_Lin.f90:46.49:

USE FASTsubs !Solver  
1  
Fatal Error: Can’t open module file ‘fastsubs.mod’ for reading at (1): No such file or directory  
…/FAST/Source/FAST2ADAMS.f90:510.55:

USE FASTSubs !SetCoordSy  
1  
Fatal Error: Can’t open module file ‘fastsubs.mod’ for reading at (1): No such file or directory  
…/FAST/Source/fastinit.f90:12.93:

```
          FAST_IO_Subs ! Begin(), Input(), PrintSum(), RunTimes()
                                                                       1                  

```

Fatal Error: Can’t open module file ‘fast\_io\_subs.mod’ for reading at (1): No such file or directory  
…/FAST/Source/fastrun.f90:8.89:

```
              FAST_IO_Subs ! WrOutHdr(), SimStatus(), WrOutput()
                                                                       1              

```

Fatal Error: Can’t open module file ‘fast\_io\_subs.mod’ for reading at (1): No such file or directory  
…/FAST/Source/fastend.f90:12.93:

```
          FAST_IO_Subs ! Begin(), Input(), PrintSum(), RunTimes()
                                                                       1                  

```

Fatal Error: Can’t open module file ‘fast\_io\_subs.mod’ for reading at (1): No such file or directory  
ar: HydroCalc.o: No such file or directory  
cp: cannot stat `libfast.a': No such file or directory cp: cannot stat `libfast.a’: No such file or directory[/code]

windPlantPisoSolver

```auto
windPlantPisoSolver.C:48:43: fatal error: horizontalAxisWindTurbinesALM.H: No such file or directory
```

==5==  
Found the solution for the first FAST error, that is CALL RANDOM\_SEED, ([url][Compiling FAST under Linux with gfortran - #4 by Bonnie.Jonkman](http://forums.nlr.gov/t/compiling-fast-under-linux-with-gfortran/421/4)]) although I’ve put it as it was just for completeness.

==6==  
Many thanks for any help in advance.  
//kuti

---

<div class="post-metadata">

**Author:** ![Kutalmis.Bercin](https://avatars.discourse-cdn.com/v4/letter/k/8e7dd6/32.png) [@Kutalmis.Bercin](https://forums.nlr.gov/u/Kutalmis.Bercin)\
**Post date:** [May 14, 2013, 3:54pm UTC](https://forums.nlr.gov/t/sowfa-fast-compilation-error/454/4 "2013-05-14T15:54:09Z")

</div>

Hi,

==1==  
I have made some attempts to solve the so-called compiling errors. Eventually, I made the “fastDuct” tutorial run.

==2==  
For the FORTRAN warnings, I have replaced HydroCalc.f90 file with that from FAST v7.02.00d-bjj (27-February-2013) considering random\_seed issue is solved.

==3==  
With this, I start receiving 2 new errors even though the random\_seed error disappeared.

[code]…/FAST/Source/HydroCalc.f90:3729.110:

displacement’, X0(4), X0(5), X0(6), TransMat0, ‘HydroDyn initialization’ )  
1  
Error: More actual than formal arguments in procedure call at (1)  
…/FAST/Source/HydroCalc.f90:2648.84:

L SmllRotTrans ( ‘platform displacement’, X(4), X(5), X(6), TransMat, TRIM(Num2  
1  
Error: Function ‘num2lstr’ at (1) has no IMPLICIT type[/code]

==4==  
Then, considering, in the previous files there were no ‘HydroDyn initialization’ or ‘TRIM(Num2’, I have deleted them and recompiled everything. With this, all FORTRAN-FAST errors have disappeared. (Might it resulted in more serious errors that did start not showing up.).

However, the compiling entire case still led to the problem:

```auto
make: *** No rule to make target `pisoFoam.dep', needed by `Make/linux64GccDPOpt/dependencies'. Stop.
```

==5==  
So, I decided to do the compiling one by one by following the sequence in the “Allwmake” file.

==6==  
i) src/finiteVolume  
ii) src/turbineModels  
iii) applications/utilities/setFieldsABL  
iv) applications/solvers/windEnergy/ABLPisoSolver  
v) applications/solvers/windEnergy/windPlantPisoSolver  
vi) src/fastturb

are compiled without any error apart from a few warnings appeared from the last two cases.

==7==  
i) src/openfast/bin

gave the first error.

`cp: cannot create regular files for fastPisoSolver/fast/bin
cp: cannot create regular files for windPlantPisoSolverFAST/fast/bin
`

Then, I have realized that there is no such sub-directories under both fastPisoSolver and windPlantPisoSolverFAST directories; that’s why, the “libfast.a” couldn’t be copied. Therefore, I have generated those directories and then “openfast” was compiled without any explicit errors.

==8==  
Later, I have tried to compile “applications/solvers/windEnergy/fastPisoSolver”; but, it gave error.

Checking the directory, nor createFields.H neither pisoFoam.C was therein. Hence, I have modified pisoFoam original by looking at SOWFA\_webinar\_05-03-2012.pdf - Implementation - fastPisoSolver section.

The following [url][http://txtup.co/lHjiX[/url]](http://txtup.co/lHjiX%5B/url%5D) & [url][http://txtup.co/RdIjP[/url]](http://txtup.co/RdIjP%5B/url%5D) are the modified (!) pisoFoam.C and createFields.H, respectively.

In addition, I have copied “horizontalAxisWindTurbinesFAST.H” into the “fastPisoSolver” directory.

Finally, with these tweaks, fastPisoSolver was compiled.

==9==

i) applications/solvers/windEnergy/windPlantPisoSolverFAST was successfully compiled.

==10==  
Lastly, I have run “fastDuct” tutorial for just 0.4 secs. It didn’t blow up.

==11==

Now, I assume that everything is fine; but, I am also pretty sure that this is not the right way of compiling the solvers.

Therefore, I kindly ask for some help to verify these procedures or some ideas why I couldn’t compile the solvers at the first time.

Many thanks in advance for any level of help.  
//kuti

---

<div class="post-metadata">

**Author:** ![Ruben.Pabello](https://avatars.discourse-cdn.com/v4/letter/r/a4c791/32.png) [@Ruben.Pabello](https://forums.nlr.gov/u/Ruben.Pabello)\
**Post date:** [March 28, 2014, 12:53pm UTC](https://forums.nlr.gov/t/sowfa-fast-compilation-error/454/5 "2014-03-28T12:53:08Z")

</div>

Hi Kuti,

I am following the same steps you used and suggested through this thread. Each of the solver runs fine (few warnings, as you mention), except for “applications/solvers/windEnergy/fastPisoSolver”. However, your fix yield some errors with pisoFoam.C

`rp@rp-VirtualBox:/work/rp/OpenFOAM/rp-2.0.x/applications/solvers/windEnergy/fastPisoSolver$ wmake
options:5:58: warning: backslash-newline at end of file [enabled by default]
Making dependency list for source file pisoFoam.C
SOURCE=pisoFoam.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/work/rp/OpenFOAM/OpenFOAM-2.0.x/src/turbulenceModels/incompressible/turbulenceModel -I/work/rp/OpenFOAM/OpenFOAM-2.0.x/src/transportModels -I/work/rp/OpenFOAM/OpenFOAM-2.0.x/src/transportModels/incompressible/ -IlnInclude -I. -I/work/rp/OpenFOAM/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude -I/work/rp/OpenFOAM/OpenFOAM-2.0.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/pisoFoam.o
In file included from pisoFoam.C:61:0:
initContinuityErrs.H:33:29: warning: missing whitespace after the macro name [enabled by default]
pisoFoam.C:85:3: error: invalid preprocessing directive #turbines
In file included from pisoFoam.C:61:0:
initContinuityErrs.H: In function ‘int main(int, char**)’:
initContinuityErrs.H:37:1: error: expected ‘;’ before ‘scalar’
initContinuityErrs.H:37:29: warning: statement has no effect [-Wunused-value]
pisoFoam.C:67:33: error: ‘turbfast’ was not declared in this scope
In file included from pisoFoam.C:169:0:
continuityErrs.H:40:5: error: ‘cumulativeContErr’ was not declared in this scope
pisoFoam.C:184:5: error: ‘turbines’ was not declared in this scope
readPISOControls.H:3:15: warning: unused variable ‘nOuterCorr’ [-Wunused-variable]
readPISOControls.H:15:16: warning: unused variable ‘transonic’ [-Wunused-variable]
make: *** [Make/linuxGccDPOpt/pisoFoam.o] Error 1
rp@rp-VirtualBox:/work/rp/OpenFOAM/rp-2.0.x/applications/solvers/windEnergy/fastPisoSolver$ rmdepall
removing all .dep files ...
rp@rp-VirtualBox:/work/rp/OpenFOAM/rp-2.0.x/applications/solvers/windEnergy/fastPisoSolver$ wclean
rp@rp-VirtualBox:/work/rp/OpenFOAM/rp-2.0.x/applications/solvers/windEnergy/fastPisoSolver$ cd fast/bin
rp@rp-VirtualBox:/work/rp/OpenFOAM/rp-2.0.x/applications/solvers/windEnergy/fastPisoSolver/fast/bin$ rm *
rm: cannot remove `*': No such file or directory
rp@rp-VirtualBox:/work/rp/OpenFOAM/rp-2.0.x/applications/solvers/windEnergy/fastPisoSolver/fast/bin$ cd ../..
rp@rp-VirtualBox:/work/rp/OpenFOAM/rp-2.0.x/applications/solvers/windEnergy/fastPisoSolver$ wmake
options:5:58: warning: backslash-newline at end of file [enabled by default]
Making dependency list for source file pisoFoam.C
SOURCE=pisoFoam.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/work/rp/OpenFOAM/OpenFOAM-2.0.x/src/turbulenceModels/incompressible/turbulenceModel -I/work/rp/OpenFOAM/OpenFOAM-2.0.x/src/transportModels -I/work/rp/OpenFOAM/OpenFOAM-2.0.x/src/transportModels/incompressible/ -IlnInclude -I. -I/work/rp/OpenFOAM/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude -I/work/rp/OpenFOAM/OpenFOAM-2.0.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/pisoFoam.o
In file included from pisoFoam.C:61:0:
initContinuityErrs.H:33:29: warning: missing whitespace after the macro name [enabled by default]
initContinuityErrs.H: In function ‘int main(int, char**)’:
initContinuityErrs.H:37:1: error: expected ‘;’ before ‘scalar’
initContinuityErrs.H:37:29: warning: statement has no effect [-Wunused-value]
pisoFoam.C:67:33: error: ‘turbfast’ was not declared in this scope
In file included from pisoFoam.C:169:0:
continuityErrs.H:40:5: error: ‘cumulativeContErr’ was not declared in this scope
pisoFoam.C:184:5: error: ‘turbines’ was not declared in this scope
readPISOControls.H:3:15: warning: unused variable ‘nOuterCorr’ [-Wunused-variable]
readPISOControls.H:15:16: warning: unused variable ‘transonic’ [-Wunused-variable]
make: *** [Make/linuxGccDPOpt/pisoFoam.o] Error 1
`

All the others can run now without problems, except this one.

In my bashrc file WM\_PROJECT\_USER\_DIR is defined as:

> [@](#):
>
> # Location of user files
> 
> # ~~~~~~~~~~~~~~~~~~~~~~
> 
> export WM\_PROJECT\_USER\_DIR=$HOME/$WM\_PROJECT/$USER-$WM\_PROJECT\_VERSION

However, when installing OpenFoam, I set it here:

> [@](#):
>
> # Location of the OpenFOAM installation
> 
> # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> foamInstall=/work/$USER/$WM\_PROJECT

Could that be a reason of why I’m having such an error?

Thanks in advance!  
Ruben
