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

[OpenFOAM.org] openfoam debug error --Warn: WM_COMPILER_TYPE='Debug' is unsupported

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 30, 2018, 02:19
Default openfoam debug error --Warn: WM_COMPILER_TYPE='Debug' is unsupported
  #1
Member
 
Join Date: Jan 2018
Location: Malaysia
Posts: 58
Rep Power: 8
jiahui_93 is on a distinguished road
Hi, I would like to install the debug version of OF. I tried using OF5 and OF-dev, but both were failed. I followed the steps as in the post OpenFOAM Screencast - How to program with OpenFOAM


I add following line to my system bash.bashrc
alias ofdebug='source /opt/openfoam-dev/etc/bashrc export WM_COMPILE_OPTION=Debug'

Before compilation, i ran ofdebug to set the environment to the debug version, the error came out:
Warn: WM_COMPILER_TYPE='Debug' is unsupported
treating as 'system' instead

Do I need to add some steps in between? I hope I can get some suggestions to solve this Your help will be greatly appreciated. Thanks for your time
jiahui_93 is offline   Reply With Quote

Old   May 31, 2018, 08:33
Default
  #2
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: You need to remove the "export" word from the alias command, namely change this:
Code:
alias ofdebug='source /opt/openfoam-dev/etc/bashrc export WM_COMPILE_OPTION=Debug'
to this:

Code:
alias ofdebug='source /opt/openfoam-dev/etc/bashrc WM_COMPILE_OPTION=Debug'
Then either source the ".bashrc" file or start a new terminal.

For more details about shell environment, variables, aliases and activating OpenFOAM's environment, read this page: https://openfoamwiki.net/index.php/I...with_the_Shell
__________________
wyldckat is offline   Reply With Quote

Old   May 31, 2018, 09:56
Default
  #3
Member
 
Join Date: Jan 2018
Location: Malaysia
Posts: 58
Rep Power: 8
jiahui_93 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick answer: You need to remove the "export" word from the alias command, namely change this:
Code:
alias ofdebug='source /opt/openfoam-dev/etc/bashrc export WM_COMPILE_OPTION=Debug'
to this:

Code:
alias ofdebug='source /opt/openfoam-dev/etc/bashrc WM_COMPILE_OPTION=Debug'
Then either source the ".bashrc" file or start a new terminal.

For more details about shell environment, variables, aliases and activating OpenFOAM's environment, read this page: https://openfoamwiki.net/index.php/I...with_the_Shell
Thanks a lot for your advice It works now I made a silly mistake which is mistaken WM_COMPILER_OPTION as WM_COMPILER_TYPE.

Btw, do the debug version of OF has to be installed separately with the working OF? If I combine both Opt and Debug mode in 1 OF and switch to Debug mode by using alias method (add the line "WM_COMPILER_OPTION = Debug" after source OF), the OFdebug has to be recompiled everytime i change the environment by using alias method, is it so? I will be grateful if can get some advice on this.
Have a nice day. Thanks
jiahui_93 is offline   Reply With Quote

Old   May 31, 2018, 15:59
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: I guess that either you didn't read the wiki page or did understand what was written there...

The idea is that once the Debug build is built, you will have 2 builds available for the same exact OpenFOAM versions, at least while the source code you have isn't changed or updated (i.e. the same folder "/opt/openfoam-dev" is used for both builds).
Having 1 or 2 aliases for each mode (Debug and Opt) allows you to switch between the two or to have each build on separate terminal tabs/windows.
wyldckat is offline   Reply With Quote

Old   May 31, 2018, 21:07
Default
  #5
Member
 
Join Date: Jan 2018
Location: Malaysia
Posts: 58
Rep Power: 8
jiahui_93 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick answer: I guess that either you didn't read the wiki page or did understand what was written there...

The idea is that once the Debug build is built, you will have 2 builds available for the same exact OpenFOAM versions, at least while the source code you have isn't changed or updated (i.e. the same folder "/opt/openfoam-dev" is used for both builds).
Having 1 or 2 aliases for each mode (Debug and Opt) allows you to switch between the two or to have each build on separate terminal tabs/windows.
yes, i didnt understand, just start to learn this recently. Sorry for my dummy question. Thanks again for reply. I thought after setting the compile option to either opt or debug, we need to run Allwmake to compile. So what you mean is we only compile it when 1st install, after that just use alias to switch between 2 mode? Means there will be 2 dir in platform which compiled using different mode? Please correct me if im wrong. Thanks
jiahui_93 is offline   Reply With Quote

Old   May 31, 2018, 21:40
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 jiahui_93 View Post
I thought after setting the compile option to either opt or debug, we need to run Allwmake to compile. So what you mean is we only compile it when 1st install, after that just use alias to switch between 2 mode?
You need to compile (run Allwmake) in both modes: Opt and Debug
wyldckat is offline   Reply With Quote

Old   May 31, 2018, 23:49
Default
  #7
Member
 
Join Date: Jan 2018
Location: Malaysia
Posts: 58
Rep Power: 8
jiahui_93 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
You need to compile (run Allwmake) in both modes: Opt and Debug
Thanks. But do i need to copy out my OF from /opt/? It doesnt allow me to change the OF.



