View Issue Details

IDProjectCategoryView StatusLast Update
0002051OpenFOAM[All Projects] Bugpublic2016-09-05 22:47
Reporteralan_afw2Assigned Tohenry 
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSraspbianOS VersionJessie
Product Version 
Fixed in Versiondev 
Summary0002051: Compilation of OpenFOAM-3.0.1 fails due to errors
Descriptionwhen using ./Allwmake

6 warnings:
surfaceFormats/stl/STLsurfaceFormatCore.C:77:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      || nTris < (dataFileSize - headerSize)/50
surfaceFormats/stl/STLsurfaceFormatCore.C:78:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      || nTris > (dataFileSize - headerSize)/25
Foam::List<int>&) const’:
/usr/lib/openmpi/include/mpi.h:305:72: warning: use of old-style cast [-Wold-style-cast]
 #define OMPI_PREDEFINED_GLOBAL(type, global) ((type) ((void *) &(global)))
/usr/lib/openmpi/include/mpi.h:305:73: warning: use of old-style cast [-Wold-style-cast]
 #define OMPI_PREDEFINED_GLOBAL(type, global) ((type) ((void *) &(global)))
Foam::fileFormats::STLsurfaceFormatCore::detectBINARY(const Foam::fileName&)’:
surfaceFormats/stl/STLsurfaceFormatCore.C:77:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      || nTris < (dataFileSize - headerSize)/50
surfaceFormats/stl/STLsurfaceFormatCore.C:78:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      || nTris > (dataFileSize - headerSize)/25

errors start when compiling + wmake -all utilities:
+ wmake -all utilities
make[1]: Entering directory '/home/pi/OpenFOAM/OpenFOAM-3.0.1/applications/utilities/mesh'
make[2]: Entering directory '/home/pi/OpenFOAM/OpenFOAM-3.0.1/applications/utilities/mesh/advanced'
make[3]: Entering directory '/home/pi/OpenFOAM/OpenFOAM-3.0.1/applications/utilities/mesh/advanced/PDRMesh'
Making dependency list for source file PDRMesh.C
g++ -DlinuxARM7 -DWM_ARCH_OPTION=32 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -floop-optimize -falign-loops -falign-labels -falign-functions -falign-jumps -fprefetch-loop-arrays -mcpu=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=hard -DNoRepository -ftemplate-depth-100 -I/home/pi/OpenFOAM/OpenFOAM-3.0.1/src/meshTools/lnInclude -I/home/pi/OpenFOAM/OpenFOAM-3.0.1/src/dynamicMesh/lnInclude -I/home/pi/OpenFOAM/OpenFOAM-3.0.1/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/pi/OpenFOAM/OpenFOAM-3.0.1/src/OpenFOAM/lnInclude -I/home/pi/OpenFOAM/OpenFOAM-3.0.1/src/OSspecific/POSIX/lnInclude -fPIC -c PDRMesh.C -o /home/pi/OpenFOAM/OpenFOAM-3.0.1/platforms/linuxARM7GccDPInt32Opt/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.o
g++ -DlinuxARM7 -DWM_ARCH_OPTION=32 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -floop-optimize -falign-loops -falign-labels -falign-functions -falign-jumps -fprefetch-loop-arrays -mcpu=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=hard -DNoRepository -ftemplate-depth-100 -I/home/pi/OpenFOAM/OpenFOAM-3.0.1/src/meshTools/lnInclude -I/home/pi/OpenFOAM/OpenFOAM-3.0.1/src/dynamicMesh/lnInclude -I/home/pi/OpenFOAM/OpenFOAM-3.0.1/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/pi/OpenFOAM/OpenFOAM-3.0.1/src/OpenFOAM/lnInclude -I/home/pi/OpenFOAM/OpenFOAM-3.0.1/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed /home/pi/OpenFOAM/OpenFOAM-3.0.1/platforms/linuxARM7GccDPInt32Opt/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.o -L/home/pi/OpenFOAM/OpenFOAM-3.0.1/platforms/linuxARM7GccDPInt32Opt/lib \
    -lturbulenceModels -lcompressibleTurbulenceModels -lcompressibleTransportModels -lfluidThermophysicalModels -lmeshTools -ldynamicMesh -lfiniteVolume -lOpenFOAM -ldl \
     -lm -o /home/pi/OpenFOAM/OpenFOAM-3.0.1/platforms/linuxARM7GccDPInt32Opt/bin/PDRMesh
