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

OpenFoam wmake

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 22, 2012, 10:44
Default OpenFoam wmake
  #1
New Member
 
Junpeng
Join Date: Jun 2012
Posts: 3
Rep Power: 5
rolandde is on a distinguished road
Hi guys,
Does anyone know how to use g++, instead of wmake, to compile the solver, like icoFoam? Cause I need to write my own make and the makefile.
Thanks.
rolandde is offline   Reply With Quote

Old   June 23, 2012, 15:08
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,312
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Junpeng and welcome to the forum!

You don't want to use OpenFOAM's wmake? OK... do you just want the command for building icoFoam or every single OpenFOAM library dependency that icoFoam has on it? You can see the dependency list by running this command:
Code:
ldd `which icoFoam`
If it's just icoFoam:
  1. Go to the folder "applications/solvers/incompressible/icoFoam" and run:
    Code:
    wclean
    wmake
  2. See the commands that are shown on the terminal? Simply copy them and you should be able to use them directly in the command line... although you'll have to take care of the specific details, such as creating the helper folders wmake uses to build stuff.
If you need the whole thing... then try FreeFOAM: http://freefoam.sourceforge.net/ - it uses CMake and I think CMake will generate "Makefiles" for each library and application.


Nonetheless, if you need 2.1.x, you might have to stick to wmake if you want to make your life easier. If you can detail a bit more about what you want to specifically do, we might be able to provide more possibilities to solve the issue.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   June 25, 2012, 11:11
Default
  #3
New Member
 
Junpeng
Join Date: Jun 2012
Posts: 3
Rep Power: 5
rolandde is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings Junpeng and welcome to the forum!

You don't want to use OpenFOAM's wmake? OK... do you just want the command for building icoFoam or every single OpenFOAM library dependency that icoFoam has on it? You can see the dependency list by running this command:
Code:
ldd `which icoFoam`
If it's just icoFoam:
  1. Go to the folder "applications/solvers/incompressible/icoFoam" and run:
    Code:
    wclean
    wmake
  2. See the commands that are shown on the terminal? Simply copy them and you should be able to use them directly in the command line... although you'll have to take care of the specific details, such as creating the helper folders wmake uses to build stuff.
If you need the whole thing... then try FreeFOAM: http://freefoam.sourceforge.net/ - it uses CMake and I think CMake will generate "Makefiles" for each library and application.


Nonetheless, if you need 2.1.x, you might have to stick to wmake if you want to make your life easier. If you can detail a bit more about what you want to specifically do, we might be able to provide more possibilities to solve the issue.

Best regards,
Bruno
Thanks I got the commands. Can you explain these parameters to me?

g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam211/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam211/src/OpenFOAM/lnInclude -I/opt/openfoam211/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/cicoFoam.o

like -m64, -Wall, -Wextra ...
or where I can find some materials for these parameters?
rolandde is offline   Reply With Quote

Old   June 25, 2012, 13:31
Default
  #4
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 919
Rep Power: 17
akidess will become famous soon enough
In the gcc documentation of course: http://gcc.gnu.org/onlinedocs/gcc-4....c_Invoking-GCC

Have fun!
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Help define the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oam-technology
akidess is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM 1.6 ext - Compilation errors - Fedora 17(32bit) toolpost OpenFOAM Installation 15 September 21, 2012 09:38
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 06:55
wmake in openfoam mac 1.7.x atareen64 OpenFOAM Installation 10 July 12, 2011 11:02
wmake error: file 'Make/linux64Gcc44DPOpt/objectFiles' could not be created l_r_mcglashan OpenFOAM Installation 16 September 26, 2010 10:24
OpenFOAM 1.5.x package - CentOS 5.3 x86_64 linnemann OpenFOAM Installation 7 July 30, 2009 03:14


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