|
[Sponsors] |
April 26, 2013, 17:33 |
New solver compile error
|
#1 |
Senior Member
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 13 |
Hello,
I am not an expert on Linux and I am trying to compile "waveFoam" and "waveDyMFoam" solvers. I compiled the "waveFoam" solver successfully. Everything was ready for the "waveFoam" solver, I just downloaded all the files and ran the "Allwmake". For the "waveDyMFoam" solver I followed the steps described in the wiki below: https://sites.google.com/site/jordim...ic-mesh-motion Basically, I modified "waveDyMFoam' from the "interDyMFoam" solver. Everything compiled fine but now when I try to run the "waveDyMFoam" solver, I get the error below: waveDyMFoam: command not found I am not sure what did I do wrong. I did everything exactly as described in the wiki. Maybe I should modify another file (bashrc??). Thank you very much for your time and help, Kilroy |
|
April 29, 2013, 04:09 |
|
#2 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 25 |
you should post your compile messages here , then it would be easer to help you
However i guess you use a packaged version of OpenFOAM, if yes!, then it would be you are going to make your solver at! /opt which is written protected
__________________
My Personal Website (http://nimasamkhaniani.ir/) Telegram channel (https://t.me/cfd_foam) |
|
April 29, 2013, 06:56 |
|
#3 |
New Member
Emanuele Leggio
Join Date: May 2009
Posts: 11
Rep Power: 17 |
Step 5 of
https://sites.google.com/site/jordim...ic-mesh-motion In the file Make/files is written that the executable will be in FOAM_USER_APPBIN. The question is: is there waveDyMFoam in FOAM_USER_APPBIN?? FOAM_USER_APPBIN is an environment variable, you can view the content of the variable with: echo $FOAM_USER_APPBIN the content of this variable is a path like this: /home/user/OpenFOAM/user-of_version/platforms/linux64GccDPOpt/bin for example in my system is: /home/emanuele/OpenFOAM/emanuele-2.2.x/platforms/linux64GccDPOpt/bin To view the content of this path you can: ls $FOAM_USER_APPBIN Normally $FOAM_USER_APPBIN is not written protected. |
|
April 29, 2013, 09:09 |
|
#4 |
Senior Member
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 13 |
@Nimasam
Thank you very much for your response. Yes, I downloaded OpenFOAM as a package and it is installed under the folder "/opt" While I am copying or removing files I always have to use "sudo" command there. My compilation log is below: root@meta-5:/opt/openfoam220/applications/solvers/waves2Foam/applications/solvers/solvers220/waveFoam/waveDyMFoam# wmake Making dependency list for source file waveDyMFoam.C SOURCE=waveDyMFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I.. -I/opt/openfoam220/src/transportModels -I/opt/openfoam220/src/transportModels/incompressible/lnInclude -I/opt/openfoam220/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam220/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam220/src/finiteVolume/lnInclude -I/opt/openfoam220/src/dynamicMesh/lnInclude -I/opt/openfoam220/src/dynamicFvMesh/lnInclude -I./../../../../../src/lnInclude -I/opt/openfoam220/src/meshTools/lnInclude -I/opt/openfoam220/src/fvOptions/lnInclude -I/opt/openfoam220/src/sampling/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/waveDyMFoam.o /opt/openfoam220/src/finiteVolume/lnInclude/readTimeControls.H: In function ‘int main(int, char**)’: /opt/openfoam220/src/finiteVolume/lnInclude/readTimeControls.H:38:8: warning: unused variable ‘maxDeltaT’ [-Wunused-variable] g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I.. -I/opt/openfoam220/src/transportModels -I/opt/openfoam220/src/transportModels/incompressible/lnInclude -I/opt/openfoam220/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam220/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam220/src/finiteVolume/lnInclude -I/opt/openfoam220/src/dynamicMesh/lnInclude -I/opt/openfoam220/src/dynamicFvMesh/lnInclude -I./../../../../../src/lnInclude -I/opt/openfoam220/src/meshTools/lnInclude -I/opt/openfoam220/src/fvOptions/lnInclude -I/opt/openfoam220/src/sampling/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/waveDyMFoam.o -L/opt/openfoam220/platforms/linux64GccDPOpt/lib \ -linterfaceProperties -ltwoPhaseInterfaceProperties -lincompressibleTransportModels -lincompressibleTurbulenceModel -lincompressibleRASModels -lincompressibleLESModels -lfiniteVolume -ldynamicMesh -ldynamicFvMesh -ltopoChangerFvMesh -lmeshTools -lfvOptions -lsampling -L/home/meta/OpenFOAM/root-2.2.0/platforms/linux64GccDPOpt/lib -lwaves2Foam -lOpenFOAM -ldl -lm -o /home/meta/OpenFOAM/root-2.2.0/platforms/linux64GccDPOpt/bin/waveDyMFoam root@meta-5:/opt/openfoam220/applications/solvers/waves2Foam/applications/solvers/solvers220/waveFoam/waveDyMFoam# Kilroy |
|
April 29, 2013, 09:19 |
|
#5 |
Senior Member
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 13 |
@Emanuele
Thank you very much for your response. When I run the command below: echo $FOAM_USER_APPBIN it returns: /home/meta/OpenFOAM/root-2.2.0/platforms/linux64GccDPOpt/bin But when I run the other command below that you have previously mentioned: ls $FOAM_USER_APPBIN relaxationZoneLayout setWaveParameters setWaveField surfaceElevation waveFoam Thanks, Kilroy |
|
April 29, 2013, 09:22 |
|
#6 |
Senior Member
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 13 |
I have also discovered something. When I compile the "waveDyMFoam" and immediately after that if I try to run the solver in the same terminal window, then it runs pretty fine.
But if I close that terminal window and open a new one, then it gives the "waveDyMFoam: command not found" error when I try to run the solver. I am really confused |
|
April 29, 2013, 10:10 |
|
#7 | |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 25 |
Quote:
which waveDyMFoam then it would show from where it reads your binary file
__________________
My Personal Website (http://nimasamkhaniani.ir/) Telegram channel (https://t.me/cfd_foam) |
||
April 29, 2013, 10:22 |
|
#8 | |
Senior Member
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 13 |
Quote:
/home/meta/OpenFOAM/root-2.2.0/platforms/linux64GccDPOpt/bin/waveDyMFoam which is not in the "/opt". I don't know if that is how it is supposed to be. I run "wmake" in the "/opt" folder though. When I open a new terminal window and try to run the same command, it returns nothing. |
||
April 29, 2013, 10:30 |
|
#9 |
New Member
Emanuele Leggio
Join Date: May 2009
Posts: 11
Rep Power: 17 |
From my experience the problem is an incorrect system configuration.
When you install openfoam you must be root but when you use openfoam you don't must be root, then you must modify .bashrc of your user (meta I guess). It' very strange to see that FOAM_USER_APPBIN is /home/meta/OpenFOAM/root-2.2.0/platforms/linux64GccDPOpt/bin Another problem is that in the link https://sites.google.com/site/jordim...ic-mesh-motion step 1 copy in WM_PROJECT_USER_DIR that non require root permissionion but I see in your compile messages that you lunch wmake from /opt/openfoam220/applications/solvers/waves2Foam/applications/solvers/solvers220/waveFoam/waveDyMFoam this path is different from WM_PROJECT_USER_DIR Check your system configuration, which .bashrc have you changed? |
|
April 29, 2013, 10:30 |
|
#10 |
Senior Member
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 13 |
@Emanuele
Let me check... |
|
April 29, 2013, 10:40 |
|
#11 | |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 25 |
Quote:
open new terminal, you are not root any more! so you can not find binary file! if you want to access it you need to be root again which means you should use sudo waveDyMFoam or type su then using waveDyMFoam
__________________
My Personal Website (http://nimasamkhaniani.ir/) Telegram channel (https://t.me/cfd_foam) |
||
April 29, 2013, 10:52 |
|
#12 | |
Senior Member
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 13 |
Quote:
Yes, it works now Nima, Emanuele both of you thank you so much for your help. Kilroy |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
polynomial thermophysical properties II | sebastian | OpenFOAM Running, Solving & CFD | 54 | November 21, 2019 07:12 |
[OpenFOAM] Saving ParaFoam views and case | sail | ParaView | 9 | November 25, 2011 15:46 |
ParaView for OF-1.6-ext | Chrisi1984 | OpenFOAM Installation | 0 | December 31, 2010 06:42 |
Installation OF1.5-dev | ttdtud | OpenFOAM Installation | 46 | May 5, 2009 02:32 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 19:08 |