CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

ok compile but not find the solver !

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 29, 2013, 13:53
Default ok compile but not find the solver !
  #1
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,173
Rep Power: 16
immortality is on a distinguished road
I have compiled a new solver with this message well(last lines of compiling message):
Code:
odels/basic/lnInclude -I/opt/openfoam220/src/thermophysicalModels/specie/lnInclude -I/opt/openfoam220/src/turbulenceModels/compressible/turbulenceModel -I/opt/openfoam220/src/dynamicMesh/lnInclude -I/opt/openfoam220/src/meshTools/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/rhoCentralFoamModified.o -L/opt/openfoam220/platforms/linux64GccDPOpt/lib \
         -lfiniteVolume -lfluidThermophysicalModels -lspecie -lrhoCentralFoam -lcompressibleTurbulenceModel -lcompressibleRASModels -lcompressibleLESModels -lmeshTools -lOpenFOAM -ldl   -lm -o /home/ehsan/OpenFOAM/root-2.2.0/platforms/linux64GccDPOpt/bin/rhoCentralFoamModified
+ wmake rhoCentralDyMFoam
Making dependency list for source file rhoCentralDyMFoam.C
SOURCE=rhoCentralDyMFoam.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I.. -I../BCs/lnInclude -I/opt/openfoam220/src/finiteVolume/lnInclude -I/opt/openfoam220/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam220/src/thermophysicalModels/specie/lnInclude -I/opt/openfoam220/src/turbulenceModels/compressible/turbulenceModel -I/opt/openfoam220/src/dynamicMesh/lnInclude -I/opt/openfoam220/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/rhoCentralDyMFoam.o
../createFields.H: In function ‘int main(int, char**)’:
../createFields.H:11:23: warning: unused variable ‘T’ [-Wunused-variable]
/opt/openfoam220/src/finiteVolume/lnInclude/readTimeControls.H:32:12: warning: unused variable ‘adjustTimeStep’ [-Wunused-variable]
/opt/openfoam220/src/finiteVolume/lnInclude/readTimeControls.H:35:8: warning: unused variable ‘maxCo’ [-Wunused-variable]
/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../BCs/lnInclude -I/opt/openfoam220/src/finiteVolume/lnInclude -I/opt/openfoam220/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam220/src/thermophysicalModels/specie/lnInclude -I/opt/openfoam220/src/turbulenceModels/compressible/turbulenceModel -I/opt/openfoam220/src/dynamicMesh/lnInclude -I/opt/openfoam220/src/meshTools/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/rhoCentralDyMFoam.o -L/opt/openfoam220/platforms/linux64GccDPOpt/lib \
         -lfiniteVolume -lfluidThermophysicalModels -lspecie -lrhoCentralFoam -lcompressibleTurbulenceModel -lcompressibleRASModels -lcompressibleLESModels -ldynamicMesh -lmeshTools -lOpenFOAM -ldl   -lm -o /opt/openfoam220/platforms/linux64GccDPOpt/bin/rhoCentralDyMFoam
but when execute this error is displayed:

Code:
ehsan@Ehsan-com:~/Desktop/WR_Central_Riemann_U_right_modular$ pyFoamPlotRunner.py --hardcopy --with-courant --no-pickled-file --procnr=4 rhoCentralFoamModified
 PyFoam WARNING on line 139 of file /usr/local/lib/python2.7/dist-packages/PyFoam/Execution/ParallelExecution.py : which can not find a match for rhoCentralFoamModified . Hoping for the best 
--------------------------------------------------------------------------
mpirun was unable to launch the specified application as it could not find an executable:

Executable: rhoCentralFoamModified
Node: Ehsan-com

while attempting to start process rank 0.
--------------------------------------------------------------------------
how to resolve?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   April 29, 2013, 16:57
Default
  #2
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Mol, Belgium
Posts: 294
Rep Power: 13
Lieven will become famous soon enough
This might help

Solver "command not found" error
Lieven is offline   Reply With Quote

Old   April 29, 2013, 19:09
Default
  #3
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,511
Blog Entries: 33
Rep Power: 74
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Lieven is correct!
The end of the second line indicates where the solver ended up:
Quote:
Code:
/home/ehsan/OpenFOAM/root-2.2.0/platforms/linux64GccDPOpt/bin/rhoCentralFoamModified
"root-2.2.0" means that the solver was build while using "sudo".
wyldckat is offline   Reply With Quote

