CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

OpenFOAM Cygwin port updated to 13

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 10, 2006, 23:51
Default I've now updated Petr Vita's p
  #1
brooksmoses
Guest
 
Posts: n/a
I've now updated Petr Vita's patch to work with OpenFOAM-1.3, and have produced source and binary distribution files for it. Those are now available at http://dpdx.net/openfoam-cygwin.

In addition, for those still using OpenFOAM-1.2, I've incorporated the latest bugfixes for the bugs that Philippe Straet reported, and there are updated packages for that on the site as well.

These are not quite complete ports; we haven't yet tried to port FoamX or ParaFoam/ParaView. Also, Petr is still working on getting the parallel code to work; hopefully that will be working soon. However, everything else should be working.

...

There are a few changes to the Cygwin port that are new with OpenFOAM-1.3. First, I've rearranged how the dependency loop between dummy/libPstream and libOpenFOAM is resolved; on Cygwin, we now compile libOpenFOAM first, and link dummy/libPstream to it. This simplifies the relevant Make/files files quite a bit, and should be vastly easier for the OpenFOAM team to keep up to date if Hrv incorporates these changes into the main tree.

As with the OpenFOAM-1.2 port, I've compiled a set of patch files that contain the various changes; those are also linked and described at the above page. I've tried to separate the "bulk" changes (e.g., the changes to dozens of Make/options files) from the "interesting" changes, so as to make the patch files readable. This time around, it turns out that all the renaming that I did to make things work on a case-insensitive filesystem does not affect any of the other changes; thus, one should be able to apply patches 0.2 through 0.5 to an unmodified OpenFOAM-1.3 source tree.

In addition, most of the changes have been wrapped with "#ifdef cygwin" or such if they seem likely to affect compilation on other platforms, and the source tree from this port (either with the renamed files, or generated via patch files as above) should compile cleanly on any supported platform. I'm actually not sure if we need to wrap the Make/options changes in "#ifdef cygwin", but that's how Petr did it, so I'm keeping it that way for simplicity.

As always, feel free to report bugs, suggestions, or questions in this thread.
  Reply With Quote

Old   April 11, 2006, 03:44
Default Just one important thing. M
  #2
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
Just one important thing.

My managed mount was set to /manage, with this name
I will hit a filename length limit for one file (its one character too long)
So it is really important to keep the name as short as possible, setting it to /m instead allows me
to unpack it as usual.

N
niklas is offline   Reply With Quote

Old   April 11, 2006, 04:10
Default Ah, right -- I forgot to menti
  #3
brooksmoses
Guest
 
Posts: n/a
Ah, right -- I forgot to mention this! The packages that I've created have all the relevant source files renamed so that they don't require usage of a managed mount at all, for anything. They work fine in a case-insensitive normal Windows filesystem.

