Difference between revisions of "TestWyldckat"

From OpenFOAMWiki
(History)
(Replaced content with "This test page is empty for now, to stay out of the search engine.")
Line 1: Line 1:
= Introduction =
+
This test page is empty for now, to stay out of the search engine.
This is an exhaustive step by step guide on how to '''<u>fully</u>''' cross-compile OpenFOAM in Linux for Windows, for both 32 and 64 bits architectures (from and to), using the patches made available in each respective page. '''NOTE''': for cross-compiling in Cygwin for Windows, see the page [[Tip Using Cygwin for cross-compiling OpenFOAM|Using Cygwin for cross-compiling OpenFOAM]].
+
 
+
These patches were initially based on [http://www.symscape.com Symscape's] "v3" patch for OpenFOAM 1.5.x available [http://www.symscape.com/openfoam-1-5-x-on-windows here], but as development evolves, occasional updates are made based on the latest patches by Symscape. Symscape's patches differ substantially from the patches available on this wiki; the main differences of the patches on this wiki are:
+
*these aim to build OpenFOAM up to 100% of its original capabilities;
+
*these also build most Third Party tools that OpenFOAM can use directly (Scotch, Metis);
+
*provide additional scripts for building OpenFOAM and the maintenance of these patches;
+
*target only Windows - Symscape's patches also have changes for Mac OS X;
+
*these patches are only released for each major release of OpenFOAM - Symscape's patches are updated every 3-4 months.
+
The build scripts for [http://www.mingw.org mingw] and [http://sourceforge.net/projects/mingw-w64/ mingw-w64] were also based on the [http://www.symscape.com/files/articles/openfoam-windows/build-mingw build-mingw] script available on the 1.5.x and 1.6.x links.
+
 
+
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. You can cross-compile using [http://www.mingw.org mingw32] and/or [http://sourceforge.net/projects/mingw-w64/ mingw-w64].
+
 
+
= Patch versions =
+
With the release of OpenFOAM 1.7 and the separate evolution of the patches for each OpenFOAM version, the once single wiki page will now branch into 3 parts:
+
*This page will have the relevant information for all patch versions
+
*One page for each patch version:
+
**{{version1.6}} [[Tip Cross Compiling OpenFOAM 1.6 in Linux For Windows with MinGW]]
+
**{{version1.7}} [[Tip Cross Compiling OpenFOAM 1.7 in Linux For Windows with MinGW]]
+
 
+
Support for these patches is available at OpenFOAM's forum [http://www.cfd-online.com/Forums/openfoam-installation-windows/72813-cross-compiling-openfoam-1-6-linux-windows-32-64bits-mingw-w64.html here].
+
 
+
= Information common to all patch versions =
+
== Building Paraview in Windows ==
+
Since ParaView 3.8.0 was released [http://www.paraview.org/paraview/resources/software.html], it no longer seems necessary to put effort into building ParaView with MPICH2 and the native OpenFOAM reader. Kitware now provides ParaView with (and without) MS-MPI for parallel functionality, and the plugin from [[Contrib Parallelized Native OpenFOAM Reader for ParaView|here]] is already integrated.
+
 
+
Either way, in case you really want to build ParaView, the following instructions are the ones initially written on this wiki page:
+
<ol><li>This is a pain to do, and yet, quite simple once you get the handle of it. Nonetheless, here won't be described the full building procedure. You can follow the tutorial available [[Contrib Parallelized Native OpenFOAM Reader for ParaView|here]] in this wiki and use that plug-in for reading '''.foam''' files directly from Paraview, without building the original plug-ins that come with OpenFOAM and be able to handle large and/or parallelized cases.
+
 
+
On that [[Contrib Parallelized Native OpenFOAM Reader for ParaView|tutorial]] page, you also have a link to an already built version of Paraview 3.4.0 with the plug-in. This way it is less one thing to worry about building.</li>
+
<li>'''Tips for building a 64bit version of Paraview''' - Follow the instructions available [http://whitemarker.blogspot.com/2006/12/c-visual-c-2005-express-edition-x64.html here] and [http://mixxx.org/wiki/doku.php/compiling_on_windows#steps1 here]. This way you can get Visual Studio Express to build x64 applications and also build [http://qt.nokia.com Qt] 64bit for Windows, as well as Paraview with the [[Contrib Parallelized Native OpenFOAM Reader for ParaView|multi-platform plug-in]]!</li></ol>
+
 
+
== Using MPICH2 with OpenFOAM in Windows ==
+
This is valid for each computer with Windows, where you installed the cross-compiled OpenFOAM. Be advised that you should install OpenFOAM in an identical folder path on each machine, or in a network shared drive. User accounts of the same name and password will reduce the complexity of your system. Currently we haven't tested running with different user accounts.
+
 
+
'''NOTE''': these steps depend on the MPICH2 version you choose to run, namely 32 or 64bit. So you might need to do them every time you need different architectures. Nonetheless, the SMPD service seemed to be compatible with both versions.
+
 
+
The steps are:
+
<ol>
+
<li>Go to into your <u>administrative account</u> (if your user account doesn't have administrative capabilities) and:
+
#Open a command line (Start->Run... or Winkey+R and run '''cmd.exe''').
+
#Go to the '''bin''' folder where MPICH2 is installed (e.g. '''cd C:\Program Files\MPICH2\bin''').
+
#Type:<bash>smpd -install</bash>to install the MPICH2 smpd service.</li>
+
<li>Go back to your OpenFOAM <u>user account</u>.
+
<ol>
+
<li>Now run the OpenFOAM terminal (double click on the file '''DOS_Mode.bat''').</li>
+
<li>Type:
+
<bash>mpiexec.exe -register</bash>
+
And when it asks your user name just press Enter key; and when it asks your user password, introduce your password... it'll ask you twice to make sure. This will allow future calls to mpiexec to be done without requiring password. MPICH will encrypt your password into the Windows Registry, so it ''should'' be safe.
+
 
+
'''CAUTION''': the MSys terminal version will make your password visible on screen!</li>
+
<li>Test the parallel system. For that, you'll have to:
+
#In the OpenFOAM terminal, go to the folder '''ofuser-1.6''' (or '''$USER-1.6''') and unpack the test case [[:Media:PTestCase.tar.gz|PTestCase.tar.gz]];
+
#Go into the '''pTestCase''' case folder;
+
#Type:<bash>gompi parallelTest</bash>It will test communications between two instances of '''parallelTest.exe'''. If successful, it should display something like this:
+
<blockquote><pre>
+
C:\Program Files\blueCFD\ofuser-1.6\PTestCase>mpiexec -n 2 -genvlist HOME,PATH,
+
USERNAME,WM_PROJECT_DIR,WM_PROJECT_INST_DIR,WM_OPTIONS,FOAM_LIBBIN,FOAM_APPBIN,
+
FOAM_USER_APPBIN,MPI_BUFFER_SIZE parallelTest -parallel
+
/*---------------------------------------------------------------------------*\
+
| =========                |                                                |
+
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
+
|  \\    /  O peration    | Version:  1.6                                  |
+
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
+
|    \\/    M anipulation  |                                                |
+
\*---------------------------------------------------------------------------*/
+
/*  Windows 32 and 64 bit porting by blueCAPE: http://www.bluecape.com.pt  *\
+
|  Based on Windows porting (1.5.x v3) by Symscape: http://www.symscape.com/  |
+
\*---------------------------------------------------------------------------*/
+
Build  : 1.6-f802ff2d6c5a
+
Exec  : C:\Program Files\blueCFD\ofuser-1.6\applications\bin\linuxmingw-w32DP
+
Opt\parallelTest.exe -parallel
+
Date  : Oct 23 2009
+
Time  : 16:21:16
+
Host  : THE_MACHINE
+
PID    : 712
+
Case  : C:/Program Files/blueCFD/ofuser-1.6/pTestCase
+
nProcs : 2
+
Slaves :
+
1
+
(
+
THE_MACHINE.5024
+
)
+
 
+
Pstream initialized with:
+
    floatTransfer    : 0
+
    nProcsSimpleSum  : 0
+
    commsType        : nonBlocking
+
 
+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
Create time
+
 
+
[1]
+
Starting transfers
+
[1]
+
[1] slave sending to master 0
+
[1] slave receiving from master 0
+
[0]
+
Starting transfers
+
[0]
+
[0] master receiving from slave 1
+
[0] (0 1 2)
+
[0] master sending to slave 1
+
End
+
 
+
[1] (0 1 2)
+
Finalising parallel run
+
</pre></blockquote>
+
</li>
+
</ol>
+
</li>
+
</ol>
+
 
+
= Miscellaneous information =
+
== Differences between mingw32 and mingw-w32 versions ==
+
[http://www.mingw.org/wiki/MinGW MinGW] is the true name of '''mingw32'''. As for '''mingw-w32''' (32bit version of '''mingw-w64'''), as cited from [http://www.cadforte.com/index.html here (dead link)]:
+
<blockquote>Mingw-w64 began as a spin-off from the mingw.org project, with the original intent of building for 64-bit targets.</blockquote>
+
Nonetheless, '''mingw-w64''' has retro-compatibility with the 32bit MinGW version, thus enabling a 2-in-1 build package for 32 and 64bit Windows systems.
+
 
+
The main difference between '''mingw32''' and '''mingw-w32''', is that MinGW is a stable and proven build tool and run-time for Windows, while the mingw-w64 project is still under fierce development and only in October 29th of 2010 they released their first stable version. Therefore, it is only estimated that the '''mingw32''' version could provide less headaches than '''mingw-w32'''.
+
 
+
== Using Cygwin for cross-compiling OpenFOAM ==
+
For cross-compiling in Cygwin for Windows, see the page [[Tip Using Cygwin for cross-compiling OpenFOAM|Using Cygwin for cross-compiling OpenFOAM]].
+
 
+
= Other Important Links =
+
This is a list of links of build instructions of cross-compiled and natively compiled versions of OpenFOAM, using '''mingw''' and/or '''mingw-w64''':
+
*[http://www.symscape.com Symscape's] cross-compiled OpenFOAM 1.4.1 mingw32 version [http://www.symscape.com/openfoam-on-windows]
+
*[http://www.symscape.com Symscape's] cross-compiled OpenFOAM 1.5.x mingw32 version [http://www.symscape.com/openfoam-1-5-x-on-windows]
+
*[http://www.bluecape.com.pt blueCAPE's] cross-compiled OpenFOAM 1.5.x mingw32 version with MPICH1 [http://www.cfd-online.com/Forums/openfoam-installation/57248-openfoam-mingw-crosscompiler-hosted-linux-6.html#post206728] and MPICH2 [http://www.cfd-online.com/Forums/openfoam-installation/57248-openfoam-mingw-crosscompiler-hosted-linux-7.html#post206729]
+
*[http://sourceforge.net/users/apostol Julian's] OpenFOAM 1.5 files for native build in Windows [http://sourceforge.net/projects/openfoam-mswin/files/] with mingw32 and CodeBlocks (instructions included inside files)
+
*[http://www.symscape.com Symscape's] cross-compiled OpenFOAM 1.6.x mingw32 version [http://www.symscape.com/openfoam-1-6-x-on-windows]
+
*[http://www.bluecape.com.pt blueCAPE's] cross-compiled OpenFOAM 1.6 mingw32, mingw-w32 and mingw-w64... is this tutorial you are reading...
+
 
+
Distributable binaries:
+
*Free: [http://sourceforge.net/users/apostol Julian's] OpenFOAM for MS windows binary release - OpenFOAM 1.5 built natively in Windows [http://sourceforge.net/projects/openfoam-mswin/] using mingw32 and CodeBlocks (note: development seems to have been dropped)
+
*Paid: [http://www.symscape.com Symscape's] OpenFlow: OpenFOAM for Windows [http://www.symscape.com/product/openflow]
+
*Paid: [http://www.bluecape.com.pt blueCAPE's] blueCFD: OpenFOAM for Windows XP and Vista, both 32 and 64bit [http://www.bluecape.com.pt/blueCFD]
+
*Unknown status: [http://www.scai.fraunhofer.de Fraunhofer SCAI] project - Porting Open Source HPC Software to Microsoft Windows Platforms [http://www.scai.fraunhofer.de/openmshpc/softwarepakete/openfoam.html] - availability is unknown, but a contact page exists [http://www.scai.fraunhofer.de/openmshpc/kontakt.html]
+
 
+
Benchmarks and run-times running OpenFOAM cross-compiled with mingw:
+
*{{version1.4.1}} icoDyMFoam (movingCone) OpenFOAM tutorial [http://www.symscape.com/openfoam-on-windows#comment-129]
+
*{{version1.4.1}} Xoodles pitzDaily3D OpenFOAM tutorial [http://www.symscape.com/openfoam-on-windows#comment-131]
+
*{{version1.6}} simpleFoam motorBike OpenFOAM tutorial [http://joomla.bluecape.com.pt/index.php?option=com_mamblog&Itemid=43&task=show&action=view&id=40&Itemid=43&lang=en]
+
 
+
Tutorials known to work with cross-compiled versions of OpenFOAM:
+
*{{version1.6}}{{version1.7}} [http://www.bluecape.com.pt blueCAPE's] list [http://joomla.bluecape.com.pt/index.php?option=com_mamblog&Itemid=43&task=show&action=view&id=44&Itemid=43&lang=en]
+
 
+
Threads at CFD-Online Forum for OpenFOAM, for discussing and questions about this page:
+
*Announcement of this page [http://www.cfd-online.com/Forums/openfoam-news-announcements-other/70063-cross-compiling-openfoam-1-6-linux-windows-32-64bits-mingw-w64.html]
+
*Support for this page is available [http://www.cfd-online.com/Forums/openfoam-installation-windows/72813-cross-compiling-openfoam-1-6-linux-windows-32-64bits-mingw-w64.html here].
+
 
+
= History =
+
[[User:Wyldckat|Wyldckat]] 15:46, 22 July 2010 (UTC) - Changes complete to this wiki page. Still have to create the page for the 1.7 version...
+
 
+
[[User:Wyldckat|Wyldckat]] 11:31, 22 July 2010 (UTC) - Changes have begun to be made to this wiki page to incorporate the patches for OpenFOAM 1.7. Most of the content has branched into separate pages.
+
 
+
[[User:Wyldckat|Wyldckat]] 14:34, 18 February 2010 (UTC) - Glitches were found in build-mingw32, and the fix is now provided inline with the tutorial.
+
A bit later, a thread has been added to give support to this page.
+
 
+
[[User:Wyldckat|Wyldckat]] 20:25, 19 January 2010 (UTC) - Updates to patches and wiki page:
+
*fixes made based on Symscape's version v9 for 1.6.x, because many of the solvers that use LES and RAS turbulence models need their libraries to be forced to load under Windows.
+
*'''chtMultiRegionFoam''' now works, with '''KK''' instead of '''K''' for Windows builds.
+
*Instructions on how to get OpenFOAM 1.6.x directly from repository using '''git''' under cygwin.
+
*'''reconstructParMesh''' wasn't being built because it wasn't in the respective '''Allwmake''' script.
+
*Linking OpenFOAM to MPICH2 no longer requires Wine to work straight out of the ''boxed up patch''.
+
*Added link to tutorials that are known to work with these patches.
+
 
+
[[User:Wyldckat|Wyldckat]] 22:20, 22 November 2009 (UTC) - Added information about cross-compiling in Cygwin
+
 
+
[[User:Wyldckat|Wyldckat]] 01:41, 21 November 2009 (UTC) - Added thread link for discussion about this page
+
 
+
[[User:Wyldckat|Wyldckat]] 18:20, 19 November 2009 (UTC) - Added info on cross-compiling with MPICH2, without Wine nor copying from Windows
+
 
+
[[User:Wyldckat|Wyldckat]] 11:58, 18 November 2009 (UTC) - Added info about using '''CHOICE.EXE''' with '''DOS_Mode.bat'''
+
 
+
[[User:Wyldckat|Wyldckat]] 18:21, 11 November 2009 (UTC) - First version of this step by step wiki page
+

Revision as of 00:29, 23 January 2011

This test page is empty for now, to stay out of the search engine.