CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   OF 2.1.0 under Windows XP or Windows 7 (https://www.cfd-online.com/Forums/openfoam-installation/99647-2-1-0-under-windows-xp-windows-7-a.html)

Claudio April 8, 2012 16:19

OF 2.1.0 under Windows XP or Windows 7
 
Has anybody successfully compiled OpenFOAM 2.1.0 under either Windows XP or Windows 7?
Or does anybody know where I can find info/instructions to do so?

Thanks

wyldckat April 9, 2012 05:17

Greetings Claudio,

Currently there are a few efforts in making this possible, namely building OpenFOAM directly on Windows, but AFAIK, none of them are complete and/or released to the public.

The only fully public method that I'm aware of is by using Cygwin to handle the file system for then cross-compiling OpenFOAM on Cygwin for Windows. Here's where you can find all of the public info I'm familiar with (and which I wrote myself ;)): OpenFOAM on Windows OS

As for the other efforts:
If you have any more questions, feel free to ask!

Best regards,
Bruno

danvica April 9, 2012 13:42

I'm not an experienced user, just a technical manager/engineer involved in taps/valves component... you should definitely try BlueCFD.

From my own point of view the porting is perfect and the support fast and precise.

Ect April 10, 2012 08:37

Hello,

I've cross-compiled the 2.1.0 version for win64 following symscape's instructions and somewhat merged it with Joseph Nishit's script files to make it behave as a "portable" openFoam. So far simple/pimple/pisoFoam are working ok for me on Win64 2008 and Vista, with mpich up to 12 cores on a shared memory computer.

If anyone is willing to test it more touroughly I would need some suggestions on how to share the 110 Mb archive (openFoam, mpich, paraview, gmsh & engrid).

Regards,
Ect

akidess April 15, 2012 15:41

Ect, I'd give it a shot. You could upload the archive here: http://ge.tt/

Claudio April 20, 2012 10:52

Thanks for all the replies.

Daniele, I will look more into BlueCFD, however since I would like to have it on many different machine, it might not be feasible to have a commercial solution. It's not quite clear if the fee is just to access the executable and then you can install them many times or not.

Ect,
I would be interested too in you package. Would it be possible for you to use a free storage service, like Dropbox?

Thanks

wyldckat April 20, 2012 11:03

Greetings to all!

Claudio:
Quote:

Originally Posted by Claudio (Post 355857)
Daniele, I will look more into BlueCFD, however since I would like to have it on many different machine, it might not be feasible to have a commercial solution. It's not quite clear if the fee is just to access the executable and then you can install them many times or not.

I thought it was clear enough, since there is no such limitation specified in the "Statement of Service"; but a FAQ was also created for what isn't so clear; quoting from the FAQ, section "What is blueCFD's license?":
Quote:

So, to sum up: the blueCFD software, once purchased, can be used in any number of computers and even given to friends, family, neighbours and even that pen pal on the other side of the world. But those who haven't payed for the blueCFD service, will not be entitled to our support. But we will welcome any and all bug reports, so we can provide better builds and service of our product.
If you have any questions, feel free to ask!

Best regards,
Bruno

Ect April 21, 2012 17:38

Hi all,

Here it is: http://ge.tt/2SfcweG/v/0?c

Use scotch as the decomposition method
Start smpd.bat, it runs smpd in debug mode on the port 41000 if I remember correctly, this way no mpich installation is required, it also runs without interferring with any existing mpi installation.
start dos_mode.bat
cd to your case directory
decomposepar
gompi simpleFoam

please give some feedback

regards,
Ect

alberto April 22, 2012 02:52

Something to have OF working on Windows is available here too: http://www.symscape.com/openfoam-2-1...windows-64-mpi

Claudio April 23, 2012 08:37

Thanks Ect,

i have downloaded the package. I am working on something else now, so I have to put this on the back burner for now. Will update you once I get it working.

Bruno,

thanks for the clarification.

Alberto, ciao,

I did find symscape before. Again once I'll have time again will go back to this problem, but I appreciate everybody's input.

MIGHTYBIRD May 2, 2012 16:43

I haven't been able to get this working.

I'm getting the following in the command prompt:


Quote:

--> FOAM FATAL IO ERROR:
cannot find file

file: C:/Users/Brett/Desktop/OpenFOAM-2.1/system/controlDict at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 73.

FOAM exiting


Does anyone have any ideas? I don't have that file or directory. It wasn't in the 7 zip file posted by ECT.

thanks!

wyldckat May 2, 2012 16:52

Hi MIGHTYBIRD and welcome to the forum!

Apparently you're trying to run a command in the wrong folder! Whenever a command in OpenFOAM gives that error message, it's because you're running the command in a folder that isn't an OpenFOAM case.

In other words: read the OpenFOAM User Guide ;)

Best regards,
Bruno

Mr.Cloud June 1, 2012 05:15

Quote:

Originally Posted by Ect (Post 353971)
Hello,