Of course, if you're using the official OpenFOAM source distribution and just applying the patches, then you will need a managed mount. If you do that, don't apply patch 0.1 (it's changing all the #includes because of the renamed files), and please let me know how it works in the end, because I haven't tried it yet!
  Reply With Quote

Old   April 12, 2006, 13:00
Default Hi Brooks, Niklas and the rest
  #4
Member
 
Petr Vita
Join Date: Mar 2009
Posts: 59
Rep Power: 17
pvita is on a distinguished road
Send a message via MSN to pvita Send a message via Skype™ to pvita
Hi Brooks, Niklas and the rest of the OpenFOAM world!

I tested OpenFOAM distribution from Brooks (based on OpenFOAM-1.3.cygwin-src-0.5.tar.gz, gcc-4.1.0.cygwin-OpenFOAM.tar.gz and OpenFOAM-1.3.Docs.tar.gz) under my Windows 2000 Professional and can confirm that it works with small changes. I am attaching all these changes in a patch form that can be applied on any Windows platform and that solves following problems:
  • Cygwin environment detection: fixed a detection of Cygwin environment to provide an unified and general way.
  • OpenFOAM-1.3/Allwmake: Added somehow dropped code to compile sources of wmake system, library and applications.
  • thermophysicalModel/NSRDSfunctions: Fixed an unknown problem that emerges at least on my rig. The fix is very general and should work on all Cygwin platforms.
The patch uses actual Brooks nomenclature and should applied as the last one in the line.

OpenFOAM-1.3.cygwin-src-0.6.diff

PV
pvita is offline   Reply With Quote

Old   April 12, 2006, 16:29
Default Petr - Thanks for the patch
  #5
brooksmoses
Guest
 
Posts: n/a
Petr -

Thanks for the patch! The fix for the Cygwin environment detection should have been included already; I'm not sure how it slipped out.

I have no clue what's going on with the NSRDSfunctions, since it doesn't do that on any of my test machines, but since it seems to reliably do that on yours, I can include the change. Are you doing this on a managed mount or an unmanaged one? Perhaps this is getting into the filename length limit Niklas mentioned?

I also admit to being somewhat confused by what's going on in the Allwmake patch. Your patch doesn't add the code to compile the wmake system, library, or applications -- it simply removes whitespace from those three lines (which do already exist), and moves them around. And it's incorporating code that was in the doc/Allwmake file -- it looks like this change is for a case where you've moved your Doxygen directory from the doc directory to the root OpenFOAM-1.3 directory?

I'll get these into the packaged distribution shortly!
  Reply With Quote

Old   April 13, 2006, 04:40
Default Greetings! In that version
  #6
Member
 
Petr Vita
Join Date: Mar 2009
Posts: 59
Rep Power: 17
pvita is on a distinguished road
Send a message via MSN to pvita Send a message via Skype™ to pvita
Greetings!

In that version from OpenFOAM-1.3.cygwin-src-0.5.tar.gz was the fix just partialy implemented and still the old detection through CYGWIN_NT-5.0 or CYGWIN_NT-5.1 or etc. was used at least in OpenFOAM-1.3/.OpenFOAM-1.3/bashrc and OpenFOAM-1.3/.OpenFOAM-1.3/cshrc.

Well, in the case of Allwmake something got screwed as I see. I checked it once again and you are right. However I have no idea how I got on my installation contents I was repairing. There was some modification of Doxygen directory rights and fully missing compilation applications and OpenFOAM libraries. *scratches on the head* This part is somehow strange... Throw it out, please.

Problem with NSRDSfunctions is very strange one to mee as well. I am using non-managed mounts now but I do not think it is bound to lenght of filenames either as normally just limited part of functions get compiled and part simply not without reason. It could be somebody will replicate it. But who knows.

PV
pvita is offline   Reply With Quote

Old   April 13, 2006, 04:54
Default I posted that I do not know wh
  #7
Member
 
Petr Vita
Join Date: Mar 2009
Posts: 59
Rep Power: 17
pvita is on a distinguished road
Send a message via MSN to pvita Send a message via Skype™ to pvita
I posted that I do not know where it is comming from those changes in Allwmake I had to repair. Well, I know it now. :-) It is contained in your documents distribution OpenFOAM-1.3.Docs.tar.gz. I have unpacked the sources first, then documents distribution and it replaced original Allwmake. You should probably correct it removing Allwmake from documents distribution completly.

PV
pvita is offline   Reply With Quote

Old   April 13, 2006, 05:13
Default Oh, I see what I did! When I
  #8
brooksmoses
Guest
 
Posts: n/a
Oh, I see what I did! When I created the Docs distribution, I got it mixed up so it puts everything into the OpenFOAM-1.3 root directory instead of OpenFOAM-1.3/doc -- and thus what should be OpenFOAM-1.3/doc/Allwmake overwrites OpenFOAM-1.3/Allwmake from the source distribution. So it's a complete mess, and that's only one of the symptoms.

