CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   OpenFOAM 14 for WindowstmCygwin (

pvita June 13, 2007 11:49

Greetings all! OpenFOAM 1.4
Greetings all!

OpenFOAM 1.4 basis is successfully ported on Windows(tm)/Cygwin platform. You can download whole port from OpenFOAM Extensions project, tab Downloads, hosted on Check this website for future Cygwin port releases.

Package OpenFOAM-1.4-1.cygwin.src.tar.bz2 is a source distribution that compiles without problems under Cygwin. It is a case-insensitive distribution, you can directly unpack it onto Windows file system. Read carefully a README.Cygwin before you start, please. I won't support anybody who has problems 'cause of his inability to read that file.

Package gcc-4.1.2-cygwin.i686.tar.bz2 contains binaries of a GNU GCC compiler, that is compiled with all necessary configuration switches. Do not use GNU GCC distributed with Cygwin, your OpenFOAM won't work with it.

Unported futures at this very moment are FoamX, patchTool and parallel stuff. Further porting work is in progress and concentrates exactly on the missing futures.

Your feedback and bug reports are welcome.

With best regards,

frank June 13, 2007 22:39

Thanks, Good job! Although I
Thanks, Good job!
Although I usually run it on SuSE, it's still wonderful work for the ALL users, it is an alternative.


7islands June 14, 2007 09:37

Thanks for a great work! Wh
Thanks for a great work!

When I tried building the port on a 1 GBytes machine, linking libfiniteVolume.dll failed due to, guess what, out of memory. Observation with the task manager after allocating 2 GBytes (it was a VM on Linux) revealed the process to take about 820 MBytes, so those who try building the beast might want to have enough RAM space.

Other than that compilation seems to have finished without noticable trouble. Again, thanks for an impressive porting work.


dimka June 14, 2007 10:02

I have similar problem try to
I have similar problem try to use in linking stage -Wl,--large-address-aware you will get 2048Mb per process

pvita June 14, 2007 10:11

I compiled whole OpenFOAM-1.4-
I compiled whole OpenFOAM-1.4-1.cygwin.src.tar.bz2 distro on a native Windows notebook with 1GB RAM only during Zagreb workshop. Could it be related to VM on Linux?


7islands June 14, 2007 10:21

Or might be because of using a
Or might be because of using a localized (Japanese) version of Windows (Japanese version is said to take a lot more RAM than English version).


pvita June 15, 2007 10:31

Greetings! I am not sure if

I am not sure if it is normal to make a new release 2 days after 1st one, but well, things happens.

Therefore, I proudly announce new Cygwin port release OpenFOAM-1.4-2.cygwin.src.tar.gz, you can download from OpenFOAM Extensions project.

What is so new to make it up for a new release? Parallelization and tons of small scripts shavings and polishes! You are getting historically the first Cygwin port that is coming with parallel computations based on LAM/MPI. I successfully ran a tutorial example damBreak balanced on 2 processors of my old good Intel Pentium CPU with HyperThreading under Windows. And no, I am not going to make screenshots for you, do them yourself.

Port compiles, straight of package, into a non-parallel version, you have to just uncomment WM_MPLIB variable in bashrc file. Rest is a cake as usual.

Nice Weekend!

PS: You who are unsure what Windows/Cygwin is and if it is good for you, visit Cygwin Website first, please.
PS2: For those who cannot get README.Cygwin out of an archive to read it, here it is attached for you. You can as well use bunzip2 followed by tar to unpack it yourself. README.Cygwin

7islands August 7, 2007 05:22

Hi Petr and OpenFOAM extension
Hi Petr and OpenFOAM extensions people,

Now that I finished the porting work of FoamX/patchTool/"paraFoam via native reader" over the OpenFOAM-1.4-2.cygwin release, I'm attaching the patch. I think it'd be nice if the patch is included in the cygwin port distribution.

In fact, this time Petr and I have agreed beforehand to include FoamX-patch in the Cygwin port of OpenFOAM upon completion, so I sent the patch to Petr twice but currently I have no response. Could anyone in OpenFOAM extensions project contact him?

Of course anyone who's intersted in the patch can try it, and I'd be glad to hear how it works or not.

1. Before applying the patch you need to pull mico-2.3.12 distribution from the official OpenFOAM-1.4 source tarball or from MICO website and place it under OpenFOAM-1.4/src.

2. There's not so much to mention technically because the patch basically carries over the work from 1.3. One exception, however, is that now you don't have to set JAVA_HOME manually - the initialization script looks for the newest JDK under the %PROGRAMFILES%\Java directory (usually C:\Program Files\Java).

Takuya FoamX-cygwin-20070723.diff.gz

7islands August 7, 2007 05:36

Hi, Here's another patch ag

Here's another patch again for OpenFOAM-1.4-2.cygwin. This is a collection of fixes for whatever I noticed while using but not related to FoamX-stuff.

The patch includes
* fix to ccm26ToFoam building problem
* fix to libphaseModel building problem
* porting of some of the scripts under OpenFOAM-1.4/bin (foamInstallationTest etc.)
* slight modifications to Pstream/Allwmake and wmake/makeWmake
* modification to .so loader (dlLibraryTable.C) so that .dll files can be loaded even if a file with .so extension is specified
* workaround for kivaToFoam crash
* dieselFoam/aachenBomb problem reported here. OpenFOAM-1.4-misc-patch-20070807.diff.gz


7islands August 7, 2007 05:46

I forgot to mention the misc p
I forgot to mention the misc patch includes fix for Windows Vista (CYGWIN_NT-6.0). Besides, on Vista it seems that you need to run FoamX once from a console with Admin privilege.


gschaider August 7, 2007 07:00

Hi Takuya! Petr is currentl
Hi Takuya!

Petr is currently not very frequently reading his EMail. I'll tell him to get in touch.


7islands August 7, 2007 08:56

Hi Bernhard, I hope he's fine
Hi Bernhard,
I hope he's fine and just out for vacation - Thanks!


7islands August 8, 2007 05:21

Oops, sorry the Vista-fix wasn
Oops, sorry the Vista-fix wasn't actually included. Here's the right one: OpenFOAM-1.4-misc-patch-20070808.diff.gz

pvita August 9, 2007 05:30

Thank you for a patch! I will
Thank you for a patch! I will merge it with 1.4-2 release and get it out, as soon as it compiles on my rig.

-- PV

pvita September 18, 2007 09:30

Greetings! I am sorry it to

I am sorry it took so long, but my holidays, illness, me being busy and week problems to get the last release up on the delayed whole long anticipated Cygwin port. Thanks to Takuya Oshima we got now even FoamX and paraFoam working and with that we got all features running on Windows/Cygwin platform. You can download last release OpenFOAM-1.4-3.cygwin.src.tar.bz2 as usual from OpenFOAM Extensions project.

Regarding the release of OpenFOAM 1.4.1, I am skeptic we will port it any soon. Hm. I hope Bernhard won't kick me into it.

Have your fun!

djmeyer September 30, 2007 07:31

Wow, I just arrived here at Op
Wow, I just arrived here at OpenFOAM and I am impressed with the effort just in this thread!

This port is ideal for me so I will try to install it soon. One question. How will this work on an Intel Core Duo processor? Will this need to use the parallelisation feature to get the most form it?

nsp82 September 30, 2007 10:19

Hello! I would like to know

I would like to know if these cygwin ports will do the job submitted from a linux distro under parallel mode .... ?

Thats coz we have very few linux boxes here and most are windoze. But I sure would like to use those processors ...


djmeyer September 30, 2007 22:59

I am having some issues with C
I am having some issues with Cygwin trying to install OpenFOAM. I am new to Cygwin and not an expert in Linux.

1st. When I run bashrc I get a message saying

ls: cannot access jgk*: No such file or directory

I set the ALT_UNIXCOMMAND_PATH to my jdk directory and I still get the message.

I tried to run Allwmake anyway and it produced a large number of errors such as these.

+ cd wmake
+ ./makeWmake
Makefile:61: /rules//general: No such file or directory
Makefile:62: /rules: No such file or directory
make: *** No rule to make target `/rules'. Stop.
ln: creating symbolic link `Makefile': File exists
ln: creating symbolic link `MakefileFiles': File exists
+ cd src
+ ./Allwmake
+ cd /OpenFOAM
./Allwmake: line 4: cd: /OpenFOAM: No such file or directory
+ wmakeLnInclude .
./Allwmake: line 4: wmakeLnInclude: command not found
+ wmake libso zlib-1.2.1
./Allwmake: line 6: wmake: command not found
+ wmake libso foamUser
./Allwmake: line 7: wmake: command not found

I have installed OpenFOAM in the following directory


The jdk is installed in the C:\Program Files\Java\jrockit-R27.3.1-jdk1.6.0_01 directory.

As far as I can work out i have installed all of the additional modules required for OpenFOAM as per the Readme. In additon there were some modules recommended for java that I added.

Any help would be appreciated.

7islands October 1, 2007 08:09

Hi David, @JDK installation:
Hi David,
@JDK installation: in your case you have to set JAVA_HOME to your JDK installation directory manually by editing the line 175 of ~/OpenFOAM/OpenFOAM-1.4/.bashrc, as written in README.Cygwin.

@Allwmake problem: you have to run source ~/OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/bashrc before running ./Allwmake.


djmeyer October 2, 2007 07:38

Takuya, Thanks for the help

Thanks for the help. I don't see anything in the README about editing line 175. I had made JAVA_HOME = ..jdk.. a windows envirnonment variable.

I still get the "ls: cannot access jdk*: No such file or directory" message now.

Does anyone know if running OpenFOAM with cygwin would be better or worse than installing vmware and running it under linux?

All times are GMT -4. The time now is 14:06.