/home/pi/OpenFOAM/OpenFOAM-3.0.1/platforms/linuxARM7GccDPInt32Opt/lib/ undefined reference to `Foam::operator<<(Foam::Ostream&, long)'
/home/pi/OpenFOAM/OpenFOAM-3.0.1/platforms/linuxARM7GccDPInt32Opt/lib/ undefined reference to `Foam::operator>>(Foam::Istream&, long&)'
collect2: error: ld returned 1 exit status
/home/pi/OpenFOAM/OpenFOAM-3.0.1/wmake/Makefile:138: recipe for target '/home/pi/OpenFOAM/OpenFOAM-3.0.1/platforms/linuxARM7GccDPInt32Opt/bin/PDRMesh' failed
make[3]: *** [/home/pi/OpenFOAM/OpenFOAM-3.0.1/platforms/linuxARM7GccDPInt32Opt/bin/PDRMesh] Error 1
make[3]: Leaving directory '/home/pi/OpenFOAM/OpenFOAM-3.0.1/applications/utilities/mesh/advanced/PDRMesh'
/home/pi/OpenFOAM/OpenFOAM-3.0.1/wmake/MakefileApps:39: recipe for target 'PDRMesh' failed
make[2]: *** [PDRMesh] Error 2

same for other wmake (e.g., + wmake -all blockMesh)
Steps To Reproduce./Allwmake

either (new compilation)

or (utilities only)
Additional Informationadded the full log file.

(Hardware: raspberry pi 3)
TagsNo tags attached.



2016-04-14 21:25


OF301_log.bz2 (51,218 bytes)


2016-04-14 22:23

updater   ~0006114

Quick question: What does this command give you?

  g++ --version


2016-04-15 15:24

reporter   ~0006116

Last edited: 2016-04-15 15:25

View 2 revisions

gcc --version
gcc (Raspbian 4.9.2-10) 4.9.2

g++ --version
g++ (Raspbian 4.9.2-10) 4.9.2


2016-04-15 15:28

reporter   ~0006117

Executing /home/pi/OpenFOAM/OpenFOAM-3.0.1/bin/foamInstallationTest:

Checking basic setup...
Shell: bash
Host: raspberrypi
OS: Linux version 4.1.19-v7+

Checking main OpenFOAM env variables...
Environment_variable Set_to_file_or_directory Valid Crit
$WM_PROJECT_INST_DIR /home/pi/OpenFOAM yes yes
$WM_PROJECT_USER_DIR /home/pi/OpenFOAM/pi-3.0.1 yes no
$WM_THIRD_PARTY_DIR /home/pi/OpenFOAM/ThirdParty-3.0.1 yes yes

Checking the OpenFOAM env variables set on the PATH...
Environment_variable Set_to_file_or_directory Valid Path Crit
$WM_PROJECT_DIR /home/pi/OpenFOAM/OpenFOAM-3.0.1 yes yes yes

$FOAM_APPBIN ...platforms/linuxARM7GccDPInt32Opt/bin yes yes yes
$FOAM_SITE_APPBIN ...platforms/linuxARM7GccDPInt32Opt/bin no no
$FOAM_USER_APPBIN ...platforms/linuxARM7GccDPInt32Opt/bin no no
$WM_DIR /home/pi/OpenFOAM/OpenFOAM-3.0.1/wmake yes yes yes

Checking the OpenFOAM env variables set on the LD_LIBRARY_PATH...
Environment_variable Set_to_file_or_directory Valid Path Crit
$FOAM_LIBBIN ...platforms/linuxARM7GccDPInt32Opt/lib yes yes yes
$FOAM_SITE_LIBBIN ...platforms/linuxARM7GccDPInt32Opt/lib no no
$FOAM_USER_LIBBIN ...platforms/linuxARM7GccDPInt32Opt/lib no no
$MPI_ARCH_PATH /usr/lib/openmpi yes yes yes

