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

problem with wmake please help

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 11, 2010, 18:39
Default problem with wmake please help
  #1
Member
 
Naveen
Join Date: Feb 2010
Location: Los Angeles
Posts: 65
Rep Power: 16
vetnav is on a distinguished road
Hi,

I just installed OpenFOAM on my Ubuntu 10.04, using Ubuntu/Debian Pack installation everything went fine and I was able to run the cavity tutorial.

But, when I go to /opt/openfoam171/applications/solvers/incompressible/icoFoam and try to use the command wmake I get the following error

mkdir: cannot create directory `linux64GccDPOpt': Permission denied
/bin/sh: cannot create linux64GccDPOpt/options: Directory nonexistent
make: *** [linux64GccDPOpt/options] Error 2
/opt/openfoam171/wmake/MakefileFiles:39: linux64GccDPOpt/options: No such file or directory
make: *** No rule to make target `linux64GccDPOpt/options'. Stop.
wmake error: file 'Make/linux64GccDPOpt/objectFiles' could not be created

I tried the same by going to another solver and faced the same problem. Can somebody tell me what am I doing wrong.

Thank you
vetnav is offline   Reply With Quote

Old   December 12, 2010, 06:36
Default
  #2
Member
 
Usit McCarra
Join Date: Oct 2010
Posts: 51
Blog Entries: 2
Rep Power: 16
McCarra is on a distinguished road
If you look at the error message, it says: permission denied. That's because the solver is in the "opt/OpenFoam171" folder. There are two options:
- compile as a superuser: you have to know the superuser password and then you'll have permission. This choice is not recommended unless you know exactly what you are doing. Manipulating the "opt/OpenFoam171" can damage your installation.

- Copy the OpenFoam folder to your HOME folder by typing: "mkdir -p $FOAM_RUN", and then "cp -r $FOAM_TUTORIALS $FOAM_RUN". There you'll have permission and it is not dangerous. The only thing you have to do is replace FOAM_APPBIN in "solver_name_folder/make/files" by FOAM_USER_APPBIN, to say that you want to place it in the home folder, not in the original opt/OpenFoam171, where you need permission.

best
McCarra is offline   Reply With Quote

Old   December 12, 2010, 21:18
Default
  #3
Member
 
Naveen
Join Date: Feb 2010
Location: Los Angeles
Posts: 65
Rep Power: 16
vetnav is on a distinguished road
Dear McCarra,

Thank you for the reply, I am just following one of the OpenFOAM introductory lectures by Jasak, so he mentions the same what you have suggested. But when I do that and try to use wmake, I receive lot of errors (more than 100 lines of error messages in the terminal) most of them say expected ; before some variable name (location of them is finitevolume/../Ininclude) and some of the errors are about undeclared variables, so I don't have any idea how to solve this problem.

Three weeks back when I followed the same lecture in my desktop, I was able to add a scalar equation to icoFoam and got the results, but yesterday I installed OpenFOAM in my laptop and tried to do the same and I am getting all these problems (Note: I could run the cases in tutorial folder that I copied to my Home directory)

Do you think this is problem with my installation?

Thank you
vetnav is offline   Reply With Quote

Old   December 13, 2010, 04:33
Default
  #4
Member
 
Usit McCarra
Join Date: Oct 2010
Posts: 51
Blog Entries: 2
Rep Power: 16
McCarra is on a distinguished road
Hi

I didn't know you were compiling a solver with modifications. In that case, if you've done exactly the same as in your desktop I would say there shouldn't be any error, and that might be related to the installation. When you compiled in your desktop, was it in an OpenFoam copy in your HOME directory, or in opt directory?

I had this kind of errors once I modified a solver but that was because I forgot several #includes in the code.

Make sure you have all necessary statements in make/options inside your solver folder.

If you don't mind you could send the solver folder attached here and I'll have a look since I have no idea where your errors are coming from.

Regards
McCarra is offline   Reply With Quote

Old   December 13, 2010, 12:21
Default
  #5
Member
 
Naveen
Join Date: Feb 2010
Location: Los Angeles
Posts: 65
Rep Power: 16
vetnav is on a distinguished road
Hello,

Thank you very much for your time, I am attaching the folder myIcoFoam.tar.gz, and the modifications I made correspond to the first step in the tutorial by Tommaso Lucchini (the file is large so I couldn't attach it, title of the presentation is OpenFoam programming tutorial, but if you google with this exact sentence it is the first search result a pdf file)

So What I did is
1) copy the icoFoam folder from
$WM_PROJECT_DIR/applications/solvers/incompressible
to
$WM_PROJECT_USER_DIR/applications

2) change the folder name from icoFoam to myIcoFoam
3) change the file name icoFoam.c to myIcoFoam.c
4) execute the command wclean
5) change the content of Make/files file to
myIcoFoam.c
EXE = $(FOAM_USER_APPBIN)/myIcoFoam
6) execute the command wmake

and some lines in the long output I see in the terminal are as follows

In file included from /opt/openfoam171/src/finiteVolume/lnInclude/fvm.H:43,
from /opt/openfoam171/src/finiteVolume/lnInclude/fvCFD.H:10,
from myIcoFoam.c:32:
/opt/openfoam171/src/finiteVolume/lnInclude/fvmDdt.H:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Foam’

In file included from /opt/openfoam171/src/finiteVolume/lnInclude/fvm.H:45,
from /opt/openfoam171/src/finiteVolume/lnInclude/fvCFD.H:10,
from myIcoFoam.c:32:
/opt/openfoam171/src/finiteVolume/lnInclude/fvmDiv.H:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Foam’