Old   April 30, 2013, 06:37
Default
  #4
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,173
Rep Power: 16
immortality is on a distinguished road
thanks.my modified solver is on desktop and I had compile and run another solver successfully before that is on desktop too.
the rhoCentralFoam that I have changed and have put to desktop has two folders with BCs and rhoCentralDymFoam that have their own make folders.
should I change them to USER too?
I don't know whether the solver needs them or not.but when I delete them this error displays:
with ./Allwmake
Code:
ehsan@Ehsan-com:~/Desktop/rhoCentralFoamModified$ ./Allwmake
+ wmake libso BCs
wmake error: could not change to directory 'BCs'
and with wmake:
Code:
ehsan@Ehsan-com:~/Desktop/rhoCentralFoamModified$ wmake
touch: cannot touch `Make/linux64GccDPOpt/dontIncludeDeps': Permission denied
Making dependency list for source file rhoCentralFoamModified.C
could not open file fixedRhoFvPatchScalarField.H for source file rhoCentralFoamModified.C
/bin/sh: cannot create Make/linux64GccDPOpt/dependencies: Permission denied
make: *** [Make/linux64GccDPOpt/dependencies] Error 2
what should i do?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   April 30, 2013, 11:33
Default
  #5
Member
 
Join Date: Nov 2012
Posts: 50
Rep Power: 4
Henning86 is on a distinguished road
you have to change them to USER. otherwise you have no permission to right in the normal pass with is by default opt/

if you change it to user then it will write in your home directory.
it is pretty good explained in the user guide
Henning86 is offline   Reply With Quote

Old   April 30, 2013, 11:58
Default
  #6
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,173
Rep Power: 16
immortality is on a distinguished road
thanks.so the other folders in the solver(BCs and rhoCEntralDYMFoam) should be compiled also? how can find solver uses them(specially BCs folder)?
I edited BCs folder in "files" as this:
Code:
mixedFixedValueSlip/mixedFixedValueSlipFvPatchFields.C
U/maxwellSlipUFvPatchVectorField.C
T/smoluchowskiJumpTFvPatchScalarField.C
rho/fixedRhoFvPatchScalarField.C

LIB = $(FOAM_USER_LIBBIN)/librhoCentralFoamModified
is this ok?
but this error occured:
Code:
ehsan@Ehsan-com:~/Desktop/rhoCentralFoamModified/BCs$ wmake
/bin/sh: cannot create linux64GccDPOpt/files: Permission denied
make: *** [linux64GccDPOpt/files] Error 2
touch: cannot touch `Make/linux64GccDPOpt/dontIncludeDeps': Permission denied
/bin/sh: cannot create Make/linux64GccDPOpt/dependencies: Permission denied
make: *** [Make/linux64GccDPOpt/dependencies] Error 2
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.

Last edited by immortality; April 30, 2013 at 12:11. Reason: adding information
immortality is offline   Reply With Quote

Old   April 30, 2013, 19:31
Default
  #7
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,511
Blog Entries: 33
Rep Power: 74
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Greetings to all!

@Ehsan: I can only guess that the first post you made was a result of running:
Code:
sudo ./Allwmake
This resulted in creating folders with the administrative user named "root". When folders and files are create with that user account, only that user can delete them.

The simplest solution is to now run:
Code:
sudo wclean all
which will remove the temporary build files.

After that, you can simply use:
Code:
./Allwmake
As for the other two folders: you can remove the folders "BCs" and "rhoCentralDyMFoam", if you only need to modify the main "rhoCentralFoam" solver.

Best regards,
Bruno

edit: for more information about sudo and "root": https://help.ubuntu.com/community/RootSudo

Last edited by wyldckat; April 30, 2013 at 19:33. Reason: see "edit:"
wyldckat is offline   Reply With Quote