Third party software
Software Version Location
flex 2.5.39 /usr/bin/flex
gcc 4.9.2 /usr/bin/gcc
g++ 4.9.2 /usr/bin/g++
gzip 1.6 /bin/gzip
tar 1.27.1 /bin/tar
WARNING: Conflicting installations:
          OpenFOAM settings : /home/pi/OpenFOAM/OpenFOAM-3.0.1/platforms/linuxARM7GccDPInt32Opt/bin/icoFoam
          current path :


Base configuration ok.
The foam installation contains 1 critical error(s)


2016-04-15 22:46

updater   ~0006118

I've taken a better look into the code and the environment variables that are reflected in the data you've provided so far.

The one issue that I can deduce is that perhaps you changed something during the builds you've been doing, because you currently have the environment variable "WM_ARCH_OPTION" set to 32, which is correct. This in turn reflects in the compile string:

  g++ -DlinuxARM7 -DWM_ARCH_OPTION=32 ...

Which is also correct.

But this is in turn should have been used in the following two files:



But according to the error message you're getting, the compiler did not do the build of the file "int32IO.C" properly in the OpenFOAM library, which is why these two "operator" entries are missing.

Therefore, if the environment variable "WM_ARCH_OPTION" had been set to this value since the first time you tried to build OpenFOAM 3.0.1, then the compiler should not be complaining about this specific problem right now.

On the other hand, if you've been building things properly since the beginning, then this could be a weird compiler bug in the Raspbian build.


2016-04-15 23:37

reporter   ~0006119

Last edited: 2016-04-15 23:42

View 2 revisions

Originally I attempted to compile with the default settings
for bashrc file where set to 64 by default, for 2nd attempt set to 32
for cOpt and c++Opt files -mfloat-abi=softfp for 2nd attempt set to -mfloat-abi=hard.

1st attempt didn't take that long to compile. The 2nd attempt took nearly 11 hours!

Do I need to remove the # tags on the following to force 32 bit and re-compile or ???

#if WM_ARCH_OPTION == 32
    Istream& operator>>(Istream&, long&);
    Ostream& operator<<(Ostream&, const long);



2016-04-15 23:56

updater   ~0006120

Then the solution should be fairly simple - Run the following commands for doing a full clean up of this build of the 3rd-party folder and OpenFOAM:



Now trying building it again.

As for taking longer with "-mfloat-abi=hard", it might have to do with the compiler having to optimize for the hardware FPU, since it might be judging which is the best internal operation to be used for multiplying 2 values or adding two values, or calculation the power operator and so on.
The "softfp" probably just goes on the notion that the mathematical operators are simply the standard ones, no further optimization required, since it's just a matter of linking to an existing library or simply copy-paste the binary blob that does the math.


2016-04-16 10:44

reporter   ~0006123

Last edited: 2016-04-16 10:45

View 2 revisions

Had to move wcleanAll from wmake folder to OpenFOAM-3.0.1 folder to execute.

When you say build again, is that from unzipping the compressed openfoam files, reinstalling the libraries and the ./Allwmake or just the later.

Note I read somewhere that openfoam will not compile if mfloat is set to soft


2016-04-16 12:11

updater   ~0006124

> Had to move wcleanAll from wmake folder to OpenFOAM-3.0.1 folder to execute.

That is very strange... you shouldn't need to do that... was the shell environment for OpenFOAM fully loaded?

> When you say build again, is that from unzipping the compressed openfoam files, reinstalling the libraries and the ./Allwmake or just the later.

Sorry, I meant that you run "./Allwmake" again. I kept it as a generic description, because I traditionally use this script in a bit more complex fashion:

  ./Allwmake -j > log.make 2>&1

which will run with all available cores and redirect all output to the file "log.make".

> Note I read somewhere that openfoam will not compile if mfloat is set to soft

Mmm... strange. I'll have to get my hands on one or two Raspberry Pies myself... my guess is that the "softfp" option only works with single precision (WM_PRECISION_OPTION=SP).


2016-04-16 18:34


logmake.bz2 (51,745 bytes)


2016-04-16 18:35

reporter   ~0006128



  ./Allwmake -j > log.make 2>&1

Unfortunately, compilation terminated (see attached log file).


2016-04-16 19:55

updater   ~0006130

