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

[OpenFOAM.org] Compiling OpenFoam 4 for debugging

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By behzad-cfd
  • 1 Post By behzad-cfd

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 2, 2016, 17:06
Angry Compiling OpenFoam 4 for debugging
  #1
New Member
 
larmes
Join Date: Aug 2016
Posts: 26
Rep Power: 9
yeya is on a distinguished road
How do I compile openFoam 4 after changing it from opt to debug mode in the bashrc file?

I can change the file successfully and I compile the file and then run Allmake in the source files, then I type

which IcoFoam

into the terminal but nothing shows up, but when it was it opt mode some other path showed up.
yeya is offline   Reply With Quote

Old   August 4, 2016, 10:45
Default
  #2
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 16
T.D. is on a distinguished road
Hi,

see:
https://openfoamwiki.net/index.php/HowTo_debugging

Regards,

T.D.
T.D. is offline   Reply With Quote

Old   August 8, 2016, 18:34
Default
  #3
New Member
 
larmes
Join Date: Aug 2016
Posts: 26
Rep Power: 9
yeya is on a distinguished road
I've tried option two bc it seems like the best choice for my situation but I am unable to compile openFoam after I edited the file.
I ran

./Allmake

(As the instructions say)
Then went into the case causing the problems and the solver isn't even recognized as a command anymore.
yeya is offline   Reply With Quote

Old   September 11, 2016, 13:07
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer @yeya: I have no idea if you have solved this problem or not. If not, then:
  1. Undo the changes you made and build OpenFOAM as it was again.
  2. I don't know which installation instructions you've used. I need to know which ones you've used, so that I can give the correct way on how to do the additional installation of the Debug build.
__________________
wyldckat is offline   Reply With Quote

Old   October 5, 2016, 05:43
Default
  #5
New Member
 
larmes
Join Date: Aug 2016
Posts: 26
Rep Power: 9
yeya is on a distinguished road
hi, no the problem still presists.
i installed with Ubuntu.
yeya is offline   Reply With Quote

Old   October 6, 2016, 15:19
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by yeya View Post
hi, no the problem still presists.
i installed with Ubuntu.
Quick answer: I need to know what installation instructions you have followed.
wyldckat is offline   Reply With Quote

Old   October 6, 2016, 15:44
Default
  #7
New Member
 
larmes
Join Date: Aug 2016
Posts: 26
Rep Power: 9
yeya is on a distinguished road
hi, its the one for ubuntu as described on the openFoam website, here is the link:

http://openfoam.org/download/4-0-ubuntu/
yeya is offline   Reply With Quote

Old   November 20, 2016, 14:31
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by yeya View Post
hi, its the one for ubuntu as described on the openFoam website, here is the link:

http://openfoam.org/download/4-0-ubuntu/
My apologies for taking so long to get back to you on this, but unfortunately I haven't had enough time test or even think properly about this myself.

Nonetheless, if you haven't solved the problem yet, I strongly suggest that you following the instructions on how to build OpenFOAM from source code, as explained here: http://openfoam.org/download/4-1-source/
That way you don't damage the installation you have in "/opt".

If you then still have problems building OpenFOAM in debug mode, then please use the following command for running Allwmake:
Code:
./Allwmake > log.make 2>&1
Then compress the file "log.make", for example by running this command:
Code:
gzip < log.make > log.make.gz
and then attach the file "log.make.gz" to your next post.
__________________
wyldckat is offline   Reply With Quote

Old   November 28, 2017, 15:01
Default
  #9
Member
 
behzad Ghasemi
Join Date: Sep 2013
Location: Iran
Posts: 56
Rep Power: 12
behzad-cfd is on a distinguished road
Hi,
I changed opt to Debug mode and then successfully recompiled the source code. in platforms and Make folders new folder named linux64Gcc47DPDebug is created for OF main solvers and applications. But when i try to compile my custom solver it compiles as linux64Gcc47DPOpt. So when i want to run my solver in debug mode OF does not recognize it. My OF version is 2.1.1.
How can i fix this issue?

Regards,
Behzad
Kummi likes this.
behzad-cfd is offline   Reply With Quote

Old   December 30, 2017, 11:32
Default
  #10
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by behzad-cfd View Post
But when i try to compile my custom solver it compiles as linux64Gcc47DPOpt. So when i want to run my solver in debug mode OF does not recognize it. My OF version is 2.1.1.
How can i fix this issue?
Quick answer and question:
  • It looks like the problem is that this occurs after you start a new terminal.
  • How do you activate OpenFOAM 2.1.1 when you start a new terminal?
__________________
wyldckat is offline   Reply With Quote

Old   January 3, 2018, 04:51
Default
  #11
Member
 
behzad Ghasemi
Join Date: Sep 2013
Location: Iran
Posts: 56
Rep Power: 12
behzad-cfd is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick answer and question:
  • It looks like the problem is that this occurs after you start a new terminal.
  • How do you activate OpenFOAM 2.1.1 when you start a new terminal?
Thanks for answer,
I solved the problem before. It was my mistake that i didn't open new terminal after changing bashrc. My environmental variables are okey.

Regards,
wyldckat likes this.
behzad-cfd is offline   Reply With Quote

Reply


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
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology wyldckat OpenFOAM 17 November 10, 2017 15:54
OpenFOAM 4.0 Released CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 2 October 6, 2017 05:40
OpenFOAM Training Jan-Apr 2017, Virtual, London, Houston, Berlin cfd.direct OpenFOAM Announcements from Other Sources 0 September 21, 2016 11:50
OpenFOAM Training, London, Chicago, Munich, Houston 2016-2017 cfd.direct OpenFOAM Announcements from Other Sources 0 September 14, 2016 03:19
A new Howto on the OpenFOAM Wiki Compiling OpenFOAM under Unix mbeaudoin OpenFOAM Installation 2 April 28, 2006 08:54


All times are GMT -4. The time now is 08:58.