Old   May 1, 2013, 04:43
Default
  #8
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,173
Rep Power: 16
immortality is on a distinguished road
thanks.yes you are right.
but now i encountered an odd error:
Code:
ehsan@Ehsan-com:~/Desktop/rhoCentralFoamModified$ sudo wclean all
[sudo] password for ehsan: 
sudo: wclean: command not found
how it doen't know wclean?!!
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   May 1, 2013, 04:57
Default
  #9
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Mol, Belgium
Posts: 294
Rep Power: 13
Lieven will become famous soon enough
Try the following:
Code:
$ sudo su
$ source /opt/openfoam-xxx/etc/bashrc
$ wclean all
Lieven is offline   Reply With Quote

Old   May 1, 2013, 05:33
Default
  #10
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,173
Rep Power: 16
immortality is on a distinguished road
third command lead to:
Code:
root@Ehsan-com:/home/ehsan/Desktop/rhoCentralFoamModified# wclean all
No command 'wclean' found, did you mean:
 Command 'uclean' from package 'svn-buildpackage' (universe)
wclean: command not found
the second command resulted:
Code:
root@Ehsan-com:/home/ehsan/Desktop/rhoCentralFoamModified# source /opt/openfoam-220/etc/bashrc
bash: /opt/openfoam-220/etc/bashrc: No such file or directory
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   May 1, 2013, 05:43
Default
  #11
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,511
Blog Entries: 33
Rep Power: 74
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
OK, let's try this the other way around and lets fix the folders that were created as root. As normal user (not root), go into the folder where you have your custom solver. Then run:
Code:
sudo chown -R $USER:$USER ./
wclean all

Last edited by wyldckat; May 1, 2013 at 06:13. Reason: Changed "." to "./" to make it clearer...
wyldckat is offline   Reply With Quote

Old   May 1, 2013, 06:00
Default
  #12
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,173
Rep Power: 16
immortality is on a distinguished road

Code:
ehsan@Ehsan-com:~/Desktop/rhoPimpleFoamModified$ sudo chown -R $USER:$USER
[sudo] password for ehsan: 
chown: missing operand after `ehsan:ehsan'
Try `chown --help' for more information.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   May 1, 2013, 06:16
Default
  #13
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,511
Blog Entries: 33
Rep Power: 74
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
I've edited my previous post... seems like you didn't see the dot symbol ".", so I added a slash "/" to make it clearer...
wyldckat is offline   Reply With Quote

Old   May 1, 2013, 06:35
Default
  #14
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,173
Rep Power: 16
immortality is on a distinguished road
i thought that was for end of the sentence!
wmake leads to it again:
Code:
ehsan@Ehsan-com:~/Desktop/rhoCentralFoamModified$ wmake
Making dependency list for source file rhoCentralFoamModified.C
could not open file fixedRhoFvPatchScalarField.H for source file rhoCentralFoamModified.C
SOURCE=rhoCentralFoamModified.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -IBCs/lnInclude -I/opt/openfoam220/src/finiteVolume/lnInclude -I/opt/openfoam220/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam220/src/thermophysicalModels/specie/lnInclude -I/opt/openfoam220/src/turbulenceModels/compressible/turbulenceModel -I/opt/openfoam220/src/dynamicMesh/lnInclude -I/opt/openfoam220/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/rhoCentralFoamModified.o
rhoCentralFoamModified.C:37:40: fatal error: fixedRhoFvPatchScalarField.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/rhoCentralFoamModified.o] Error 1
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   May 1, 2013, 06:43
Default
  #15
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,511
Blog Entries: 33
Rep Power: 74
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
A dot in code is usually not the end of a sentence Unless it's between quotes:
Code:
echo "Now this is a sentence."
OK, as for the current problem, I was too sleepy last night to write down the additional steps... The missing steps are simple:
  1. Edit the file "Make/options".
  2. Find this line:
    Code:
    -IBCs/lnInclude \
  3. Replace it with:
    Code:
    -I$(FOAM_SOLVERS)/compressible/rhoCentralFoam/BCs/lnInclude \
wyldckat is offline   Reply With Quote

