Fixed win compilation isses; added binary package script

This commit is contained in:
Dominik Christ 2015-08-05 12:57:56 +01:00
parent 7367164292
commit 65f9c433ee
7 changed files with 447 additions and 448 deletions

View file

@ -1,97 +1,97 @@
#!/bin/sh #!/bin/sh
#----------------------------------*-sh-*-------------------------------------- #----------------------------------*-sh-*--------------------------------------
# ========= | # ========= |
# \\ / F ield | foam-extend: Open Source CFD # \\ / F ield | foam-extend: Open Source CFD
# \\ / O peration | Version: 3.2 # \\ / O peration | Version: 3.2
# \\ / A nd | Web: http://www.foam-extend.org # \\ / A nd | Web: http://www.foam-extend.org
# \\/ M anipulation | For copyright notice see file Copyright # \\/ M anipulation | For copyright notice see file Copyright
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
# This file is part of foam-extend. # This file is part of foam-extend.
# #
# foam-extend is free software: you can redistribute it and/or modify it # foam-extend is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the # under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your # Free Software Foundation, either version 3 of the License, or (at your
# option) any later version. # option) any later version.
# #
# foam-extend is distributed in the hope that it will be useful, but # foam-extend is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of # WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details. # General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with foam-extend. If not, see <http://www.gnu.org/licenses/>. # along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
# #
# Script # Script
# createReleasePackage.mingw # createReleasePackage.mingw
# #
# Description # Description
# Creates stand-alone .zip packages for MinGW-based builds on Windows. # Creates stand-alone .zip packages for MinGW-based builds on Windows.
# #
# Author: # Author:
# Cesare Guardino, Alstom Power Ltd., (2015) # Cesare Guardino, Alstom Power Ltd., (2015)
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
cd ${0%/*} || exit 1 # run from this directory cd ${0%/*} || exit 1 # run from this directory
create_package() { create_package() {
RELEASE_DIR=$1 RELEASE_DIR=$1
TYPE=$2 TYPE=$2
PACKAGE_FILE=$RELEASE_DIR.$TYPE PACKAGE_FILE=$RELEASE_DIR.$TYPE
echo "" echo ""
echo "Creating $PACKAGE_FILE ..." echo "Creating $PACKAGE_FILE ..."
7z -t$TYPE a $PACKAGE_FILE $RELEASE_DIR 7z -t$TYPE a $PACKAGE_FILE $RELEASE_DIR
if [ -f $PACKAGE_FILE ] ; then if [ -f $PACKAGE_FILE ] ; then
echo "Successfully created $PACKAGE_FILE" echo "Successfully created $PACKAGE_FILE"
else else
echo "Failed to create $PACKAGE_FILE" echo "Failed to create $PACKAGE_FILE"
fi fi
} }
echo echo
echo "=========== FOAM-EXTEND WINDOWS STAND-ALONE PACKAGE CREATION SCRIPT ===========" echo "=========== FOAM-EXTEND WINDOWS STAND-ALONE PACKAGE CREATION SCRIPT ==========="
if [ "$PWD" != "$WM_PROJECT_DIR/bin" ] if [ "$PWD" != "$WM_PROJECT_DIR/bin" ]
then then
echo "Error: Current directory is not \$WM_PROJECT_DIR/bin" echo "Error: Current directory is not \$WM_PROJECT_DIR/bin"
echo " The environment variable are not consistent with the installation." echo " The environment variable are not consistent with the installation."
echo " Check the OpenFOAM entries in your dot-files and source them." echo " Check the OpenFOAM entries in your dot-files and source them."
exit 1 exit 1
fi fi
RELEASE_DIR=$WM_PROJECT-$WM_FORK-$WM_PROJECT_VERSION-win-x64 RELEASE_DIR=$WM_PROJECT-$WM_FORK-$WM_PROJECT_VERSION-win-x64
MPI_VERSION=`basename $FOAM_MPI_LIBBIN` MPI_VERSION=`basename $FOAM_MPI_LIBBIN`
if [ -d $RELEASE_DIR ] ; then if [ -d $RELEASE_DIR ] ; then
echo "Removing previous $RELEASE_DIR" echo "Removing previous $RELEASE_DIR"
rm -rf $RELEASE_DIR rm -rf $RELEASE_DIR
fi fi
mkdir $RELEASE_DIR mkdir $RELEASE_DIR
echo "Copying bin directory ..." echo "Copying bin directory ..."
cp -rp $FOAM_APPBIN $RELEASE_DIR/bin cp -rp $FOAM_APPBIN $RELEASE_DIR/bin
echo "Copying DLLs from lib directory ..." echo "Copying DLLs from lib directory ..."
mkdir $RELEASE_DIR/lib mkdir $RELEASE_DIR/lib
cp -p $FOAM_LIBBIN/*.dll $RELEASE_DIR/lib cp -p $FOAM_LIBBIN/*.dll $RELEASE_DIR/lib
mkdir $RELEASE_DIR/lib/$MPI_VERSION mkdir $RELEASE_DIR/lib/$MPI_VERSION
cp -p $FOAM_MPI_LIBBIN/*.dll $RELEASE_DIR/lib/$MPI_VERSION cp -p $FOAM_MPI_LIBBIN/*.dll $RELEASE_DIR/lib/$MPI_VERSION
echo "Copying extra files from etc directory ..." echo "Copying extra files from etc directory ..."
mkdir $RELEASE_DIR/etc mkdir $RELEASE_DIR/etc
cp -p $WM_PROJECT_DIR/bin/setWindowsEnvironment.bat $RELEASE_DIR/ cp -p $WM_PROJECT_DIR/bin/setWindowsEnvironment.bat $RELEASE_DIR/
cp -p $WM_PROJECT_DIR/bin/foamWindowsShell.bat $RELEASE_DIR/ cp -p $WM_PROJECT_DIR/bin/foamWindowsShell.bat $RELEASE_DIR/
cp -p $WM_PROJECT_DIR/etc/controlDict-EXAMPLE $RELEASE_DIR/etc cp -p $WM_PROJECT_DIR/etc/controlDict-EXAMPLE $RELEASE_DIR/etc
cp -p $WM_PROJECT_DIR/etc/cellModels $RELEASE_DIR/etc cp -p $WM_PROJECT_DIR/etc/cellModels $RELEASE_DIR/etc
cp -rp $WM_PROJECT_DIR/etc/thermoData $RELEASE_DIR/etc cp -rp $WM_PROJECT_DIR/etc/thermoData $RELEASE_DIR/etc
cp -p $WM_PROJECT_DIR/doc/buildInstructions/Windows/READMEBinaryPackage.txt $RELEASE_DIR/ cp -p $WM_PROJECT_DIR/doc/buildInstructions/Windows/READMEBinaryPackage.txt $RELEASE_DIR/
cp -p $WM_PROJECT_DIR/bin/paraFoam.bat $RELEASE_DIR/bin cp -p $WM_PROJECT_DIR/bin/paraFoam.bat $RELEASE_DIR/bin
cp -p $WM_PROJECT_DIR/COPYING $RELEASE_DIR/LICENSE.txt cp -p $WM_PROJECT_DIR/COPYING $RELEASE_DIR/LICENSE.txt
unix2dos $RELEASE_DIR/LICENSE.txt unix2dos $RELEASE_DIR/LICENSE.txt
create_package $RELEASE_DIR zip create_package $RELEASE_DIR zip
#create_package $RELEASE_DIR 7z #create_package $RELEASE_DIR 7z
rm -rf $RELEASE_DIR rm -rf $RELEASE_DIR

View file

@ -1,12 +1,12 @@
@echo off @echo off
set FOAM_HOME=%~dp0 set FOAM_HOME=%~dp0
set FOAM_HOME=%FOAM_HOME:~0,-1% set FOAM_HOME=%FOAM_HOME:~0,-1%
call %FOAM_HOME%\setWindowsEnvironment.bat call %FOAM_HOME%\setWindowsEnvironment.bat
mode 160,40 mode 160,40
color 81 color 81
echo --------------------------------- echo ---------------------------------
echo Command shell for foam-extend-3.1 echo Command shell for foam-extend-3.1
echo --------------------------------- echo ---------------------------------
echo/ echo/
cmd.exe cmd.exe

View file

@ -1,12 +1,12 @@
@echo off @echo off
set CASE_DIR=%cd% set CASE_DIR=%cd%
for /d %%d in (%CASE_DIR%) do set CASE_FILE=%%~nxd.foam for /d %%d in (%CASE_DIR%) do set CASE_FILE=%%~nxd.foam
type nul >>%CASE_FILE% type nul >>%CASE_FILE%
set PARAVIEW_CMD=paraview --data="%CASE_FILE%" set PARAVIEW_CMD=paraview --data="%CASE_FILE%"
echo Running %PARAVIEW_CMD% ... echo Running %PARAVIEW_CMD% ...
%PARAVIEW_CMD% %PARAVIEW_CMD%
del /f %CASE_FILE% del /f %CASE_FILE%

View file

@ -1,16 +1,16 @@
@echo off @echo off
rem =========== USER EDITABLE SETTINGS =========== rem =========== USER EDITABLE SETTINGS ===========
rem set MPI_ROOTDIR=C:\Programs\OpenMPI_v1.6.1-x64 rem set MPI_ROOTDIR=C:\Programs\OpenMPI_v1.6.1-x64
rem set PARAVIEW_HOME=C:\Programs\ParaView-4.3.1 rem set PARAVIEW_HOME=C:\Programs\ParaView-4.3.1
rem ============================================== rem ==============================================
set FOAM_HOME=%~dp0 set FOAM_HOME=%~dp0
set FOAM_HOME=%FOAM_HOME:~0,-1% set FOAM_HOME=%FOAM_HOME:~0,-1%
set WM_PROJECT_DIR=%FOAM_HOME% set WM_PROJECT_DIR=%FOAM_HOME%
set MPI_BUFFER_SIZE=20000000 set MPI_BUFFER_SIZE=20000000
if defined PARAVIEW_HOME set PATH=%PARAVIEW_HOME%\bin;%PATH% if defined PARAVIEW_HOME set PATH=%PARAVIEW_HOME%\bin;%PATH%
if defined MPI_ROOTDIR set PATH=%MPI_ROOTDIR%\bin;%PATH% if defined MPI_ROOTDIR set PATH=%MPI_ROOTDIR%\bin;%PATH%
set PATH=%FOAM_HOME%\lib;%FOAM_HOME%\lib\openmpi-1.6.1;%FOAM_HOME%\bin;%PATH% set PATH=%FOAM_HOME%\lib;%FOAM_HOME%\lib\openmpi-1.6.1;%FOAM_HOME%\bin;%PATH%

View file

@ -1,218 +1,217 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# ========= | # ========= |
# \\ / F ield | foam-extend: Open Source CFD # \\ / F ield | foam-extend: Open Source CFD
# \\ / O peration | Version: 3.2 # \\ / O peration | Version: 3.2
# \\ / A nd | Web: http://www.foam-extend.org # \\ / A nd | Web: http://www.foam-extend.org
# \\/ M anipulation | For copyright notice see file Copyright # \\/ M anipulation | For copyright notice see file Copyright
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
# This file is part of foam-extend. # This file is part of foam-extend.
# #
# foam-extend is free software: you can redistribute it and/or modify it # foam-extend is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the # under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your # Free Software Foundation, either version 3 of the License, or (at your
# option) any later version. # option) any later version.
# #
# foam-extend is distributed in the hope that it will be useful, but # foam-extend is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of # WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details. # General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with foam-extend. If not, see <http://www.gnu.org/licenses/>. # along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
# #
# Script # Script
# doc/buildInstructions/Windows/README.txt # doc/buildInstructions/Windows/README.txt
# #
# Description # Description
# Environment setup and build instructions for MinGW-based Windows builds. # Environment setup and build instructions for MinGW-based Windows builds.
# #
# Author: # Author:
# Cesare Guardino, Alstom Power Ltd., (2015) # Cesare Guardino, Alstom Power Ltd., (2015)
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
1. INTRODUCTION 1. INTRODUCTION
=============== ===============
It is strongly recommended to install all required systems tools and utilities It is strongly recommended to install all required systems tools and utilities
in a directory with no embedded white spaces. You can skip some steps if you in a directory with no embedded white spaces. You can skip some steps if you
already have some of these system tools. already have some of these system tools.
2. INSTRUCTIONS FOR BUILDING ON WINDOWS 2. INSTRUCTIONS FOR BUILDING ON WINDOWS
======================================= =======================================
1) Download and install 7-Zip (see reference list below). This is necessary to 1) Download and install 7-Zip (see reference list below). This is necessary to
be able to unzip the rest of the required packages mentioned in later steps. be able to unzip the rest of the required packages mentioned in later steps.
2) Download and install wget, CMake, Git, MinGW-w64, ParaView and PExports (see 2) Download and install wget, CMake, Git, MinGW-w64, ParaView and PExports (see
reference list below). Note that some components (example PExports and GMake) reference list below). Note that some components (example PExports and GMake)
may already be available in other packages (such as Strawberry Perl), although may already be available in other packages (such as Strawberry Perl), although
you need to be careful of the version numbers. you need to be careful of the version numbers.
3) Download and install MSYS (see reference list below). 3) Download and install MSYS (see reference list below).
4) Download the foam-extend source code from http://sourceforge.net/projects/openfoam-extend/ 4) Download the foam-extend source code from http://sourceforge.net/projects/openfoam-extend/
5) Open a new MSYS shell and chdir to your foam-extend-3.1 source directory. 5) Open a new MSYS shell and chdir to your foam-extend-3.1 source directory.
6) Edit the user-modifiable entries in etc/bashrc.mingw to point to the 6) Edit the user-modifiable entries in etc/bashrc.mingw to point to the
locations where you have installed the required system tools in the first two locations where you have installed the required system tools in the first two
steps (the first two functions only in bashrc.mingw). The order in which they steps (the first two functions only in bashrc.mingw). The order in which they
are added to the PATH (in the add_to_path function) is very important. The are added to the PATH (in the add_to_path function) is very important. The
PATH is read from left to right, so ensure OpenMPI and MinGW compiler are PATH is read from left to right, so ensure OpenMPI and MinGW compiler are
prepended last to the PATH, so they are found first. prepended last to the PATH, so they are found first.
7) Source the file edited in the previous step using the command: 7) Source the file edited in the previous step using the command:
. etc/bashrc.mingw . etc/bashrc.mingw
(notice the dot "." command to source a file). This action sources other (notice the dot "." command to source a file). This action sources other
files as required, and also performs a check on the versions of the installed files as required, and also performs a check on the versions of the installed
system tools. An example output is shown at the end of this file. system tools. An example output is shown at the end of this file.
8) If "mpirun.exe" failed to run due to a missing DLL (eg. msvcr100.dll), you 8) If "mpirun.exe" failed to run due to a missing DLL (eg. msvcr100.dll), you
may need to install the Microsoft Visual C++ 2010 Redistributable Package (see may need to install the Microsoft Visual C++ 2010 Redistributable Package (see
reference list below). reference list below).
9) If the version checks were all successful and printed the expected version 9) If the version checks were all successful and printed the expected version
details, proceed with compiling the code. Run "Allwmake.mingw". This will details, proceed with compiling the code. Run "Allwmake.mingw". This will
download and build all required third-party dependencies, build the entire download and build all required third-party dependencies, build the entire
foam-extend code, and also create a stand-alone .zip package. foam-extend code, and also create a stand-alone .zip package.
10) After the build has completed, you can run foam in either of two ways: 10) After the build has completed, you can run foam in either of two ways:
(a). From the MSYS shell. This allows use of the utility programs and shell (a). From the MSYS shell. This allows use of the utility programs and shell
scripts in the bin directory (such as paraFoam). This is the recommended scripts in the bin directory (such as paraFoam). This is the recommended
approach for developers. approach for developers.
(b). From a standard Windows CMD.exe command prompt using the created (b). From a standard Windows CMD.exe command prompt using the created
foam-extend-3.1-win-x64.zip stand-alone package. This can be used on any foam-extend-3.1-win-x64.zip stand-alone package. This can be used on any
Windows machine without access to MSYS shells or compilers. See the README.txt Windows machine without access to MSYS shells or compilers. See the README.txt
contained within the package for further details. contained within the package for further details.
3. EXTERNAL PACKAGE REFERENCE 3. EXTERNAL PACKAGE REFERENCE
============================= =============================
Name : 7-Zip Name : 7-Zip
Version: 9.20 (or above) Version: 9.20 (or above)
URL : http://www.7-zip.org/a/7z920-x64.msi URL : http://www.7-zip.org/a/7z920-x64.msi
For : Extracting .zip and .7z files (can also be used to extract .tar.gz, .tar.bz2 etc.) For : Extracting .zip and .7z files (can also be used to extract .tar.gz, .tar.bz2 etc.)
Name : CMake Name : CMake
Version: 3.2.3 (or above) Version: 3.2.3 (or above)
URL : http://www.cmake.org/files/v3.2/cmake-3.2.3-win32-x86.zip URL : http://www.cmake.org/files/v3.2/cmake-3.2.3-win32-x86.zip
For : Required for building metis and parmetis third-party libraries. For : Required for building metis and parmetis third-party libraries.
Name : Git Name : Git
Version: 1.9.5 Version: 1.9.5
URL : https://git-scm.com/download/win URL : https://git-scm.com/download/win
For : Version control system. Choose "Use Git from the Windows command prompt" and "Check out as-is. Commit as-is" in installer. For : Version control system. Choose "Use Git from the Windows command prompt" and "Check out as-is. Commit as-is" in installer.
Name : Microsoft Visual C++ 2010 Redistributable Package (x64) Name : Microsoft Visual C++ 2010 Redistributable Package (x64)
Version: 2010 Version: 2010
URL : http://www.microsoft.com/en-us/download/details.aspx?id=14632 URL : http://www.microsoft.com/en-us/download/details.aspx?id=14632
For : msvcr100.dll required by OpenMPI For : msvcr100.dll required by OpenMPI
Name : MinGW-w64 Name : MinGW-w64
Version: 4.8.2 (or above) Version: 4.8.2 (or above)
URL : http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.8.2/threads-win32/seh/x86_64-4.8.2-release-win32-seh-rt_v3-rev3.7z/download URL : http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.8.2/threads-win32/seh/x86_64-4.8.2-release-win32-seh-rt_v3-rev3.7z/download
For : Windows port of GCC C/C++ compiler (also includes Fortran compiler). For : Windows port of GCC C/C++ compiler (also includes Fortran compiler).
Name : MSYS Name : MSYS
Version: Latest Version: Latest
URL : http://www.mingw.org/download/installer URL : http://www.mingw.org/download/installer
For : Provides Linux-like emulation shell and utilities (eg. find, grep, ls, make etc.) and tools (eg. bison, flex, m4, yacc etc.). For : Provides Linux-like emulation shell and utilities (eg. find, grep, ls, make etc.) and tools (eg. bison, flex, m4, yacc etc.).
Only the "mingw-developer-toolkit" and "msys-base" is required, DO NOT download ming32-* compiler packages (we use MinGW-w64 instead). Only the "mingw-developer-toolkit" and "msys-base" is required, DO NOT download ming32-* compiler packages (we use MinGW-w64 instead).
Assuming you installed this to the default /c/MinGW directory, you will need to "cp -p make.exe gmake.exe" in /c/MinGW/msys/1.0/bin (unless have Strawberry Perl). Assuming you installed this to the default /c/MinGW directory, you will need to "cp -p make.exe gmake.exe" in /c/MinGW/msys/1.0/bin (unless have Strawberry Perl).
Name : OpenMPI Name : OpenMPI
Version: 1.6.1 (or above) Version: 1.6.1 (or above)
URL : http://www.open-mpi.org/software/ompi/v1.6/downloads/OpenMPI_v1.6.1-1_win64.exe URL : http://www.open-mpi.org/software/ompi/v1.6/downloads/OpenMPI_v1.6.1-1_win64.exe
For : Bulding and running OpenMPI applications. Do not add to PATH in installer. For : Bulding and running OpenMPI applications. Do not add to PATH in installer.
Name : ParaView Name : ParaView
Version: 4.3.1 (or above) Version: 4.3.1 (or above)
URL : http://www.paraview.org/download/ URL : http://www.paraview.org/download/
For : Graphically visualising foam results. For : Graphically visualising foam results.
Name : PExports Name : PExports
Version: 0.44 (or above) Version: 0.44 (or above)
URL : http://sourceforge.net/projects/mingw/files/MinGW/Extension/pexports/pexports-0.46/pexports-0.46-mingw32-bin.tar.xz/download URL : http://sourceforge.net/projects/mingw/files/MinGW/Extension/pexports/pexports-0.46/pexports-0.46-mingw32-bin.tar.xz/download
For : Extracting symbols from OpenMPI DLLs to pass to dlltool.exe (supplied in MinGW-w64 package). Rename directory "bin" to "pexports" after unpacking. For : Extracting symbols from OpenMPI DLLs to pass to dlltool.exe (supplied in MinGW-w64 package). Rename directory "bin" to "pexports" after unpacking.
Name : Strawberry Perl Name : Strawberry Perl
Version: 5.20.2.1 (or above) Version: 5.20.2.1 (or above)
URL : http://strawberryperl.com/download/5.20.2.1/strawberry-perl-5.20.2.1-64bit.msi URL : http://strawberryperl.com/download/5.20.2.1/strawberry-perl-5.20.2.1-64bit.msi
For : Running Perl scripts, "pexports.exe" and "gmake.exe" utilities For : Running Perl scripts, "pexports.exe" and "gmake.exe" utilities
Name : wget Name : wget
Version: 1.11.4-1 (or above) Version: 1.11.4-1 (or above)
URL : http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-bin.zip, http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-dep.zip, http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-doc.zip URL : http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-bin.zip, http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-dep.zip, http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-doc.zip
For : Automatically downloading files from internet (eg. for use in automated build scripts) For : Automatically downloading files from internet (eg. for use in automated build scripts)
git clone --branch nameClashesForWinPort git://git.code.sf.net/u/dominikchrist/foam-extend-3.1-dc foam-extend-3.1-win git clone --branch nameClashesForWinPort git://git.code.sf.net/u/dominikchrist/foam-extend-3.1-dc foam-extend-3.1-win
4. EXAMPLE OUTPUT FROM SOUCING etc/bashrc.mingw 4. EXAMPLE OUTPUT FROM SOUCING etc/bashrc.mingw
=============================================== ===============================================
$ . etc/bashrc.mingw $ . etc/bashrc.mingw
Setting environment variables for user-defined installed system tools and utilities ... Setting environment variables for user-defined installed system tools and utilities ...
Sourcing: /c/Users/UserName/Git/foam-extend-3.1/etc/bashrc Sourcing: /c/Users/UserName/Git/foam-extend-3.1/etc/bashrc
Sourcing: /c/Users/UserName/Git/foam-extend-3.1/etc/prefs.sh.mingw Sourcing: /c/Users/UserName/Git/foam-extend-3.1/etc/prefs.sh.mingw
Sourcing: /c/Users/UserName/Git/foam-extend-3.1/etc/settings.sh Sourcing: /c/Users/UserName/Git/foam-extend-3.1/etc/settings.sh
MESQUITE_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/mesquite-2.1.2 MESQUITE_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/mesquite-2.1.2
METIS_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/metis-5.1.0 METIS_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/metis-5.1.0
PARMETIS_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/parmetis-4.0.3 PARMETIS_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/parmetis-4.0.3
PARMGRIDGEN_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/ParMGridGen-1.0 PARMGRIDGEN_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/ParMGridGen-1.0
LIBCCMIO_DIR is initialized to: LIBCCMIO_DIR is initialized to:
SCOTCH_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/scotch_6.0.0 SCOTCH_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/scotch_6.0.0
SCOTCH_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/scotch_6.0.0 SCOTCH_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/packages/scotch_6.0.0
CMAKE_DIR is initialized to: CMAKE_DIR is initialized to:
M4_DIR is initialized to: M4_DIR is initialized to:
BISON_DIR is initialized to: BISON_DIR is initialized to:
FLEX_DIR is initialized to: /C/MinGW/msys/1.0//bin/.. FLEX_DIR is initialized to: /C/MinGW/msys/1.0//bin/..
ZOLTAN_DIR is initialized to: ZOLTAN_DIR is initialized to:
PYTHON_DIR is initialized to: PYTHON_DIR is initialized to:
PYFOAM_DIR is initialized to: PYFOAM_DIR is initialized to:
PYFOAM_SITE_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/PyFoamSiteScripts PYFOAM_SITE_DIR is initialized to: /c/Users/UserName/Git/foam-extend-3.1/ThirdParty/PyFoamSiteScripts
HWLOC_DIR is initialized to: HWLOC_DIR is initialized to:
QT_DIR is initialized to: QT_DIR is initialized to:
PARAVIEW_DIR is initialized to: PARAVIEW_DIR is initialized to:
LLVM_DIR is initialized to: LLVM_DIR is initialized to:
MESA_DIR is initialized to: MESA_DIR is initialized to:
Sourcing: /c/Users/UserName/Git/foam-extend-3.1/etc/aliases.sh Sourcing: /c/Users/UserName/Git/foam-extend-3.1/etc/aliases.sh
Adding user-defined installed system tools to PATH ... Adding user-defined installed system tools to PATH ...
Setting OpenMPI environment settings ... Setting OpenMPI environment settings ...
Checking versions of installed system tools (based on PATH) ... Checking versions of installed system tools (based on PATH) ...
7-Zip: /c/Program Files/7-Zip/7z.exe [ 7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18] 7-Zip: /c/Program Files/7-Zip/7z.exe [ 7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18]
Bison: /bin/bison.exe [bison (GNU Bison) 2.4.2] Bison: /bin/bison.exe [bison (GNU Bison) 2.4.2]
CMake: /c/Programs/cmake-3.2.3-win32-x86/bin/cmake.exe [cmake version 3.2.3] CMake: /c/Programs/cmake-3.2.3-win32-x86/bin/cmake.exe [cmake version 3.2.3]
Flex: /bin/flex.exe [flex 2.5.35] Flex: /bin/flex.exe [flex 2.5.35]
G++: /c/Programs/x86_64-4.8.2-release-win32-seh-rt_v3-rev3/mingw64/bin/g++.exe [g++.exe (x86_64-win32-seh-rev3, Built by MinGW-W64 project) 4.8.2] G++: /c/Programs/x86_64-4.8.2-release-win32-seh-rt_v3-rev3/mingw64/bin/g++.exe [g++.exe (x86_64-win32-seh-rev3, Built by MinGW-W64 project) 4.8.2]
GCC: /c/Programs/x86_64-4.8.2-release-win32-seh-rt_v3-rev3/mingw64/bin/gcc.exe [gcc.exe (x86_64-win32-seh-rev3, Built by MinGW-W64 project) 4.8.2] GCC: /c/Programs/x86_64-4.8.2-release-win32-seh-rt_v3-rev3/mingw64/bin/gcc.exe [gcc.exe (x86_64-win32-seh-rev3, Built by MinGW-W64 project) 4.8.2]
GMake: /c/Programs/strawberry-perl-5.20.2.1-64bit/c/bin/gmake.exe [GNU Make 4.0.90] GMake: /c/Programs/strawberry-perl-5.20.2.1-64bit/c/bin/gmake.exe [GNU Make 4.0.90]
Git: /c/Programs/Git/cmd/git.exe [git version 1.9.5.msysgit.1] Git: /c/Programs/Git/cmd/git.exe [git version 1.9.5.msysgit.1]
Java: /c/ProgramData/Oracle/Java/javapath/java.exe [java version "1.8.0_45"] Java: /c/ProgramData/Oracle/Java/javapath/java.exe [java version "1.8.0_45"]
M4: /bin/m4.exe [m4 (GNU M4) 1.4.16] M4: /bin/m4.exe [m4 (GNU M4) 1.4.16]
Make: /bin/make.exe [GNU Make 3.81] Make: /bin/make.exe [GNU Make 3.81]
MinGW-w64: /c/Programs/x86_64-4.8.2-release-win32-seh-rt_v3-rev3/mingw64 MinGW-w64: /c/Programs/x86_64-4.8.2-release-win32-seh-rt_v3-rev3/mingw64
OpenMPI: /c/Programs/OpenMPI_v1.6.1-x64/bin/mpirun.exe [mpirun.exe (OpenRTE) 1.6.1] OpenMPI: /c/Programs/OpenMPI_v1.6.1-x64/bin/mpirun.exe [mpirun.exe (OpenRTE) 1.6.1]
PEexports: /c/Programs/strawberry-perl-5.20.2.1-64bit/c/bin/pexports.exe [PExports 0.44 Copyright 1998, Anders Norlander] PEexports: /c/Programs/strawberry-perl-5.20.2.1-64bit/c/bin/pexports.exe [PExports 0.44 Copyright 1998, Anders Norlander]
ParaView: /c/Programs/ParaView-4.3.1 ParaView: /c/Programs/ParaView-4.3.1
Perl: /c/Programs/strawberry-perl-5.20.2.1-64bit/perl/bin/perl.exe [ This is perl 5, version 20, subversion 2 (v5.20.2) built for MSWin32-x64-multi-thread] Perl: /c/Programs/strawberry-perl-5.20.2.1-64bit/perl/bin/perl.exe [ This is perl 5, version 20, subversion 2 (v5.20.2) built for MSWin32-x64-multi-thread]
Python: /c/Programs/Python27/python.exe [Python 2.7.9] Python: /c/Programs/Python27/python.exe [Python 2.7.9]
Subversion: /c/Programs/svn-win32-1.8.13/bin/svn.exe [svn, version 1.8.13 (r1667537)] Subversion: /c/Programs/svn-win32-1.8.13/bin/svn.exe [svn, version 1.8.13 (r1667537)]
Vim: /bin/vim.exe [VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Mar 19 2011 15:37:04)] Vim: /bin/vim.exe [VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Mar 19 2011 15:37:04)]
Wget: /c/Programs/wget-1.11.4-1/bin/wget.exe [GNU Wget 1.11.4 Copyright (C) 2008 Free Software Foundation, Inc.] Wget: /c/Programs/wget-1.11.4-1/bin/wget.exe [GNU Wget 1.11.4 Copyright (C) 2008 Free Software Foundation, Inc.]
FOAM_INST_DIR=/c/Users/UserName/Git FOAM_INST_DIR=/c/Users/UserName/Git
WM_PROJECT_DIR=/c/Users/UserName/Git/foam-extend-3.1 WM_PROJECT_DIR=/c/Users/UserName/Git/foam-extend-3.1
WM_OSTYPE=MSWindows WM_OSTYPE=MSWindows
ENVIRONMENT SETUP COMPLETE. ENVIRONMENT SETUP COMPLETE.

View file

@ -1,92 +1,92 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# ========= | # ========= |
# \\ / F ield | foam-extend: Open Source CFD # \\ / F ield | foam-extend: Open Source CFD
# \\ / O peration | Version: 3.2 # \\ / O peration | Version: 3.2
# \\ / A nd | Web: http://www.foam-extend.org # \\ / A nd | Web: http://www.foam-extend.org
# \\/ M anipulation | For copyright notice see file Copyright # \\/ M anipulation | For copyright notice see file Copyright
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
# This file is part of foam-extend. # This file is part of foam-extend.
# #
# foam-extend is free software: you can redistribute it and/or modify it # foam-extend is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the # under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your # Free Software Foundation, either version 3 of the License, or (at your
# option) any later version. # option) any later version.
# #
# foam-extend is distributed in the hope that it will be useful, but # foam-extend is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of # WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details. # General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with foam-extend. If not, see <http://www.gnu.org/licenses/>. # along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# README_Windows.txt # README_Windows.txt
# #
# Description # Description
# Installation and usage instructions for stand-alone Windows builds. # Installation and usage instructions for stand-alone Windows builds.
# #
# Author: # Author:
# Cesare Guardino, Alstom Power Ltd., (2015) # Cesare Guardino, Alstom Power Ltd., (2015)
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
********************************************************************************************** **********************************************************************************************
********************************************************************************************** **********************************************************************************************
***** IMPORTANT: THIS IS VERSION IS NOT FULLY TESTED OR VALIDATED. PLEASE USE WITH CARE. ***** ***** IMPORTANT: THIS IS VERSION IS NOT FULLY TESTED OR VALIDATED. PLEASE USE WITH CARE. *****
********************************************************************************************** **********************************************************************************************
********************************************************************************************** **********************************************************************************************
INSTRUCTIONS ON HOW TO INSTALL AND RUN THE WINDOWS VERSION OF FOAM-EXTEND INSTRUCTIONS ON HOW TO INSTALL AND RUN THE WINDOWS VERSION OF FOAM-EXTEND
------------------------------------------------------------------------- -------------------------------------------------------------------------
1) Unzip the package file to any suitable directory (with no whitespaces) on your computer. 1) Unzip the package file to any suitable directory (with no whitespaces) on your computer.
2) Install OpenMPI if you do not already have it. You can download this from: 2) Install OpenMPI if you do not already have it. You can download this from:
http://www.open-mpi.org/software/ompi/v1.6/downloads/OpenMPI_v1.6.1-1_win64.exe http://www.open-mpi.org/software/ompi/v1.6/downloads/OpenMPI_v1.6.1-1_win64.exe
It is strongly recommended to install this in a directory with no whitespaces. It is strongly recommended to install this in a directory with no whitespaces.
Once installed, create a new environment variable called MPI_ROOTDIR to point to the Once installed, create a new environment variable called MPI_ROOTDIR to point to the
installation directory where you install OpenMPI. installation directory where you install OpenMPI.
3) If you wish to perform post-processing using ParaView and you do not already have it, 3) If you wish to perform post-processing using ParaView and you do not already have it,
you can download ParaView from: you can download ParaView from:
http://www.paraview.org/download http://www.paraview.org/download
It is strongly recommended to install this in a directory with no whitespaces. It is strongly recommended to install this in a directory with no whitespaces.
Once installed, create a new environment variable called PARAVIEW_HOME to point to the Once installed, create a new environment variable called PARAVIEW_HOME to point to the
installation directory where you install ParaView. installation directory where you install ParaView.
4) Start a new CMD (DOS) prompt, and run the following command: 4) Start a new CMD (DOS) prompt, and run the following command:
call <PATH_TO_FOAM>\setWindowsEnvironment.bat call <PATH_TO_FOAM>\setWindowsEnvironment.bat
where <PATH_TO_FOAM> is the full path of the directory where you unzipped the package. where <PATH_TO_FOAM> is the full path of the directory where you unzipped the package.
The foam environment is now configured correctly for use within this CMD prompt only. The foam environment is now configured correctly for use within this CMD prompt only.
Alternatively, create a desktop shortcut to <PATH_TO_FOAM>\foamWindowsShell.bat Alternatively, create a desktop shortcut to <PATH_TO_FOAM>\foamWindowsShell.bat
When you double-click this shortcut, a new CMD prompt is open with the foam environment automatically set. When you double-click this shortcut, a new CMD prompt is open with the foam environment automatically set.
5) From the CMD prompts opened in the previous step, you can now run the usual foam applications, for example: 5) From the CMD prompts opened in the previous step, you can now run the usual foam applications, for example:
cd /d <PATH_TO_CASE> cd /d <PATH_TO_CASE>
blockMesh blockMesh
sonicFoam sonicFoam
6) To run in parallel using using OpenMPI, run (for example): 6) To run in parallel using using OpenMPI, run (for example):
cd /d <PATH_TO_CASE> cd /d <PATH_TO_CASE>
decomposePar decomposePar
mpirun -np 4 sonicFoam.exe -parallel mpirun -np 4 sonicFoam.exe -parallel
7) To post-process the results using ParaView, just run "parafoam" in the case directory: 7) To post-process the results using ParaView, just run "parafoam" in the case directory:
cd /d <PATH_TO_CASE> cd /d <PATH_TO_CASE>
parafoam parafoam
This will create a temporary .foam file in the case directory and automatically launch ParaView. This will create a temporary .foam file in the case directory and automatically launch ParaView.
NOTES NOTES
----- -----
1) This version does not fully support runtime selection of extended features. If necessary, you can 1) This version does not fully support runtime selection of extended features. If necessary, you can
explicitly load the required DLL using the "libs" function in system/controlDict, for example: explicitly load the required DLL using the "libs" function in system/controlDict, for example:
libs ("liblduSolvers.dll"); libs ("liblduSolvers.dll");
2) foam-extend is licensed under GPL v3. The source code is available from http://sourceforge.net/projects/openfoam-extend/ 2) foam-extend is licensed under GPL v3. The source code is available from http://sourceforge.net/projects/openfoam-extend/

View file

@ -83,7 +83,7 @@ setup_foam_env() {
} }
set_OMPI_env() { set_OMPI_env() {
echo "Setting OpenMPI environment settings ..." echo "Setting OpenMPI environment settings ..."
export OMPI_MPICC=gcc.exe export OMPI_MPICC=gcc.exe
export OMPI_MPIXX=g++.exe export OMPI_MPIXX=g++.exe
export OMPI_CXXFLAGS==-I$MPI_ROOTDIR/include export OMPI_CXXFLAGS==-I$MPI_ROOTDIR/include