"Optimum is the enemy of good"... the problem is that the Scotch library isn't building, because OpenFOAM's scripts in ThirdParty are not prepared for building on ARM.

Let's first focus first on building OpenFOAM. Please run the following commands, so that we don't rely on Scotch for now:

  cd etc/config

  ./Allwmake -j > log.make 2>&1


2016-04-16 23:17


logmake2.bz2 (43,527 bytes)


2016-04-16 23:18

reporter   ~0006132

  cd etc/config

  ./Allwmake -j > log.make 2>&1

see attached error log.


2016-04-16 23:46

updater   ~0006133

Ouch... the error message was this:

  g++: internal compiler error: Killed (program cc1plus)
  Please submit a full bug report,
  with preprocessed source if appropriate.

I forgot that the Pi doesn't have much memory to work with. Maybe the problem was due to a crash as it ran out of memory, possibly because I forgot about that and told you to build using all cores :(

Try using these commands instead:

  ./Allwmake > log.make 2>&1

this will ensure that only 1 core is used for the build. If you're building inside the Pi, hopefully there's enough RAM for building in serial mode.


2016-04-18 05:30

reporter   ~0006138

foam compiled.
Cavity example
blockmesh and icofoam executed.
Time = 0.5

Courant Number mean: 0.222158 max: 0.852134
smoothSolver: Solving for Ux, Initial residual = 2.32737e-07, Final residual = 2.32737e-07, No Iterations 0
smoothSolver: Solving for Uy, Initial residual = 5.07002e-07, Final residual = 5.07002e-07, No Iterations 0
DICPCG: Solving for p, Initial residual = 1.0281e-06, Final residual = 2.77237e-07, No Iterations 1
time step continuity errors : sum local = 4.0374e-09, global = -9.0204e-19, cumulative = -2.44407e-18
DICPCG: Solving for p, Initial residual = 5.31987e-07, Final residual = 5.31987e-07, No Iterations 0
time step continuity errors : sum local = 6.12557e-09, global = -3.93738e-20, cumulative = -2.48344e-18
ExecutionTime = 0.94 s ClockTime = 1 s


still to compile parafoam


2016-04-19 18:47

reporter   ~0006139

Last edited: 2016-04-19 18:48

View 2 revisions


cd $FOAM_UTILITIES/postProcessing/graphics/PV4Readers

paraview installed and executes.

Note some of the errors during compilation are due to missing folder

there is a \usr\lib folder.

Also, is there any issue with ignoring


2016-04-19 22:51

updater   ~0006140

Last edited: 2016-04-19 22:52

View 2 revisions

Excellent, so OpenFOAM is now built with success! Can you please describe the changes you had to do in "etc/bashrc" and/or "etc/config/"?

> Note some of the errors during compilation are due to missing folder \usr\lib64

That's a bit strange... are you referring to building OpenFOAM or ParaView?

> Also, is there any issue with ignoring

Depends on the type of cases you're planning on running with the Pi. Without Scotch, the remaining decomposition methods are only able to subdivide the domain based on orthogonal orientations, or using manual decomposition.

If you need to decompose complex meshes to run in parallel - for example, for an airplane, car, motorbike - then Scotch is crucial.
Nonetheless, are you able to install the packages "libmetis-dev" and "libparmetis-dev" using 'apt-get' in Raspbian? Because if you are, then Metis can be used as an alternative to Scotch.

The other possibility is to install "libscotch-dev" and "libptscotch-dev" with 'apt-get', but I'm not certain if OpenFOAM 3.0.1 is still compatible with Scotch 5.10.1...


2016-04-20 22:42

reporter   ~0006148

the thirdparty script Allwmake wasn't used to compile due to the issue with scotch. Is the reason it doesn't work on pi3 is because of the following section of code which makes reference to i686?

# building scotch is still a bit of a pain
echo ========================================
echo "Build Scotch decomposition library $SCOTCH_VERSION"
# this needs generalizing

paraview was compiled using makeParaView4 (option to use makeParaView) script. References to lib64 folder which doesn't exist:

# MPI support:

# Python support:
# note: script will try to determine the appropriate python library.
# If it fails, specify the path using the PYTHON_LIBRARY variable
# PYTHON_LIBRARY="/usr/lib64/"

