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

ok compile but not find the solver !

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 29, 2013, 12:53
Default ok compile but not find the solver !
  #1
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
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, 15:57
Default
  #2
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22
Lieven will become famous soon enough
This might help

http://www.cfd-online.com/Forums/ope...und-error.html
Lieven is offline   Reply With Quote

Old   April 29, 2013, 18:09
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
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
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, 05:37
Default
  #4
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
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, 10:33
Default
  #5
Member
 
Join Date: Nov 2012
Posts: 83
Rep Power: 13
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, 10:58
Default
  #6
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
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 11:11. Reason: adding information
immortality is offline   Reply With Quote

Old   April 30, 2013, 18:31
Default
  #7
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
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
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 18:33. Reason: see "edit:"
wyldckat is offline   Reply With Quote

Old   May 1, 2013, 03:43
Default
  #8
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
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, 03:57
Default
  #9
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22
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, 04:33
Default
  #10
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
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, 04:43
Default
  #11
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
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
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 05:13. Reason: Changed "." to "./" to make it clearer...
wyldckat is offline   Reply With Quote

Old   May 1, 2013, 05:00
Default
  #12
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
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, 05:16
Default
  #13
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
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
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, 05:35
Default
  #14
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
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, 05:43
Default
  #15
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
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
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, 06:10
Default
  #16
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
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, 07:04
Default
  #17
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
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
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, 06:50
Default
  #18
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
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, 04:02
Default
  #19
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
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
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, 15:32
Smile
  #20
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
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


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ANSYS Workbench on "Uncertified" Linux Distros hsr CFX 289 April 20, 2023 09:23
thobois class engineTopoChangerMesh error Peter_600 OpenFOAM 4 August 2, 2014 09:52
New solver compile error kilroy OpenFOAM Programming & Development 11 April 29, 2013 10:52
Working directory via command line Luiz CFX 4 March 6, 2011 20:02
Using a user-defined solver in OF ozzythewise OpenFOAM Running, Solving & CFD 3 February 8, 2011 15:28


All times are GMT -4. The time now is 13:18.