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

[OpenFOAM.org] OpenFoam deug mode

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

Like Tree2Likes
  • 1 Post By wyldckat
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 21, 2017, 10:05
Default OpenFoam deug mode
  #1
New Member
 
Felipe Murad
Join Date: Mar 2017
Posts: 11
Rep Power: 4
FMurad is on a distinguished road
Dear Foamers,

I'm somewhat new to this forum and to openfoam. My problem is the following: I installed openfoam correctly in my opt case and copied it to home case. Everything works fine, I've could even change some things in my simpleFoam solver and recompile it and in the "release"(WM_COMPILE_OPTION=Opt) mode everything works fine.
The problems appears when I try to compile in the debug mode (I want to compile from my home directory). Here are the steps that I've done:

1) First thing, I change the WM_COMPILE_OPTION in the home/.../etc/bashrc file to Debug. Just to be sure I type echo $WM_COMPILE_OPTION and it really is changed to Debug

2)I try to recompile Openfoam using the Allwmake script and it gives the following error:
wmakeCheckPwd error: Current directory is not /opt/openfoam4
Allwmake error: Current directory is not $WM_PROJECT_DIR
The environment variables are inconsistent with the installation.
Check the OpenFOAM entries in your dot-files and source them.

3) Ok...so I saw that Allwmake script check if the current directory is the same as the one stored in the WM_PROJECT_DIR enviroment variable (which is the directory of my opt installation). I, then, change this to WM_PROJECT_USER_DIR which is my home directory and it gives the following error:

gcc -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -O3 -fPIC dirToString.c -o /opt/openfoam4/wmake/platforms/linux64Gcc/dirToString
/usr/bin/ld: cannot open output file /opt/openfoam4/wmake/platforms/linux64Gcc/dirToString: Permission denied
collect2: error: ld returned 1 exit status
Makefile:67: recipe for target '/opt/openfoam4/wmake/platforms/linux64Gcc/dirToString' failed
make: *** [/opt/openfoam4/wmake/platforms/linux64Gcc/dirToString] Error 1

It smees that the problem is something in the wmake files, but I can't figure out what to do.

4) Not having many options here, I try to execute the Allwmake files in the lib directory (home/.../src) and the following error occurs:

+ wmakeLnInclude OpenFOAM
+ wmakeLnInclude OSspecific/POSIX
+ Pstream/Allwmake libso
+ wmake libso dummy
mkdir: cannot create directory ‘/opt/openfoam4/platforms/linux64GccDPInt32Debug’: Permission denied
/opt/openfoam4/wmake/makefiles/general:156: recipe for target '/opt/openfoam4/platforms/linux64GccDPInt32Debug/lib/dummy/libPstream.so' failed
make: *** [/opt/openfoam4/platforms/linux64GccDPInt32Debug/lib/dummy/libPstream.so] Error 1

5) Then I try to compile manually a single lib in the debug mode (in my case, the "openFOAM" lib home/.../src/OpenFOAM) with the wmake command, and it gives:

error: /opt/openfoam4/platforms/linux64GccDPInt32Debug/lib/libOSspecific.o: No such file or directory
/opt/openfoam4/wmake/makefiles/general:156: recipe for target '/home/fmurad/OpenFOAM/fmurad-4.1/run//platforms/linux64GccDPInt32Debug/lib/libOpenFOAM.so' failed
make: *** [/home/fmurad/OpenFOAM/fmurad-4.1/run//platforms/linux64GccDPInt32Debug/lib/libOpenFOAM.so] Error 1

I am probably missing something, could you please help me? my openfoam version is openfoam 4 and I've downloaded it from https://openfoam.org/download/4-1-ubuntu/ . I am also using ubuntu 16.10. Thanks for the help.

Last edited by FMurad; July 21, 2017 at 17:08.
FMurad is offline   Reply With Quote

Old   August 10, 2019, 09:58
Default same problem here
  #2
New Member
 
Armin Alavi
Join Date: May 2019
Location: Tehran
Posts: 2
Rep Power: 0
ArminAlavi is on a distinguished road
Hi
I have sort of the same problem, i change the $WM_COMPILE_OPTION in opt/openfoam6/etc/bashrc to "Debug" and try compiling OpenFOAM by using the ./Allwmake command in the terminal but i get the following respond.




Allwmake /opt/openfoam6
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/openfoam6/platforms/linux64GccDPInt32Debug’: Permission denied
/bin/sh: 1: cannot create /opt/openfoam6/platforms/linux64GccDPInt32Debug/src/Pstream/dummy/options: Directory nonexistent
make: *** No rule to make target '/opt/openfoam6/platforms/linux64GccDPInt32Debug/src/Pstream/dummy/options'. Stop.
/bin/sh: 1: cannot create /opt/openfoam6/platforms/linux64GccDPInt32Debug/src/Pstream/dummy/options: Directory nonexistent
make: *** No rule to make target '/opt/openfoam6/platforms/linux64GccDPInt32Debug/src/Pstream/dummy/options', needed by 'all'. Stop.
wmake error: file '/opt/openfoam6/platforms/linux64GccDPInt32Debug/src/Pstream/dummy/sourceFiles' could not be created in /opt/openfoam6/src/Pstream/dummy



Have you solved your problem yet? if you have please help me solve mine.
thank you in advance
ArminAlavi is offline   Reply With Quote

Old   August 15, 2019, 18:56
Default
  #3
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,942
Blog Entries: 42
Rep Power: 121
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: It's preferable that you build from source code in your own home folder. The reason here is that the installation at "/opt" can only be accessible with root permissions (super-user).

As a workaround, you can run the following command:
Code:
sudo chown -R $USER:$USER /opt/openfoam6
This will change the ownership of the folder "/opt/openfoam6" and make it your own. Then you can use that folder as your own and not need to use sudo.

If you want to do things correctly, you can either try following the installation instructions from:
ArminAlavi likes this.
__________________
wyldckat is offline   Reply With Quote

Old   August 24, 2019, 04:41
Default
  #4
New Member
 
Armin Alavi
Join Date: May 2019
Location: Tehran
Posts: 2
Rep Power: 0
ArminAlavi is on a distinguished road
Hi wyldckat , Thank you very much for your answer. I somehow solved the authority problem by changing the permissions of opt folder. now i have a problem with recompiling OpenFOAM. one of the libraries is missing in the compilation process and causes the errot "no such file or directory...".
Now this is my main concern that if I compiled OpenFoam once successfully why is it missing a library when i try to compile it again?
ArminAlavi is offline   Reply With Quote

Old   August 25, 2019, 08:04
Default
  #5
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,942
Blog Entries: 42
Rep Power: 121
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: The installation provided in the Deb package does not provide all dependency libraries for compiling from source code, because OpenFOAM is already compiled in the provided installation.

See the instructions given here: https://openfoam.org/download/source...r-compilation/ - under the section "Installing dependent packages on Ubuntu (versions 16.04 or above)"
ArminAlavi likes this.
wyldckat is offline   Reply With Quote

Reply

Tags
allwmake, compilation error, debug mode, openfoam4, wmake

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Getting Started with OpenFOAM wyldckat OpenFOAM 24 October 2, 2019 21:35
[PyFoam] Problems with the new PyFoam release zfaraday OpenFOAM Community Contributions 13 December 9, 2014 18:58
[PyFoam] having problems with pyfoam Installation vitorspadetoventurin OpenFOAM Community Contributions 3 December 2, 2014 07:18
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 06:55
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 14:25


All times are GMT -4. The time now is 11:49.