In file included from myIcoFoam.c:38:
/opt/openfoam171/src/OpenFOAM/lnInclude/setRootCase.H: In function ‘main’:
/opt/openfoam171/src/OpenFOAM/lnInclude/setRootCase.H:5: error: expected expression before ‘:’ token
/opt/openfoam171/src/OpenFOAM/lnInclude/setRootCase.H:6: error: ‘args’ undeclared (first use in this function)
/opt/openfoam171/src/OpenFOAM/lnInclude/setRootCase.H:6: error: (Each undeclared identifier is reported only once
/opt/openfoam171/src/OpenFOAM/lnInclude/setRootCase.H:6: error: for each function it appears in.)
/opt/openfoam171/src/OpenFOAM/lnInclude/setRootCase.H:8: error: duplicate label ‘Foam’
/opt/openfoam171/src/OpenFOAM/lnInclude/setRootCase.H:5: note: previous definition of ‘Foam’ was here
/opt/openfoam171/src/OpenFOAM/lnInclude/setRootCase.H:8: error: expected expression before ‘:’ token
myIcoFoam.c:56: error: ‘fvVectorMatrix’ undeclared (first use in this function)
myIcoFoam.c:56: error: expected ‘;’ before ‘UEqn’
myIcoFoam.c:63: warning: implicit declaration of function ‘solve’
myIcoFoam.c:63: error: ‘UEqn’ undeclared (first use in this function)
myIcoFoam.c:63: error: ‘fvc’ undeclared (first use in this function)
myIcoFoam.c:63: error: expected ‘)’ before ‘:’ token
myIcoFoam.c:67: error: ‘for’ loop initial declarations are only allowed in C99 mode
myIcoFoam.c:67: note: use option -std=c99 or -std=gnu99 to compile your code
myIcoFoam.c:67: error: ‘nCorr’ undeclared (first use in this function)
myIcoFoam.c:69: error: expected ‘;’ before ‘rUA’
myIcoFoam.c:71: error: ‘U’ undeclared (first use in this function)
myIcoFoam.c:71: error: ‘rUA’ undeclared (first use in this function)
myIcoFoam.c:72: error: ‘phi’ undeclared (first use in this function)
myIcoFoam.c:72: error: expected ‘)’ before ‘:’ token
myIcoFoam.c:73: error: expected ‘;’ before ‘:’ token
myIcoFoam.c:75: warning: implicit declaration of function ‘adjustPhi’
myIcoFoam.c:77: error: ‘for’ loop initial declarations are only allowed in C99 mode
myIcoFoam.c:79: error: ‘fvScalarMatrix’ undeclared (first use in this function)
myIcoFoam.c:79: error: expected ‘;’ before ‘pEqn’
myIcoFoam.c:84: error: ‘pEqn’ undeclared (first use in this function)
In file included from myIcoFoam.c:93:
/opt/openfoam171/src/finiteVolume/lnInclude/continuityErrs.H:33: error: expected ‘;’ before ‘contErr’
/opt/openfoam171/src/finiteVolume/lnInclude/continuityErrs.H:35: error: expected ‘;’ before ‘sumLocalContErr’
/opt/openfoam171/src/finiteVolume/lnInclude/continuityErrs.H:38: error: expected ‘;’ before ‘globalContErr’
/opt/openfoam171/src/finiteVolume/lnInclude/continuityErrs.H:40: error: ‘cumulativeContErr’ undeclared (first use in this function)
/opt/openfoam171/src/finiteVolume/lnInclude/continuityErrs.H:40: error: ‘globalContErr’ undeclared (first use in this function)
/opt/openfoam171/src/finiteVolume/lnInclude/continuityErrs.H:42: error: ‘sumLocalContErr’ undeclared (first use in this function)
myIcoFoam.c:95: error: expected ‘;’ before ‘:’ token
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H:14: warning: unused variable ‘nOuterCorr’
/opt/openfoam171/src/OpenFOAM/lnInclude/setRootCase.H:5: warning: label ‘Foam’ defined but not used
make: *** [Make/linux64GccDPOpt/myIcoFoam.o] Error 1


So, I am unable to figure out what is going wrong.

Thank you
Attached Files
File Type: gz myIcoFoam.tar.gz (5.0 KB, 12 views)
vetnav is offline   Reply With Quote

Old   December 13, 2010, 14:26
Default
  #6
Member
 
Usit McCarra
Join Date: Oct 2010
Posts: 51
Blog Entries: 2
Rep Power: 16
McCarra is on a distinguished road
Hello my friend. You were doing nothing wrong. Just a small misspelling. In order to make everything work properly just change .c by .C. You have myIcoFoam.c, inside your solver folder. Turn it capital and thats it!
McCarra is offline   Reply With Quote

Old   December 13, 2010, 15:44
Default
  #7
Member
 
Naveen
Join Date: Feb 2010
Location: Los Angeles
Posts: 65
Rep Power: 16
vetnav is on a distinguished road
ooops!! thats correct, Thank you very much.

such a small mistake almost wasted two days.

Thank you again
vetnav 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
UDF compiling problem Wouter Fluent UDF and Scheme Programming 6 June 6, 2012 05:43
OpenFOAM installation problem. File missing in wmake shangzung OpenFOAM Installation 1 July 8, 2010 11:57
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 07:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 20:13
Is this problem well posed? Thomas P. Abraham Main CFD Forum 5 September 8, 1999 15:52


All times are GMT -4. The time now is 22:08.