CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

New solver compile error

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 26, 2013, 17:33
Default New solver compile error
  #1
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 4
kilroy is on a distinguished road
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
kilroy is offline   Reply With Quote

Old   April 29, 2013, 04:09
Default
  #2
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
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
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   April 29, 2013, 06:56
Default
  #3
New Member
 
Emanuele Leggio
Join Date: May 2009
Posts: 11
Rep Power: 8
nanes is on a distinguished road
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.
nanes is offline   Reply With Quote

Old   April 29, 2013, 09:09
Default
  #4
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 4
kilroy is on a distinguished road
@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
kilroy is offline   Reply With Quote

Old   April 29, 2013, 09:19
Default
  #5
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 4
kilroy is on a distinguished road
@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
kilroy is offline   Reply With Quote

Old   April 29, 2013, 09:22
Default
  #6
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 4
kilroy is on a distinguished road
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
kilroy is offline   Reply With Quote

Old   April 29, 2013, 10:10
Default
  #7
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
Quote:
Originally Posted by kilroy View Post
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
so after compile, type in terminal
which waveDyMFoam
then it would show from where it reads your binary file
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   April 29, 2013, 10:22
Default
  #8
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 4
kilroy is on a distinguished road
Quote:
so after compile, type in terminal
which waveDyMFoam
then it would show from where it reads your binary file
When I run "which waveDyMFoam" command after the compile, it gives me the path below:

/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.
kilroy is offline   Reply With Quote

Old   April 29, 2013, 10:30
Default
  #9
New Member
 
Emanuele Leggio
Join Date: May 2009
Posts: 11
Rep Power: 8
nanes is on a distinguished road
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?
nanes is offline   Reply With Quote

Old   April 29, 2013, 10:30
Default
  #10
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 4
kilroy is on a distinguished road
@Emanuele

Let me check...
kilroy is offline   Reply With Quote

Old   April 29, 2013, 10:40
Default
  #11
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
Quote:
Originally Posted by kilroy View Post
When I run "which waveDyMFoam" command after the compile, it gives me the path below:

/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.
problem is solved :P, you make the binary file in root bin so when you
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
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   April 29, 2013, 10:52
Default
  #12
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 4
kilroy is on a distinguished road
Quote:
problem is solved :P, you make the binary file in root bin so when you
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
Nima,

Yes, it works now

Nima, Emanuele both of you thank you so much for your help.

Kilroy
kilroy is offline   Reply With Quote

Reply

Thread Tools
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
polynomial thermophysical properties II sebastian OpenFOAM Running, Solving & CFD 53 April 10, 2014 05:45
Saving ParaFoam views and case sail OpenFOAM Paraview & paraFoam 9 November 25, 2011 16:46
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 07: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 20:08


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