CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Problem with cygwin&windows (https://www.cfd-online.com/Forums/openfoam-installation/86385-problem-cygwin-windows.html)

Eferal March 21, 2011 16:07

Problem with cygwin&windows
 
Hi Everyone,
I'm trying to fix OpenFOAM on my computer (with windows xp and no right to put linux...)
I've seen that it's possible to make it run with Cygwin.
I've done all those things :

cd $HOME
mkdir OpenFOAM
cd OpenFOAM
tar -xzf ../OpenFOAM-1.3.cygwin-src-0.5.tar.gz
tar -xzf ../OpenFOAM-1.3.cygwin-bin-0.5.tar.gz
tar -xzf ../OpenFOAM-1.3.Docs.tar.gz
mkdir cygwin
cd cygwin
tar -xzf ../../gcc-4.1.0.cygwin-OpenFOAM.tar.gz
cd ..
source ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc

Everythings seems to work well. The problem is, that when I tried to launch the Allwmake file, it threw me this :
$ ~OpenFOAM/OpenFOAM-1.3/Allwmake

/home/AntoineH/OpenFOAM/OpenFOAM-1.3/Allwmake : line 3: cd: wmake: No such file or directory
/home/AntoineH/OpenFOAM/OpenFOAM-1.3/Allwmake : line 3: ./makeWmake : No such file or directory
/home/AntoineH/OpenFOAM/OpenFOAM-1.3/Allwmake : line 5: cd: src: No such file or directory
/home/AntoineH/OpenFOAM/OpenFOAM-1.3/Allwmake : line 5: ./Allwmake : No such file or directory
/home/AntoineH/OpenFOAM/OpenFOAM-1.3/Allwmake : line 7: cd: applications : No such file or directory
/home/AntoineH/OpenFOAM/OpenFOAM-1.3/Allwmake : line 7: ./Allwmake : No such file or directory


It's very strange because all those files exist and if I run :

$ ~OpenFOAM/OpenFOAM-1.3/wmake/Allwmake

It runs something but have new problems like before.

I've done quite the same thing on another computer and I get the same problem.So it must come from me!
I'm trying to solve it from 9:00 am and have no idea anymore about what to do.

Thanks in advance for your help
(and sorry for my English)
Antoine

wyldckat March 21, 2011 20:53

Greetings Antoine and welcome to the forum!

:eek: You're going waaaaaaaay back in time ;)

You can have a more recent version of OpenFOAM (at least 1.7.0) built under Cygwin and then running in Windows without the Cygwin layer, by following the instructions from here:
Best regards and good luck!
Bruno

Eferal March 21, 2011 22:39

Hi Bruno,
Thank you for your answer.
Can you tell me If I'm right :
I install cygwin and fix couple of things written here

http://openfoamwiki.net/index.php/Ti...iling_OpenFOAM

After that, I go to that page

http://openfoamwiki.net/index.php/Ti...ows_with_MinGW

And I do step by step what's written like if I was working on Linux (but with cygwin) ?

In fact, I can hardly understand "in Linux for Windows", because I don't have Linux and can't install it.

Thanks for your help again
Antoine

wyldckat March 22, 2011 18:53

Greetings Antoine,

Well, yes, the idea is to set up the Cygwin environment as explained in the page for it, then follow the step-by-step tutorial made for Linux but use it in Cygwin.

The tutorials have a high degree of detail, because a lot of experience has been summarized and put into them.

You can also check the following section on the base page: 5 Other Important Links, where are listed various solutions for using/building OpenFOAM to run in Windows.

You can also check the dedicated area in this forum for Windows: OpenFOAM Windows Installation

If you're find it hard to believe why is it so hard to have OpenFOAM running in Windows, here's a little summary history: OpenFOAM (Linux) in a MS-HPC-Cloud post #5

Best regards,
Bruno

Eferal March 30, 2011 15:44

Greetings again,
I have been doing all the step till the 9 :
http://openfoamwiki.net/index.php/Ti...ows_with_MinGW

Now when I do the 9 one, I encounter a problem with my wmake files :
http://www.cijoint.fr/cj201103/cij5JBynHI.jpg
Do you have any Idea of what shall I do to try to fix it.
Thanks a lot for everythings
Antoine

wyldckat March 30, 2011 19:43

Hi Antoine,

  1. On chapter 7, which "bashrc-*" file did you choose? Was it "bashrc-mingw32", "bashrc-mingw-w32" or some other?
  2. On the Cygwin related page, chapter Notes on using Cygwin, it says there to change this:
    Code:

    # Detect system type and set environment variables appropriately
    # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    export WM_ARCH=`uname -s`
     
    case $WM_ARCH in
    Linux)
        WM_ARCH=linux

    to this:
    Code:

    # Detect system type and set environment variables appropriately
    # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    export WM_ARCH=`uname -s`
     
    case $WM_ARCH in
    *)
        WM_ARCH=linux

    This is for changing on that file I asked you about in point 1.
