Difference between revisions of "Installation/Windows/Outdated/Cross Compiling OpenFOAM 1.7 in Linux For Windows with MinGW"
(→Things needed for properly cross-compiling OpenFOAM 1.6) |
|||
Line 39: | Line 39: | ||
*For the x86_64 Linux platform, you will also need: '''gcc-multilib''' | *For the x86_64 Linux platform, you will also need: '''gcc-multilib''' | ||
*The packages required for documentation are: '''doxygen graphviz'''. | *The packages required for documentation are: '''doxygen graphviz'''. | ||
− | |||
− | |||
− | |||
= Applying patches = | = Applying patches = |
Revision as of 17:35, 22 July 2010
Under construction...
The parent page of this page is Tip Cross Compiling OpenFOAM in Linux For Windows with MinGW - please visit it for more information.
Contents
- 1 Introduction
- 2 Get OpenFOAM packages
- 3 Things needed for properly cross-compiling OpenFOAM 1.7.0
- 4 Applying patches
- 5 Getting Windows version of MPICH2 into the ThirdParty-1.6 folder in Linux
- 6 Tweaking environment options
- 7 Build the cross compiler
- 8 Cross-Compile OpenFOAM in Linux for Windows
- 9 Copying the files to your Windows installation
- 10 Creating a compact help file for the code documentation
- 11 Notes on what doesn't work and why
- 11.1 motorBike case and foamToVTK in Windows
- 11.2 libscotch is limited in Windows
- 11.3 Symbolic links in the tutorials
- 11.4 Open MPI in Windows
- 11.5 Cross-compiled version mingw-w64 takes longer to start applications
- 11.6 Some tutorials don't work in Windows
- 11.7 Tutorial scripts don't work in Windows
- 11.8 DOS_Mode.bat won't allow choosing which version to use
- 12 Notes on added functionalities with these patches
- 12.1 chtMultiRegionFoam and chtMultiRegionSimpleFoam slightly different in Windows
- 12.2 foamToVTK binary VTK files now functional in Windows
- 12.3 Building ccm26ToFoam
- 12.4 Keeping track of symbolic links in tutorials
- 12.5 Changes in settings.sh
- 12.6 Building locally with multiple cores
- 12.7 Building mingw cross-compilers
- 12.8 Getting MPICH2 automatically in Linux
- 12.9 Compiling HTML files into CHM and QCH/QHC
- 12.10 Creating new patches
- 12.11 Profiling OpenFOAM applications with mingw cross-compiled version
- 12.12 Backing up development folders
- 12.13 Smart library loading
- 13 History
1 Introduction
This is an exhaustive step by step guide on how to fully cross-compile OpenFOAM 1.7.0 in Linux for Windows, for both 32 and 64 bits architectures (from and to), using the patches available here. NOTE: for cross-compiling in Cygwin for Windows, see the section Using Cygwin for cross-compiling OpenFOAM.
These patches are a continuation of the ones for OpenFOAM 1.6.0 (see Cross Compiling OpenFOAM 1.6 in Linux For Windows with MinGW). These are now based on Symscape's "v11" patch for OpenFOAM 1.6.x available here. For a brief description on the differences between the patches on this page and the ones on Symscape's page, see the Introduction chapter page on the parent page.
With this guide and available patches, you should be able to cross-compile the whole and complete OpenFOAM libraries and applications, using MPICH2 instead of Open MPI for parallel computing. Currently you can cross-compile using mingw-w64 for both 32 and 64 bit versions. These enable you to build OpenFOAM 1.7.0 for Windows 32 and 64 bit versions, from Linux 32 and 64bit architectures. See the chapter Notes on what doesn't work and why, for information on things that don't work properly. NOTE: The old build scripts from the 1.6 version are still available on these patches, although not tested yet, and should also allow you to build with mingw32. For more information about them, see the 1.6 patch version page, chapter Building the cross-compiler.
Versions these patches apply to:
Other versions and common information to all MinGW cross-compiled versions is available in the page Tip Cross Compiling OpenFOAM in Linux For Windows with MinGW.
Support for this page is available at OpenFOAM's forum here.
2 Get OpenFOAM packages
- In your Linux machine, open a terminal window (example) and create the folder $HOME/OpenFOAM:
mkdir $HOME/OpenFOAM cd $HOME/OpenFOAM
- Get OpenFOAM-1.7.0.gtgz and ThirdParty-1.7.0.gtgz from the OpenFOAM's sourceforge.net project page and copy/move them to the folder $HOME/OpenFOAM. If you want direct download from the terminal, then do:
wget http://downloads.sourceforge.net/foam/OpenFOAM-1.7.0.gtgz?use_mirror=mesh wget http://downloads.sourceforge.net/foam/ThirdParty-1.7.0.gtgz?use_mirror=mesh
- Extract both files, by running in a terminal:
tar xzf OpenFOAM-1.7.0.gtgz tar xzf ThirdParty-1.7.0.gtgz
3 Things needed for properly cross-compiling OpenFOAM 1.7.0
STILL HAVE TO FINISH UPDATING PACKAGES NAMES
The following packages should allow you to both build OpenFOAM for Linux and Windows:
- The packages needed in Linux (these are Ubuntu 10.04 package names) are: flex git-core build-essential binutils-dev python-dev libqt4-dev libreadline5-dev wget zlib1g-dev texinfo byacc bison.
- For the x86_64 Linux platform, you will also need: gcc-multilib
- The packages required for documentation are: doxygen graphviz.
4 Applying patches
TODO...
5 Getting Windows version of MPICH2 into the ThirdParty-1.6 folder in Linux
TODO...
6 Tweaking environment options
TODO...
7 Build the cross compiler
TODO...
8 Cross-Compile OpenFOAM in Linux for Windows
TODO... NOTE: don't forget about the Allwmake script now available at the tutorials folder...
9 Copying the files to your Windows installation
TODO...
10 Creating a compact help file for the code documentation
TODO...
10.1 Creating a Compiled HTML (CHM) file for the code documentation
10.2 Creating a Qt QCH/QHC files for the code documentation
11 Notes on what doesn't work and why
TODO...
11.1 motorBike case and foamToVTK in Windows
11.2 libscotch is limited in Windows
11.3 Symbolic links in the tutorials
11.4 Open MPI in Windows
11.5 Cross-compiled version mingw-w64 takes longer to start applications
11.6 Some tutorials don't work in Windows
11.7 Tutorial scripts don't work in Windows
11.8 DOS_Mode.bat won't allow choosing which version to use
12 Notes on added functionalities with these patches
12.1 chtMultiRegionFoam and chtMultiRegionSimpleFoam slightly different in Windows
12.2 foamToVTK binary VTK files now functional in Windows
12.3 Building ccm26ToFoam
12.4 Keeping track of symbolic links in tutorials
12.5 Changes in settings.sh
12.6 Building locally with multiple cores
12.7 Building mingw cross-compilers
12.8 Getting MPICH2 automatically in Linux
12.9 Compiling HTML files into CHM and QCH/QHC
12.10 Creating new patches
12.11 Profiling OpenFOAM applications with mingw cross-compiled version
12.12 Backing up development folders
12.13 Smart library loading
13 History
Wyldckat 15:48, 22 July 2010 (UTC) - Page created... content will be inserted periodically over the next hours...