I've cross-compiled the 2.1.0 version for win64 following symscape's instructions and somewhat merged it with Joseph Nishit's script files to make it behave as a "portable" openFoam. So far simple/pimple/pisoFoam are working ok for me on Win64 2008 and Vista, with mpich up to 12 cores on a shared memory computer.

If anyone is willing to test it more touroughly I would need some suggestions on how to share the 110 Mb archive (openFoam, mpich, paraview, gmsh & engrid).

Regards,
Ect

Hi Etc... I'm trying to combile an vesion of OF (1.7.x) for my windows, but it apear a lot of error that I cant figure out... Please help me...! Here is my email: tieuliphilong@gmail.com
Best regards.

Mr.Cloud August 29, 2012 05:46

Hi Ect, can you help me to build an version 2.1.0 for window? I need build and OF source to make my thermal foam (simpleThermal,...). I followed this tutorial but got alot of error
Quote:

make: Nothing to be done for `all'.
no ThirdParty sources found - skipping
+ set -e
+ wmakePrintBuild -check
no git description found
+ /bin/rm -f OpenFOAM/Make/*/global.?
+ wmakeLnInclude OpenFOAM
wmakeLnInclude: linking include files to OpenFOAM/lnInclude
+ wmakeLnInclude OSspecific/MSwindows
wmakeLnInclude: linking include files to OSspecific/MSwindows/lnInclude
+ OSspecific/MSwindows/Allwmake
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file MSwindows.C
Making dependency list for source file printStack.C
Making dependency list for source file regExp.C
Making dependency list for source file signals/sigFpe.C
Making dependency list for source file signals/sigSegv.C
Making dependency list for source file signals/sigInt.C
Making dependency list for source file signals/sigQuit.C
Making dependency list for source file signals/sigStopAtWriteNow.C
Making dependency list for source file signals/sigWriteNow.C
Making dependency list for source file timer.C
Making dependency list for source file fileMonitor.C
Making dependency list for source file fileStat.C
Making dependency list for source file cpuTime/cpuTime.C
Making dependency list for source file clockTime/clockTime.C
SOURCE=MSwindows.C ; x86_64-w64-mingw32-g++ -m64 -Dlinux64 -DWM_DP -DMSWIN -DLITTLE_ENDIAN -Wall -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -O3 -DNDEBUG -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/home/longlp/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/home/longlp/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/MSwindows/lnInclude -c $SOURCE -o Make/linux64GccDPOpt/MSwindows.o
SOURCE=printStack.C ; x86_64-w64-mingw32-g++ -m64 -Dlinux64 -DWM_DP -DMSWIN -DLITTLE_ENDIAN -Wall -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -O3 -DNDEBUG -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/home/longlp/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/home/longlp/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/MSwindows/lnInclude -c $SOURCE -o Make/linux64GccDPOpt/printStack.o
SOURCE=regExp.C ; x86_64-w64-mingw32-g++ -m64 -Dlinux64 -DWM_DP -DMSWIN -DLITTLE_ENDIAN -Wall -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -O3 -DNDEBUG -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/home/longlp/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/home/longlp/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/MSwindows/lnInclude -c $SOURCE -o Make/linux64GccDPOpt/regExp.o
SOURCE=signals/sigFpe.C ; x86_64-w64-mingw32-g++ -m64 -Dlinux64 -DWM_DP -DMSWIN -DLITTLE_ENDIAN -Wall -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -O3 -DNDEBUG -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/home/longlp/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/home/longlp/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/MSwindows/lnInclude -c $SOURCE -o Make/linux64GccDPOpt/sigFpe.o
signals/sigFpe.C: In function ‘void clearFpe()’:
signals/sigFpe.C:45:15: error: ‘_clearfp’ was not declared in this scope
signals/sigFpe.C:46:35: error: ‘_controlfp’ was not declared in this scope
signals/sigFpe.C: In member function ‘void Foam::sigFpe::set(bool)’:
signals/sigFpe.C:136:33: error: ‘_controlfp’ was not declared in this scope
signals/sigFpe.C:138:22: error: ‘_EM_ZERODIVIDE’ was not declared in this scope
signals/sigFpe.C:138:39: error: ‘_EM_INVALID’ was not declared in this scope
signals/sigFpe.C:138:53: error: ‘_EM_OVERFLOW’ was not declared in this scope
signals/sigFpe.C:139:27: error: ‘_MCW_EM’ was not declared in this scope
make: *** [Make/linux64GccDPOpt/sigFpe.o] Error 1
This is the begin...
I user the mingw-w64, with this version, i was success in build a OF1.7.x version.

Ect August 31, 2012 02:03

I've stumbled upon the same issue, if i trust my notes you have to rename

Mingw-w64/lib/gcc/x86_64-w64-mingw32/4.5.4/include/float.h

to something like _float.h to prevent its usage

then you have to add

-I path-to/Mingw-w64/x86_64-w64-mingw32/x86_64-w64-mingw32/include

into wmake/rules/linux64mingw-w64/c++

Mr.Cloud September 3, 2012 23:00

Thanks Ect.
First, I Mingw-w64 release to "mingw-w64-bin_x86_64-linux_20120823" and these error no existed any more. I create a copy of float.h then name it _float.h. When I add
Quote:

-I path-to/Mingw-w64/x86_64-w64-mingw32/x86_64-w64-mingw32/include
to file c++ it appear a lot of error, then i removed it.
But when i think it's ok, it return to me some strange error like that:
Quote:

clock.o:clock.C: (.text+0x99): undefined reference to `construction vtable for std::ostream-in-std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >'
clock.o:clock.C: (.text+0xa0): undefined reference to `construction vtable for std::ostream-in-std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >'
clock.o:clock.C: (.text+0x4e1): undefined reference to `construction vtable for std::ostream-in-std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >'
clock.o:clock.C: (.text+0x736): undefined reference to `construction vtable for std::ostream-in-std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >'
clock.o:clock.C: (.text+0x73d): undefined reference to `construction vtable for std::ostream-in-std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >'
clock.o:clock.C: (.text+0x7b5): more undefined references to `construction vtable for std::ostream-in-std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >' follow
/home/longlp/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.0/../../../../x86_64-w64-mingw32/bin/ld: clock.o: bad reloc address 0x0 in section `.data'
collect2: error: ld returned 1 exit status
And there are a lot of error appear after that.
Here is my full buildlog: https://docs.google.com/open?id=0BxL...GRMMUJwWnJrQlE
please dowload and open on notepad++, these errors appear from line 3161