Best regards and good luck!
Bruno

Eferal March 30, 2011 20:27

Allright, I've forgotten this part.
I'm using bashrc-mingw32.
Do I have to make those things in the /etc/bashrc or the /etc/bashrc-mingw32 ?
I think it's on the bashrc-mingw32 but I wanna be sure.
Do I have to start from crash again or can I just make that changing now et launch once again the ./Allwmake ?
Thanks a lot again,
Maybe, one day, I'll make some CFD :)
Best regards
Antoine

wyldckat March 31, 2011 18:23

Hi Antoine,

You only have to change the file "$WM_PROJECT_DIR/etc/bashrc-mingw32". If you run:
Code:

echo $WM_PROJECT_DIR/etc/bashrc-mingw32
It should show you where it is. The variable "$WM_PROJECT_DIR" should expand to something like "/home/username/OpenFOAM/OpenFOAM-1.6".

Then simply start a new terminal and then you'll have to redo chapter 8: Build the cross compiler then simply keep on going ;)


If you were in a hurry to get it working, you could also have chosen to contact and purchase one of the available supported variants of OpenFOAM for Windows ;) With them you get support to get things going faster.

Otherwise, patience and a keen eye should be your most precious tools :)

Best regards,
Bruno

Eferal April 1, 2011 12:15

Hi again,
Allright, I've change everything like you said.
Now I've couples of errors, I tried to fix it but ...
http://www.cijoint.fr/cj201104/cij20k0ibh.jpg
If you have any idea!
Maybe next week, I'm gonna switch to linux, because 3 weeks to fix a software, wow :)
Thanks a lot,
Best Regards
Antoine

wyldckat April 1, 2011 14:19

Hi Antoine,

:eek: I love it when pseudo-time travel occurs in software :)

OK, the missing mingw32-g++ error is the one that we need to fix. Did you follow the instructions from chapter 8? Probably an error occurred before when compiling mingw32-gcc and mingw32-g++!

By what I vaguely remember, it should have given you some error message telling you to look into a particular log file and figure out what the problem was with building the cross-compiler.

Best regards,
Bruno

Eferal April 5, 2011 12:50

Hi bruno,
I've decided to put Suse on my computer, I've done all the step there: http://www.openfoam.com/download/suse.php
So now, I think I'm supposed to run the /Allwmake file of OpenFOAM, correct?
When I do that in my console, the console promptly shut down ! This is very strange and I've no idea of what to do, because I've no error text.
Do you have an idea ? Do I have to run the /Allwmake ?
Thank you in advance
Antoine

wyldckat April 5, 2011 12:59

Hi Antoine,

I've got a feeling you're having a hard time following the instructions...

If you are really following the instructions from http://www.openfoam.com/download/suse.php, then you only have to follow them to the letter ;) It comes already pre-compiled+built and its easy to install, precisely for people that can't waste time building OpenFOAM :) ;)

Anything you have dealt with while trying to build OpenFOAM under Cygwin, can now be pretty much forgotten. :)

Best regards and good luck!
Bruno

Eferal April 5, 2011 13:52

I think it's good
Anyway, thank you very much for your time and your patience. It helped me a lot
Best Regards
Antoine

EDIT :
Yes it works !!! thank you so much again ^^


All times are GMT -4. The time now is 12:00.