Code:
ang@jingke-PowerEdge-R710:/opt/openfoam-dev$  ./Allwmake
Allwmake /opt/openfoam-dev
make: Nothing to be done for 'all'.
Allwmake: no ThirdParty directory found - skipping
Allwmake src
no git description found
Allwmake src/Pstream
wmake dummy
mkdir: cannot create directory ‘/opt/openfoam-dev/platforms/linux64GccDPInt32Debug’: Permission denied
/bin/sh: 1: cannot create /opt/openfoam-dev/platforms/linux64GccDPInt32Debug/src/Pstream/dummy/options: Directory nonexistent
make: *** No rule to make target '/opt/openfoam-dev/platforms/linux64GccDPInt32Debug/src/Pstream/dummy/options'.  Stop.
/bin/sh: 1: cannot create /opt/openfoam-dev/platforms/linux64GccDPInt32Debug/src/Pstream/dummy/options: Directory nonexistent
make: *** No rule to make target '/opt/openfoam-dev/platforms/linux64GccDPInt32Debug/src/Pstream/dummy/options', needed by 'all'.  Stop.
wmake error: file '/opt/openfoam-dev/platforms/linux64GccDPInt32Debug/src/Pstream/dummy/sourceFiles' could not be created in /opt/openfoam-dev/src/Pstream/dummy
Quote:
Originally Posted by wyldckat View Post
You need to compile (run Allwmake) in both modes: Opt and Debug
Sorry for my bad english. Is it only run Allwmake once for each mode (only when first set up this hybrid mode)? Or do i need to run Allwmake everytime i switch between OFnormal and OFdebug? Thanks

Last edited by wyldckat; June 1, 2018 at 14:01. Reason: merged posts a few minutes apart
jiahui_93 is offline   Reply With Quote

Old   June 1, 2018, 09:24
Default
  #8
Member
 
Join Date: Jan 2018
Location: Malaysia
Posts: 58
Rep Power: 8
jiahui_93 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick answer: Sorry for the delay in responding to this, but it was only fairly recently that I managed to document the detailed installation steps for installing OpenFOAM+ v1606+ on a few systems: https://openfoamwiki.net/index.php/I...AM%2B-v1606%2B

Nonetheless, there is no clear indication in the details you've all provided, in order to diagnose why "ptscotch" is not getting built properly.
For those who are still having problems with this, please run the following commands:
Code:
cd $WM_THIRD_PARTY_DIR
./Allwmake > log.make 2>&1

gzip < log.make > log.make.gz
Then please attach the file "log.make.gz" to your next post, which will provide the complete output of the attempt at building Scotch and PTScotch.


edit: I forgot to mention that if you downloaded the package "ThirdParty-v1606+.tgz" soon after the release of v1606+, it was updated again a few days later to fix one or two issues with the build scripts. That might have been the origin of the very first reported issue here.
Hi, I had attached the make log file here. It cant find the scotch.h file which included in scotchDecomp.C. I will be grateful if can get some advice. Should I download it from somewhere? or any way to solve? Thanks

log_make.txt
jiahui_93 is offline   Reply With Quote

Old   June 1, 2018, 16:51
Default
  #9
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: I've taken a look just now and it seems that you cannot do a complete build the complete of OpenFOAM from source code, when only using the provided Deb packages for either OpenFOAM 5 or OpenFOAM-dev.

The simplest way to build the Debug option is to follow the instructions on how to compile it from source code:
  • The official instructions are provided here: https://openfoam.org/download/source/
  • The step-by-step instructions (I wrote) for OpenFOAM-dev on Ubuntu, are provided here: https://openfoamwiki.net/index.php/I...OAM-dev/Ubuntu
    • On these instructions, in step #7 and/or #8, where it gives a command like this:
      Code:
      source $HOME/OpenFOAM/OpenFOAM-dev/etc/bashrc FOAMY_HEX_MESH=yes
      you should add the respective Debug entry, for example, like this:
      Code:
      source $HOME/OpenFOAM/OpenFOAM-dev/etc/bashrc FOAMY_HEX_MESH=yes WM_COMPILE_OPTION=Debug
wyldckat is offline   Reply With Quote

Old   June 2, 2018, 02:04
Default
  #10
Member
 
Join Date: Jan 2018
Location: Malaysia
Posts: 58
Rep Power: 8
jiahui_93 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick answer: I've taken a look just now and it seems that you cannot do a complete build the complete of OpenFOAM from source code, when only using the provided Deb packages for either OpenFOAM 5 or OpenFOAM-dev.

The simplest way to build the Debug option is to follow the instructions on how to compile it from source code:
  • The official instructions are provided here: https://openfoam.org/download/source/
  • The step-by-step instructions (I wrote) for OpenFOAM-dev on Ubuntu, are provided here: https://openfoamwiki.net/index.php/I...OAM-dev/Ubuntu
    • On these instructions, in step #7 and/or #8, where it gives a command like this:
      Code:
      source $HOME/OpenFOAM/OpenFOAM-dev/etc/bashrc FOAMY_HEX_MESH=yes
      you should add the respective Debug entry, for example, like this:
      Code:
      source $HOME/OpenFOAM/OpenFOAM-dev/etc/bashrc FOAMY_HEX_MESH=yes WM_COMPILE_OPTION=Debug
Noted, thanks a lot for your help. Im sorry, I missed out some info about my problem. I use the openFOAM-5.x, and follow steps in this link.
http://openfoamwiki.net/index.php/In...OAM-5.x/Ubuntu
Should I use the OpenFOAM-dev if I would like to build hybrid mode with both opt and debug mode? Thanks
Attached Files
File Type: txt log_make.txt (6.2 KB, 0 views)

Last edited by jiahui_93; June 2, 2018 at 03:19.
jiahui_93 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
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 10 September 2, 2021 05:29
OpenFOAM 4.0 Released CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 2 October 6, 2017 05:40
OpenFOAM v3.0+ ?? SBusch OpenFOAM 22 December 26, 2016 14:24
UNIGE February 13th-17th - 2107. OpenFOAM advaced training days joegi.geo OpenFOAM Announcements from Other Sources 0 October 1, 2016 19:20
[OpenFOAM.org] Use OpenFOAM 2.3.0 in debug mode upuli OpenFOAM Installation 0 June 1, 2016 02:28


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