# MESA graphics support:

No /usr/lib64 there is a /usr/lib with folders for python 2.6 and 2.7 and 3 and 3.4

/usr/lib also as a number of, etc files. I see that the third part version runs 6.0.3

when compiling makeParaView4
Configuring paraview-4.4.0 (major version: 4.4)
    MPI support : false
    Python support : false
    MESA support : false
    Qt dev support : true


-- Check size of __int64
-- Check size of __int64 - failed

-- Performing Test GLX_DEFINES_TYPE_GLXextFuncPtr_AS_EMPTY - Failed

I have attached logmake_foam.bz2 and logmake_para.bz2 which run cavity example OK. However, need to get scotch working to ensure there is no restrictions.


2016-04-20 22:42


logmake_foam.bz2 (94,519 bytes)


2016-04-20 22:43


logmake_para.bz2 (81,972 bytes)


2016-04-20 23:19

updater   ~0006149

OK, those references to "lib64" are normal, since they are the default settings. You can override them via command line. If I'm not mistaken, the following should work in Raspbian:

  ./makeParaView4 -python -mpi -python-lib /usr/lib/i386-linux-gnu/ > log.makePV 2>&1

Although first make sure you installed Python 2.7:

  apt-get install python python-dev

As for trying to build Scotch, run the following commands to reinstate the original settings and then go into the 3rd-party folder:

  cd etc/config


Now you need to edit the file "etc/wmakeFiles/scotch/" and delete the 3 occurrences of "-m32". This can be done with the following command:

  sed -i.bck -e "s=\-m32==g" etc/wmakeFiles/scotch/

Now try running Allwmake from within the 3rd-party folder:

  ./Allwmake > log.make 2>&1

Run it a second time, hopefully to get a summary of the build:

  ./Allwmake > log.make 2>&1

With luck, it builds. If not, you will need to manually edit the file "" and add the build options that you used for building OpenFOAM, namely the ones that had the reference to the "hard" float.


2016-04-21 16:42

reporter   ~0006151

as to scotch:
Start ThirdParty Allwmake

Build MPI libraries if required

Build Scotch decomposition library scotch_6.0.3
    scotch header in /home/pi/OpenFOAM/ThirdParty-3.0.1/platforms/linuxARM7GccInt32/scotch_6.0.3/include
    scotch libs in /home/pi/OpenFOAM/ThirdParty-3.0.1/platforms/linuxARM7GccDPInt32Opt/lib

Build PTScotch decomposition library scotch_6.0.3 (uses MPI)

    ptscotch header in /home/pi/OpenFOAM/ThirdParty-3.0.1/platforms/linuxARM7GccInt32/scotch_6.0.3/include/openmpi-system
    ptscotch libs in /home/pi/OpenFOAM/ThirdParty-3.0.1/platforms/linuxARM7GccDPInt32Opt/lib/openmpi-system

Build Metis decomposition
    optional component Metis was not found
Build CGAL
    CGAL headers in /home/pi/OpenFOAM/ThirdParty-3.0.1/platforms/linuxARM7Gcc/CGAL-4.7/include
    CGAL libs in /home/pi/OpenFOAM/ThirdParty-3.0.1/platforms/linuxARM7Gcc/CGAL-4.7/lib

Done ThirdParty Allwmake

Any issue with the Metis not building?

Also, in terms of python bit, already installed
Python 2.7.9 (default, Mar 8 2015, 00:52:26)
[GCC 4.9.2] on linux2

Do I need to recompile makeParaview4 again with change
  ./makeParaView4 -python -mpi -python-lib /usr/lib/i386-linux-gnu/ > log.makePV 2>&1

or is there a quicker way. Any issue if don't re-compile - what will it affect.


2016-04-21 22:36

updater   ~0006158

> Any issue with the Metis not building?

It's optional and you can use the one installed via 'apt-get' as a viable alternative.

Now that Scotch is built, go into OpenFOAM's folder and run Allwmake again, so that Scotch is used where it's needed:

  ./Allwmake > log.make 2>&1

