problem with wmake please help
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.
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.
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?
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.
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
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
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,
/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,
/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.
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!
ooops!! thats correct, Thank you very much.
such a small mistake almost wasted two days.
Thank you again
|All times are GMT -4. The time now is 03:09.|