|
[Sponsors] |
July 21, 2017, 11:05 |
OpenFoam deug mode
|
#1 |
New Member
Felipe Murad
Join Date: Mar 2017
Posts: 11
Rep Power: 9 |
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 18:08. |
|
August 10, 2019, 10:58 |
same problem here
|
#2 |
New Member
Armin Alavi
Join Date: May 2019
Location: Tehran
Posts: 22
Rep Power: 7 |
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 |
|
August 15, 2019, 19:56 |
|
#3 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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 If you want to do things correctly, you can either try following the installation instructions from:
__________________
|
|
August 24, 2019, 05:41 |
|
#4 |
New Member
Armin Alavi
Join Date: May 2019
Location: Tehran
Posts: 22
Rep Power: 7 |
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? |
|
August 25, 2019, 09:04 |
|
#5 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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)" |
|
Tags |
allwmake, compilation error, debug mode, openfoam4, wmake |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Getting Started with OpenFOAM | wyldckat | OpenFOAM | 26 | June 21, 2024 07:54 |
[PyFoam] Problems with the new PyFoam release | zfaraday | OpenFOAM Community Contributions | 13 | December 9, 2014 19:58 |
[PyFoam] having problems with pyfoam Installation | vitorspadetoventurin | OpenFOAM Community Contributions | 3 | December 2, 2014 08:18 |
New OpenFOAM Forum Structure | jola | OpenFOAM | 2 | October 19, 2011 07:55 |
Adventure of fisrst openfoam installation on Ubuntu 710 | jussi | OpenFOAM Installation | 0 | April 24, 2008 15:25 |