As for building ParaView with the additional options, the new options give you:

  1. the ability to use Python scripting and save/load macros as Python scripts. Right now you don't have either one of those options.

  2. The MPI option is in case you need to use ParaView's inherent capability to post-process in parallel... although it's not very straight forward to use.

If you do want one or both of these features, then do the following steps:

  1. Edit the file "etc/tools/ParaView4Functions" in the "ThirdParty-3.0.1" folder.

  2. Look for the following line and comment it out:

     rm -rf $ParaView_BINARY_DIR

  3. Save and close the file in the text editor.

  4. Now you can run the "makeParaView4" script and it will reuse the existing build of ParaView and add in the new features, therefore saving you some time.


2016-04-22 21:02

reporter   ~0006161

./makeParaView4 -python -mpi -python-lib /usr/lib/i386-linux-gnu/ > log.makePV 2>&1

the above doesn't exist, used:

./makeParaView4 -python -mpi -python-lib /usr/lib/python2.7/config-arm-linux-gnueabihf/ > log.makePV 2>&1

system is slowly compiling the python bit.during the compilation:

    MESA support : false

sed: can't read /home/pi/OpenFOAM/ThirdParty-3.0.1/ParaView-4.4.0/VTK/Utilities/kwsys/kwsysDateStamp.cmake: No such file or directory

The direcory should be KWSys and file kwsysDateStamp.cmake doesn't exist.


2016-04-24 11:34

updater   ~0006164

Makes sense that the Python libraries would be installed elsewhere. I didn't even remember to think about that.

The MESA support is turned off by default.

The message about "kwsysDateStamp.cmake" can be ignored.


2016-04-30 19:35

updater   ~0006209

So in review, the brief steps on how to build on Raspbian are to:

  1- Make sure you use "WM_ARCH_OPTION=32" in "OpenFOAM-*/etc/bashrc" or we can update "config/" to override the bit mode for armv7.

  2- There seems to be a need to have different file nomenclatures at "ThirdParty-*", because this: "etc/wmakeFiles/scotch/$WM_ARCH_OPTION$WM_LABEL_OPTION" - doesn't always work for all architectures... given that "-m32" doesn't work on Raspbian. Either that, or use the older Scotch version from Raspbian, which has some downsides.

  3- Tweak settings to one's needs, either in the "wmake/rules" files; or when building ParaView, make sure to link to the correct architecture's library folders.


2016-04-30 23:50

reporter   ~0006216

I was able to run the motorbike example. The paraFoam is slow due to the lack of graphic memory and GPU. However, it did work.

The installation procedure for Raspbian Jessie is:
(note I have not tried from scratch but what is specified below is a summary of the work above).

tar xzf OpenFOAM-3.0.1.tgz
tar xzf ThirdParty-3.0.1.tgz

cd /home/username/OpenFOAM/OpenFOAM-3.0.1/etc
edit file: bashrc
in bashrc file - change from 64 to 32 bit
#- Memory addressing:
# On a 64bit OS this can be 32bit or 64bit
# On a 32bit OS addressing is 32bit and this option is not used
# WM_ARCH_OPTION = 32 | 64
#export WM_ARCH_OPTION=64
export WM_ARCH_OPTION=32

cd /home/username/OpenFOAM/OpenFOAM-3.0.1/wmake/rules/linuxARM7Gcc
edit file: cOpt
move the # from 1st to 2nd line:
cOPT = -O3 -floop-optimize -falign-loops -falign-labels -falign-functions -falign-jumps -fprefetch-loop-arrays -mcpu=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=hard
#cOPT = -O3 -floop-optimize -falign-loops -falign-labels -falign-functions -falign-jumps -fprefetch-loop-arrays -mcpu=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=softfp

edit file: c++Opt
c++OPT = -O3 -floop-optimize -falign-loops -falign-labels -falign-functions -falign-jumps -fprefetch-loop-arrays -mcpu=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=hard
#c++OPT = -O3 -floop-optimize -falign-loops -falign-labels -falign-functions -falign-jumps -fprefetch-loop-arrays -mcpu=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=softfp

sudo su
apt-get install build-essential flex bison cmake zlib1g-dev libboost-system-dev libboost-thread-dev libopenmpi-dev openmpi-bin gnuplot libreadline-dev libncurses-dev libxt-dev