Anyhow, it should be fixed now.

On the NSRDS functions: what are the symptoms of what happens with them if you don't use this patch? Does it fail at compilation, or only when you try to use them (and, if so, with which testcase)?
  Reply With Quote

Old   April 19, 2006, 03:12
Default I've tried out Brooks stuff an
  #9
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
I've tried out Brooks stuff and it works great.
There is one point I'd like to see improved though,
to better handle cross platform development,
and that is the way includes have been modified.

#include "vector.H" -> #include "vector.hh"

would be nice if instead it was

#ifdef cygwin
#include "vector.hh"
#else
#include "vector.H"
#endif

I have no objections to renaming the files,
but its messy sitting writing/testing code on a windows PC and running it on another.

Great work though Brooks.

N
niklas is offline   Reply With Quote

Old   April 19, 2006, 04:41
Default Niklas -- Nice to see you a
  #10
Member
 
Petr Vita
Join Date: Mar 2009
Posts: 59
Rep Power: 17
pvita is on a distinguished road
Send a message via MSN to pvita Send a message via Skype™ to pvita
Niklas --

Nice to see you again between those who tries to get Cygwin port working!

Brooks --

I have noticed that there is a OpenFOAM Wiki running. Well, it is my shame ignoring it so hard as it is loved child of Bernhard, my collegue. Whatever! There is a section know as Main HowTos that contain already some HOWTOs inside. One of them is named Compiling OpenFOAM under Unix. Maybe we should put content of your website there to centralize it... What you think about it?

PV
pvita is offline   Reply With Quote

Old   April 19, 2006, 05:08
Default Niklas: That sort of #ifdef co
  #11
brooksmoses
Guest
 
Posts: n/a
Niklas: That sort of #ifdef construct is definitely how I do things in my own user applications outside the OpenFOAM source tree, yes, for exactly that reason. I'm not quite sure how it's useful to do it in the OpenFOAM tree itself, though -- are you editing the OpenFOAM files and transferring them back and forth? If so, don't you already have problems with some of the files having different names? I was thinking that it made more sense to have the modified tree be self-consistent, so that if someone unpacked it into a non-Cygwin machine it would still compile properly. (And it does; I tested it a couple of days ago.)

Petr: Yes, I think that it would be useful to move at least some of the content of my site to the Wiki. I probably won't have a chance to think about it for a week or two, though, but I'll make a note to work on it when I have time.
  Reply With Quote

Old   April 19, 2006, 05:19
Default Petr: Hehe, This is probab
  #12
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
Petr:

Hehe,
This is probably going to upset a few and come out wrong, but Im gonna go ahead and say it anyway so
that you know where I stand.

I'm deliberately keeping a very low profile for this windows port thingy since
windows users in general are clicky-this-mesh, clicky-that-run, clicky-produce-nice-pics users who know very little (I might be wrong, but that is my experience) and
I dont like supporting them because they seldom
understand the complexity of CFD and/or OpenFOAM,
know very little about computers and
in general require, and often demand!!!, alooot of time to support.

Time I do not have.

Brooks:
Yup, havent got that far yet, but the amount of fiddling will be less

N
niklas is offline   Reply With Quote

Old   April 19, 2006, 05:50
Default Niklas comment about the Windo
  #13
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Niklas comment about the Windows-users: I understand (and partially share) your sentiments, but I don't think it will be so bad for one reason: AFAIK nobody plans to port FoamX to cygwin (don't know if this is even possible). So if a disclaimer "...but the GUI is only available on Linux." is prepended to the Cygwin-README the pointAndClick-crowd will either go away or move to Linux (and will want support for their Linux-problems ;) ).
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   April 19, 2006, 07:32
Default Niklas -- Well, we need tes
  #14
Member
 
Petr Vita
Join Date: Mar 2009
Posts: 59
Rep Power: 17
pvita is on a distinguished road
Send a message via MSN to pvita Send a message via Skype™ to pvita
Niklas --