wyldckat September 4, 2012 14:40

Greetings to all!

@Mr.Cloud: Apparently you're using Gcc 4.8.0, which is the latest Gcc version under development, which is what the mingw-w64 team usually does: they always test with the (near-)bleeding edge versions of Gcc to make sure nothing gets broken with the constant evolution of Gcc!

Try using Gcc 4.5 from here: http://sourceforge.net/projects/ming..._4.5_20111101/

Good luck!
Bruno

Mr.Cloud September 5, 2012 00:24

Hi Bruno. With that gcc, i got 2 error
First is
Quote:

error while loading shared libraries: libmpfr.so.1
Then I create a link, and it fixed,
Second is the typical error
Quote:

signals/sigFpe.C:45:15: error: '_clearfp' was not declared in this scope
I try to fix it but, i found no file float.h in
Quote:

<mingw-w64>/lib/gcc/x86_64-w64-mingw32/<gcc-version>/include/float.h
then i copy the float.h in
Quote:

<mingw-w64>/x86_64-w64-mingw32/include/float.h
then add #include_next <float.h> to the end of
Quote:

<mingw-w64>/x86_64-w64-mingw32/include/float.h
but I still got that error, the same with error when i use mingw-x64 (gcc 4.5.4) version at the first (with that version i was success when build OF 1.7)

Mr.Cloud September 5, 2012 00:48

Quote:

Originally Posted by Ect (Post 379633)
I've stumbled upon the same issue, if i trust my notes you have to rename

Mingw-w64/lib/gcc/x86_64-w64-mingw32/4.5.4/include/float.h

to something like _float.h to prevent its usage

then you have to add

-I path-to/Mingw-w64/x86_64-w64-mingw32/x86_64-w64-mingw32/include


into wmake/rules/linux64mingw-w64/c++

I dont know the step that i have paint it, here is my c++:
Quote:

.SUFFIXES: .C .cxx .cc .cpp

c++WARN = -Wall -Wextra -Wno-unused-parameter -Wnon-virtual-dtor

CC = x86_64-w64-mingw32-g++ -m64

include $(RULES)/c++$(WM_COMPILE_OPTION)

ptFLAGS = -DNoRepository -ftemplate-depth-40

c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS)

Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
cxxtoo = $(Ctoo)
cctoo = $(Ctoo)
cpptoo = $(Ctoo)

LINK_LIBS = $(c++DBUG)

# Tried using -Wl,-no-undefined,--enable-runtime-pseudo-reloc
# but didnt forgive undefined symbols during linking
LINKLIBSO = $(CC) $(c++FLAGS) -Wl,--output-def,$(LIB).def,--out-implib,$(LIB).a,--enable-auto-import,--enable-auto-image-base,--strip-all -shared
LINKEXE = $(CC) $(c++FLAGS) -Wl,--enable-auto-import,--enable-auto-image-base,--force-exe-suffix,--strip-all
and here is my path to mingw-x64
Quote:

/home/longlp/mingw-w64/x86_64-w64-mingw32/include
Can you show me how to add it, because when i add
Quote:

-I ~/mingw-w64/x86_64-w64-mingw32/include
to the end, it return error when i build.

pitmanm September 10, 2012 10:14

Hi Claudio,
I have a complete set of OpenFOAM-2.1.1 cross-compiled binaries for 64-bit Windows (based on Symscape's patches) available for free here: www.ods-engineering.com . They have been compiled to work with MSMPI for full multi-processing.

Just follow the instructions for Third Party (Windows) installation at the bottom of the page downloads page here. Please let me know through the website if you find any issues or bugs.

I compiled the binaries to work primarily with my Blender-based GUI for OpenFOAM (ODS Studio) but they should work for any other purpose too.


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