apt-get install qt4-dev-tools libqt4-dev libqt4-opengl-dev freeglut3-dev libqtwebkit-dev

apt-get install libphonon-dev libphonon4 libqt4-core libqt4-gui qt4-qmake cmake-curses-gui mesa-common-dev openmpi-common python-dev

Now you need to edit the file "etc/wmakeFiles/scotch/" and delete the 3 occurrences of "-m32". This can be done with the following command:

  sed -i.bck -e "s=\-m32==g"


(Please note: do not use the -j option to use all 4 cores, as crashes, probably due to memory constraints. The following steps will take time 12-24 hours).



cd $FOAM_UTILITIES/postProcessing/graphics/PV4Readers

cd /home/username
edit file: bashrc
source /home/username/OpenFOAM/OpenFOAM-3.0.1/etc/bashrc

Testing the Installation
cd /home/username/OpenFOAM/OpenFOAM-3.0.1/bin

Getting Started

Create a project directory within the $HOME/OpenFOAM directory named <USER>-3.0.1 (e.g. chris-3.0.1 for user chris and OpenFOAM version 3.0.1) and create a directory named run within it, e.g. by typing:

mkdir -p $FOAM_RUN
Copy the tutorial examples directory in the OpenFOAM distribution to the run directory. If the OpenFOAM environment variables are set correctly, then the following command will be correct:
Run the first example case of incompressible laminar flow in a cavity:
cd $FOAM_RUN/tutorials/incompressible/icoFoam/cavity
Refer to the OpenFOAM User Guide to get started.


2016-09-04 22:58


OpenFOAM-dev_updated_scotch_build_v1.tar.gz (2,759 bytes)


2016-09-04 22:58


ThirdParty-dev_updated_scotch_build_v1.tar.gz (3,508 bytes)


2016-09-04 23:13

updater   ~0006824

@Henry: Attached are the following packages for OpenFOAM-dev and ThirdParty-dev, along with a description of the provided updates:

  - OpenFOAM-dev_updated_scotch_build_v1.tar.gz - which provides an update for "OpenFOAM-dev/etc/":

    - for the i686 architecture, it now also defines the variables "WM_CC" et al for this build.

    - for the armv7l architecture, it now also sets "WM_ARCH_OPTION", the same way it's done for i686 and it's associated to one of the issues reported here.

    - Note: I didn't add anything to "ia64", simply because I don't have access to a machine with this architecture, but it could use the variables "WM_CC" et al...

  - ThirdParty-dev_updated_scotch_build_v1.tar.gz - which provides the following files:

    - ThirdParty-dev/etc/wmakeFiles/scotch/

      - It consolidates what's defined on the other 3 files "*", by relying on the "WM_CFLAGS" and "WM_LDFLAGS" environment variables, which are defined for the majority of the systems.

      - It conditionally appends "-DINTSIZE64" to "CFLAGS" when "ifeq ($(WM_LABEL_OPTION),Int64)".

      - It's still hard-coded to using "gcc" as the compiler. I don't have access to most of the other architectures, in order to assess what needs to be done, but this change consolidates the other 3 files into a single one and it's a bit more generic.

    - ThirdParty-dev/Allwmake

      - It now uses the single "" file, instead of conditionally using one of the 3 existing ones.

With all of these changes, it sorts out the majority of the issues reported here.

As for providing detailed instructions for Raspbian at, that's beyond my control, but given that with these changes, the majority of the issues are sorted out, the instructions for Ubuntu should cover most of the details.
The only critically missing detail would be the changes done to the wmake rules, but since that's system-dependent, those details are usually left out of the general installation instructions.

@alan_afw2: That being said, I've managed to test and revise these changes during this weekend, by using a chroot+QEMU set-up with Raspbian and I've written the instructions here: - it's a wiki and it's open to the public, so do feel free to edit it and add/update as you see necessary.


2016-09-04 23:19

updater   ~0006825

@Henry: I forgot to detail that I've also tested these changes on a VM with Ubuntu 16.04 i686 and on a real machine with Ubuntu 16.04 x86_64, both 32 and 64-bit.