Old   May 1, 2013, 07:10
Default
  #16
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,173
Rep Power: 16
immortality is on a distinguished road
thank you.what a genius you are!
it works properly now.
what was that code you told me?I never had changed anything in make/options.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   May 1, 2013, 08:04
Default
  #17
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,511
Blog Entries: 33
Rep Power: 74
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Quote:
Originally Posted by immortality View Post
what was that code you told me?I never had changed anything in make/options.
It's all (briefly) explained here: http://www.openfoam.org/docs/user/co...plications.php
wyldckat is offline   Reply With Quote

Old   May 20, 2014, 07:50
Default
  #18
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,173
Rep Power: 16
immortality is on a distinguished road
Hi again dear Bruno,
I want to run the case on another computer, but this error again occurs,
I tested with sudo wclean all
but this error occurs:
Code:
thesis@thesis-X58A-UD7:/media/01CB6899AE13A880/final-nazeri/rhoCentralFoamGasCont$ sudo wclean all
sudo: wclean: command not found
and this for instance, for compiling with normal user
Code:
thesis@thesis-X58A-UD7:/media/01CB6899AE13A880/final-nazeri/rhoCentralFoamGasCont$ ./Allwmake
bash: ./Allwmake: Permission denied
I tried the ways you've told before but its the errors are remained.
Code:
thesis@thesis-X58A-UD7:/media/01CB6899AE13A880/final-nazeri/rhoCentralFoamGasCont$ sudo chown -R $USER:$USER ./
[sudo] password for thesis: 
thesis@thesis-X58A-UD7:/media/01CB6899AE13A880/final-nazeri/rhoCentralFoamGasCont$ wclean all
wclean ./
/opt/openfoam220/wmake/wclean: 137: ./Allwclean: Permission denied
thesis@thesis-X58A-UD7:/media/01CB6899AE13A880/final-nazeri/rhoCentralFoamGasCont$
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   May 24, 2014, 05:02
Default
  #19
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,511
Blog Entries: 33
Rep Power: 74
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Hi Ehsan,

Quote:
Originally Posted by immortality
The Only Stupid Question Is the One that Goes Unasked.
I wonder what is the saying for those who asked the question, got the answer and then lost that answer .

So, here I go and repeat myself for the I don't known how many times:
  1. You're trying to run scripts on the external hard-drive, which has a non-POSIX compliant file system. In other words, no matter how much you use sudo, you will still not have enough permissions to run on that hard-drive, because it does not allow execution of scripts and applications from there. Or at least, not usually.
  2. Never use sudo to build custom applications. Unless you know what you're doing. Which in this case, clearly you don't know .
  3. If you're going to build or run something to be used with OpenFOAM, copy from the external hard-drive to your Linux desktop folder or any other "/home/your_user_name" folder on your Linux installation. Then you can use chmod to change the execution permissions for the scripts.
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   May 27, 2014, 16:32
Smile
  #20
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,173
Rep Power: 16
immortality is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Ehsan,


I wonder what is the saying for those who asked the question, got the answer and then lost that answer .

So, here I go and repeat myself for the I don't known how many times:
  1. You're trying to run scripts on the external hard-drive, which has a non-POSIX compliant file system. In other words, no matter how much you use sudo, you will still not have enough permissions to run on that hard-drive, because it does not allow execution of scripts and applications from there. Or at least, not usually.
  2. Never use sudo to build custom applications. Unless you know what you're doing. Which in this case, clearly you don't know .
  3. If you're going to build or run something to be used with OpenFOAM, copy from the external hard-drive to your Linux desktop folder or any other "/home/your_user_name" folder on your Linux installation. Then you can use chmod to change the execution permissions for the scripts.
Best regards,
Bruno
Hi dear Bruno,
I copied the folder of edited solver to the desktop but the above errors repeated again. although my adviser saw my code and surprised by what I've done with OpenFOAM and said that there is no need to run there again but why same commands don't act on the PC in his room?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality 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
ANSYS Workbench on "Uncertified" Linux Distros hsr CFX 236 December 10, 2014 16:06
thobois class engineTopoChangerMesh error Peter_600 OpenFOAM 4 August 2, 2014 10:52
New solver compile error kilroy OpenFOAM Programming & Development 11 April 29, 2013 11:52
Working directory via command line Luiz CFX 4 March 6, 2011 21:02
Using a user-defined solver in OF ozzythewise OpenFOAM Running, Solving & CFD 3 February 8, 2011 16:28


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