Well, we need testers, nobody asks you to support anybody if you have no time. That is your decision. I do not really understood message of your statement. And as Bernhard said, AFAIK there is no really plan for FoamX port.

PV
pvita is offline   Reply With Quote

Old   April 19, 2006, 08:01
Default Well, we need testers, nobody
  #15
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
Well, we need testers, nobody asks you to support anybody if you have no time.
That is nice to hear.

Anyway, my point (although I have to admit not entirely clear) was that I never went away -
as your previous post 'nice to see you again' suggested.
I just haven't posted my solutions here, hoping that you would solve it all and get all the questions

I think you're both doing a great job.

N
niklas is offline   Reply With Quote

Old   April 19, 2006, 15:01
Default Thanks for the compliments, Ni
  #16
brooksmoses
Guest
 
Posts: n/a
Thanks for the compliments, Niklas! And, yes, that's part of the reason that I've tried to make it very clear on my file-distribution page that this is an unofficial port -- I very much want to make it clear that it's not something the OpenFOAM team provides support for.
  Reply With Quote

Old   May 3, 2006, 06:49
Default Hi, When I compiled OpenFOAM
  #17
New Member
 
Look
Join Date: Mar 2009
Posts: 5
Rep Power: 17
look is on a distinguished road
Hi,
When I compiled OpenFOAM with ./Allwmake. I have a problem like this:

/home/user/OpenFOAM/OpenFOAM-1.3/wmake/wmake: line 140: make: command not found

/home/user/OpenFOAM/OpenFOAM-1.3/wmake/wmake: cannot make, file Make/cygwinGcc4DPOpt/objectFiles was not created successfully

Could someone teach me what is going on and how to solve it?
Thank you very much.
look is offline   Reply With Quote

Old   May 3, 2006, 07:13
Default Look -- Have a look once ag
  #18
Member
 
Petr Vita
Join Date: Mar 2009
Posts: 59
Rep Power: 17
pvita is on a distinguished road
Send a message via MSN to pvita Send a message via Skype™ to pvita
Look --

Have a look once again at Brook's website where you downloaded your files from and read section Dependencies. There are written down some packages you need to install in your Cygwin to able to compile OpenFOAM 1.3 at all. Check if all packages are installed. Your error message says on its first line ...make: command not found informing you that make is not provided.

PV
pvita is offline   Reply With Quote

Old   May 3, 2006, 07:27
Default Dear Petr Vita: I really ne
  #19
New Member
 
Look
Join Date: Mar 2009
Posts: 5
Rep Power: 17
look is on a distinguished road
Dear Petr Vita:

I really neglect this.
Thank for your help.

Look
look is offline   Reply With Quote

Old   May 4, 2006, 06:39
Default Hi, When I use wmake to compi
  #20
New Member
 
Look
Join Date: Mar 2009
Posts: 5
Rep Power: 17
look is on a distinguished road
Hi,
When I use wmake to compiled icoFoam,I have a problem like this:


g++: error trying to exec 'as': execvp: No such file or directory
make: *** [Make/cygwinGcc4DPOpt/icoFoam.o] Error 1



I don't know what is wrong.
Can someone help me ?
Thank you.

Look
look is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
FoamX CygWin port problem Boundary conds cannot be altered kranenborg OpenFOAM Pre-Processing 0 July 18, 2007 22:01
FoamX problem with Brooksb Cygwin port irc OpenFOAM Installation 3 February 20, 2007 19:46
DieselFoam problem with Brookbs cygwin port leosding OpenFOAM Installation 4 August 12, 2006 05:51
Cygwin port computer crashed hsieh OpenFOAM Installation 2 May 31, 2006 10:28
OpenFOAM with Cygwin kitchener OpenFOAM Installation 6 April 25, 2006 00:09


All times are GMT -4. The time now is 21:29.