In addition, the file "", the use of "-L$MPI_ARCH_PATH/lib" will lead to GNU Make interpreting as "-LPI_ARCH_PATH/lib", therefore it's pretty much useless and I didn't use it at all in the attached package.


2016-09-05 18:48

manager   ~0006827

Presumably with these change the files

can be removed?


2016-09-05 19:04

updater   ~0006828

Yes, sorry, I forgot to emphasize that those 3 files can be removed.


2016-09-05 22:47

manager   ~0006829

Resolved in OpenFOAM-dev by commit 630d2c76dc93af6898d79581ea22d35a206a279f
Resolved in ThirdParty-dev by commit 7f5367013cb763d8c49f4a9baf5d469c96df67b1

Issue History

Date Modified Username Field Change
2016-04-14 21:25 alan_afw2 New Issue
2016-04-14 21:25 alan_afw2 File Added: OF301_log.bz2
2016-04-14 22:20 wyldckat OS Other => raspbian
2016-04-14 22:20 wyldckat OS Version (please specify) => Jessie
2016-04-14 22:20 wyldckat Additional Information Updated View Revisions
2016-04-14 22:23 wyldckat Note Added: 0006114
2016-04-15 15:24 alan_afw2 Note Added: 0006116
2016-04-15 15:25 alan_afw2 Note Edited: 0006116 View Revisions
2016-04-15 15:28 alan_afw2 Note Added: 0006117
2016-04-15 22:46 wyldckat Note Added: 0006118
2016-04-15 23:37 alan_afw2 Note Added: 0006119
2016-04-15 23:42 alan_afw2 Note Edited: 0006119 View Revisions
2016-04-15 23:56 wyldckat Note Added: 0006120
2016-04-16 10:44 alan_afw2 Note Added: 0006123
2016-04-16 10:45 alan_afw2 Note Edited: 0006123 View Revisions
2016-04-16 12:11 wyldckat Note Added: 0006124
2016-04-16 18:34 alan_afw2 File Added: logmake.bz2
2016-04-16 18:35 alan_afw2 Note Added: 0006128
2016-04-16 19:55 wyldckat Note Added: 0006130
2016-04-16 23:17 alan_afw2 File Added: logmake2.bz2
2016-04-16 23:18 alan_afw2 Note Added: 0006132
2016-04-16 23:46 wyldckat Note Added: 0006133
2016-04-18 05:30 alan_afw2 Note Added: 0006138
2016-04-19 18:47 alan_afw2 Note Added: 0006139
2016-04-19 18:48 alan_afw2 Note Edited: 0006139 View Revisions
2016-04-19 22:51 wyldckat Note Added: 0006140
2016-04-19 22:52 wyldckat Note Edited: 0006140 View Revisions
2016-04-20 22:42 alan_afw2 Note Added: 0006148
2016-04-20 22:42 alan_afw2 File Added: logmake_foam.bz2
2016-04-20 22:43 alan_afw2 File Added: logmake_para.bz2
2016-04-20 23:19 wyldckat Note Added: 0006149
2016-04-21 16:42 alan_afw2 Note Added: 0006151
2016-04-21 22:36 wyldckat Note Added: 0006158
2016-04-22 21:02 alan_afw2 Note Added: 0006161
2016-04-24 11:34 wyldckat Note Added: 0006164
2016-04-30 19:35 wyldckat Note Added: 0006209
2016-04-30 23:50 alan_afw2 Note Added: 0006216
2016-09-04 22:58 wyldckat File Added: OpenFOAM-dev_updated_scotch_build_v1.tar.gz
2016-09-04 22:58 wyldckat File Added: ThirdParty-dev_updated_scotch_build_v1.tar.gz
2016-09-04 23:13 wyldckat Note Added: 0006824
2016-09-04 23:13 wyldckat Assigned To => henry
2016-09-04 23:13 wyldckat Status new => assigned
2016-09-04 23:19 wyldckat Note Added: 0006825
2016-09-05 18:48 henry Note Added: 0006827
2016-09-05 19:04 wyldckat Note Added: 0006828
2016-09-05 22:47 henry Status assigned => resolved
2016-09-05 22:47 henry Resolution open => fixed
2016-09-05 22:47 henry Fixed in Version => dev
2016-09-05 22:47 henry Note Added: 0006829