CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Problems with wmake (http://www.cfd-online.com/Forums/openfoam-programming-development/60778-problems-wmake.html)

ivan_cozza July 16, 2008 05:31

Problems with wmake
 
Hi to ervybody!
I have this problem with wmake:
when I try to recompile something, i write wmake, but I get this message:


ivan@bombadil:~/OpenFOAM/ivan-1.4.1/run$ wmake
-bash: /opt/OpenFOAM/OpenFOAM-1.4.1/wmake/wmake: Permission denied

What's happen?
Thank you!

olesen July 16, 2008 07:24

Probably a permissions problem
 
Probably a permissions problem if you are in a different group than the owner.

Try "chmod -R a+rX DIRNAME" as the owner (eg, root) and see if that fixes it.

Note that 'X' is in uppercase - this will only add execution permission if it is already set.

mabinty August 13, 2008 09:44

Dear all! I m about to try
 
Dear all!

I m about to try understanding OF and its structure and want to see how to compile a new library. Therefore, I copied the kEpsilon turbulence model to the user directory, modified it a bit and changed the name to mykEpsilon (see also 3rd OF training/workshop, Milano). When compiling with the command wmake libso i get the following message:

linuxGccDPOpt/options:5: *** missing separator. Stop.
/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/wmake/wmake: cannot make, file Make/linuxGccDPOpt/objectFiles was not created successfully

I was not able to find any hint in the discussion forum so can anybody give me one??

Thanks a lot in advance!

Aram

mattijs August 14, 2008 16:58

The EXE_INC and LIB_LIBS have
 
The EXE_INC and LIB_LIBS have to be one file or use '\' as continuation symbol. Check that you have '\' and no space after it.

mabinty August 18, 2008 09:48

thx mattijs for your respons!
 
thx mattijs for your respons!

i put the EXE_INC and LIB_LIBS in the same file and also used '\' as continuation symbol. The /Make/options file looks like this:

mykEpsilon.C
EXE_LIBS = $(FOAM_USER_LIBBIN)/mylibTurbulenceModel

EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/turbulenceModels/incompressible/lnInclude

producing the following Make/linuxGccDPOpt/options file:

# 1 "options"
# 1 "<built-in>"
# 1 "<command>"
# 1 "options"
mykEpsilon.C
EXE_LIBS = $(FOAM_USER_LIBBIN)/mylibTurbulenceModel

EXE_INC = -I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude -I$(LIB_SRC)/turbulenceModels/incompressible/lnInclude

not separating the exe_inc paths. I've no idea why.

Aram

mattijs August 18, 2008 14:01

The mykEpsilon.C should be in
 
The mykEpsilon.C should be in Make/files, not options. Check any other library.

roberto August 19, 2008 04:52

Hi everyone, I encountered
 
Hi everyone,

I encountered the following problem using wmake and I don't have a clear understanding of it.
Is perhaps the file gambitToFoam.C missing?
(OF is installed on Ubuntu 7.04)

Thanks a lot in advance!

Roberto


simulation@roberto-desktop:~/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/mesh
/conversion/gambitToFoam$ wmake
Making dependency list for source file gambitToFoam.L
SOURCE=gambitToFoam.L ; flex++ -f $SOURCE ; mv lex.yy.cc Make/linuxGccDPOpt/gamb
itToFoam.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unuse
d-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IlnInclud
e -I. -I/home/simulation/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC
-pthread -c Make/linuxGccDPOpt/gambitToFoam.C -o Make/linuxGccDPOpt/gambitToFoam
.o
/bin/sh: flex++: not found
mv: cannot stat `lex.yy.cc': No such file or directory
g++: Make/linuxGccDPOpt/gambitToFoam.C: No such file or directory
g++: no input files
make: *** [Make/linuxGccDPOpt/gambitToFoam.o] Error 1

mabinty August 19, 2008 06:02

thx mattijs! wmake compiles no
 
thx mattijs! wmake compiles now, and producing plenty errors as it doesn t find header files ... I've to look at it.

thx again for your help!
aram

mabinty August 19, 2008 11:07

dear all!! now I try to imp
 
dear all!!

now I try to implement a new bc rampedFixedValueFvPatchField, copied and adjusted from oscillatingFixedValueFvPatchField. after fixing some mistakes while compiling I get an error I'm not able to cope with (see command lines below).

could anybody give me a clue??

thx very much in advance!!

aram

***********************************************

[aa@lws16 icoFoamRamped]$ ll
total 44
-rw-r----- 1 aa e202 1048 2008-08-19 11:03 createFields.H
drwxr-xr-x 4 aa e202 4096 2008-08-19 11:03 FoamX
-rw-r----- 1 aa e202 3293 2008-08-19 11:03 icoFoamRamped.C
drwxr-xr-x 2 aa e202 4096 2008-08-19 16:55 Make
-rw-r----- 1 aa e202 1909 2008-08-19 11:31 oscillatingFixedValueFvPatchFieldsFwd.H
-rw-r----- 1 aa e202 5782 2008-08-19 16:40 rampedFixedValueFvPatchField.C
-rw-r----- 1 aa e202 6223 2008-08-19 16:38 rampedFixedValueFvPatchField.H
-rw-r----- 1 aa e202 1727 2008-08-19 15:57 rampedFixedValueFvPatchFields.C
-rw-r----- 1 aa e202 1867 2008-08-19 15:55 rampedFixedValueFvPatchFields.H
[aa@lws16 icoFoamRamped]$ wmake
Making dependency list for source file icoFoamRamped.C
Making dependency list for source file rampedFixedValueFvPatchFields.C
SOURCE=icoFoamRamped.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxGccDPOpt/icoFoamRamped.o
SOURCE=rampedFixedValueFvPatchFields.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxGccDPOpt/rampedFixedValueFvPatchFields.o
rampedFixedValueFvPatchField.C: In constructor 'Foam::rampedFixedValueFvPatchField<type>::rampedF ixedValueFvPatchField(const Foam::fvPatch&, const Foam::Field<type>&, const Foam::dictionary&) [with Type = double]':
/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fvPatchField.H: 132: instantiated from 'static Foam::tmp<foam::fvpatchfield<type> > Foam::fvPatchField<type>::adddictionaryConstructor ToTable<fvpatchfieldtype>::New (const Foam::fvPatch&, const Foam::DimensionedField<type,>&, const Foam::dictionary&) [with fvPatchFieldType = Foam::rampedFixedValueFvPatchField<double>, Type = double]'
/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fvPatchField.H: 132: instantiated from 'Foam::fvPatchField<type>::adddictionaryConstructo rToTable<fvpatchfieldtype>:: adddictionaryConstructorToTable(const Foam::word&) [with fvPatchFieldType = Foam::rampedFixedValueFvPatchField<double>, Type = double]'
rampedFixedValueFvPatchFields.C:38: instantiated from here
rampedFixedValueFvPatchField.C:101: error: no matching function for call to 'Foam::fixedValueFvPatchField<double>::fixedValueF vPatchField(const Foam::fvPatch&, const Foam::Field<double>&)'
/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:87: note: candidates are: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fixedValueFvPatchField<type>&, const Foam::DimensionedField<type,>&) [with Type = double]
/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:76: note: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fixedValueFvPatchField<type>&) [with Type = double]
/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:66: note: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fixedValueFvPatchField<type>&, const Foam::fvPatch&, const Foam::DimensionedField<type,>&, const Foam::fvPatchFieldMapper&) [with Type = double]
/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:53: note: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fvPatch&, const Foam::DimensionedField<type,>&, const Foam::dictionary&) [with Type = double]
/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:41: note: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fvPatch&, const Foam::DimensionedField<type,>&) [with Type = double]
rampedFixedValueFvPatchField.C: In constructor 'Foam::rampedFixedValueFvPatchField<type>::rampedF ixedValueFvPatchField(const Foam::fvPatch&, const Foam::Field<type>&, const Foam::dictionary&) [with Type = Foam::Vector<double>]':
/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fvPatchField.H: 132: instantiated from 'static Foam::tmp<foam::fvpatchfield<type> > Foam::fvPatchField<type>::adddictionaryConstructor ToTable<fvpatchfieldtype>::New (const Foam::fvPatch&, const Foam::DimensionedField<type,>&, const Foam::dictionary&) [with fvPatchFieldType = Foam::rampedFixedValueFvPatchField<foam::vector<do uble> >, Type = Foam::Vector<double>]'
/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fvPatchField.H: 132: instantiated from 'Foam::fvPatchField<type>::adddictionaryConstructo rToTable<fvpatchfieldtype>:: adddictionaryConstructorToTable(const Foam::word&) [with fvPatchFieldType = Foam::rampedFixedValueFvPatchField<foam::vector<do uble> >, Type = Foam::Vector<double>]'
rampedFixedValueFvPatchFields.C:38: instantiated from here
rampedFixedValueFvPatchField.C:101: error: no matching function for call to 'Foam::fixedValueFvPatchField<foam::vector<double> >::fixedValueFvPatchField(const Foam::fvPatch&, const Foam::Field<foam::vector<double> >&)'
/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:87: note: candidates are: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fixedValueFvPatchField<type>&, const Foam::DimensionedField<type,>&) [with Type = Foam::Vector<double>]
/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:76: note: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fixedValueFvPatchField<type>&) [with Type = Foam::Vector<double>]
/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:66: note: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fixedValueFvPatchField<type>&, const Foam::fvPatch&, const Foam::DimensionedField<type,>&, const Foam::fvPatchFieldMapper&) [with Type = Foam::Vector<double>]
/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:53: note: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fvPatch&, const Foam::DimensionedField<type,>&, const Foam::dictionary&) [with Type = Foam::Vector<double>]
/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:41: note: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fvPatch&, const Foam::DimensionedField<type,>&) [with Type = Foam::Vector<double>]
rampedFixedValueFvPatchField.C: In constructor 'Foam::rampedFixedValueFvPatchField<type>::rampedF ixedValueFvPatchField(const Foam::fvPatch&, const Foam::Field<type>&, const Foam::dictionary&) [with Type = Foam::SphericalTensor<double>]':
/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fvPatchField.H: 132: instantiated from 'static Foam::tmp<foam::fvpatchfield<type> > Foam::fvPatchField<type>::adddictionaryConstructor ToTable<fvpatchfieldtype>::New (const Foam::fvPatch&, const Foam::DimensionedField<type,>&, const Foam::dictionary&) [with fvPatchFieldType = Foam::rampedFixedValueFvPatchField<foam::spherical tensor<double> >, Type = Foam::SphericalTensor<double>]'
/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fvPatchField.H: 132: instantiated from 'Foam::fvPatchField<type>::adddictionaryConstructo rToTable<fvpatchfieldtype>:: adddictionaryConstructorToTable(const Foam::word&) [with fvPatchFieldType = Foam::rampedFixedValueFvPatchField<foam::spherical tensor<double> >, Type = Foam::SphericalTensor<double>]'
rampedFixedValueFvPatchFields.C:38: instantiated from here
rampedFixedValueFvPatchField.C:101: error: no matching function for call to 'Foam::fixedValueFvPatchField<foam::sphericaltenso r<double> >::fixedValueFvPatchField(const Foam::fvPatch&, const Foam::Field<foam::sphericaltensor<double> >&)'
/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:87: note: candidates are: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fixedValueFvPatchField<type>&, const Foam::DimensionedField<type,>&) [with Type = Foam::SphericalTensor<double>]
/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:76: note: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fixedValueFvPatchField<type>&) [with Type = Foam::SphericalTensor<double>]
/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:66: note: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fixedValueFvPatchField<type>&, const Foam::fvPatch&, const Foam::DimensionedField<type,>&, const Foam::fvPatchFieldMapper&) [with Type = Foam::SphericalTensor<double>]
/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:53: note: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fvPatch&, const Foam::DimensionedField<type,>&, const Foam::dictionary&) [with Type = Foam::SphericalTensor<double>]
/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:41: note: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fvPatch&, const Foam::DimensionedField<type,>&) [with Type = Foam::SphericalTensor<double>]
rampedFixedValueFvPatchField.C: In constructor 'Foam::rampedFixedValueFvPatchField<type>::rampedF ixedValueFvPatchField(const Foam::fvPatch&, const Foam::Field<type>&, const Foam::dictionary&) [with Type = Foam::SymmTensor<double>]':
/home/E202/aa/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fvPatchField.H: 132: instantiated from 'static Foam::tmp<foam::fvpatchfield<type> > Foam::fvPatchField<type>::adddictionaryConstructor ToTable<fvpatchfieldtype>::New (const Foam::fvPatch&, const Foam::DimensionedField<type,>&, const Foam::dictionary&) [with fvPatchFieldType = Foam::rampedFixedValueFvPatchField<foam::symmtenso r<double> >, Type = Foam::SymmTensor<double>]'

mabinty August 20, 2008 06:31

problem solved! aram
 
problem solved!

aram

marym August 20, 2008 07:30

Hello all, I've got exactly
 
Hello all,

I've got exactly the same problem as Roberto, when recompiling the combustion library. I think it's not a problem of OpenFOAM itself. I think it arises from the flex++ package which must be treated in any way different by Ubuntu and by SUSE linux.

But I have not yet a solution for that problem. Maybe there is someone who, has had the same problem with OF on Ubuntu.

I would be very grateful to get any hint, what to do.

Thanks a lot!

Maria Magdalena

mirko January 28, 2011 12:09

Quote:

Originally Posted by mabinty (Post 178331)
problem solved!

aram


Aram,

I know it is a long time, but do you recall how you solved your problem?

I am having a similar one with the oscillatingFixedValue patch (error messages are here.

Thanks,

Mirko

mirko January 28, 2011 19:04

Never mind. Problem solved. Sorry for troubling you.

halowine June 27, 2013 16:58

Problem with bash/su permission
 
Hi,

I have a problem for couple of weeks now. I created some utilities for OpenFOAM for my cases and I compiled them using wmake in 'sudo bash' permission.

On some utilities (the one that I copy/paste from the library), it work perfectly. But for them that I downloaded, I need to be in 'sudo bash' mode to actually see the utilities and execute them.

I can't also wmake my file in normal mode (no sudo bash) and the 'sudo su' doesn't work at all...

It's kind of annoying because all the file that I create in bash mode are protected when I return in normal mode.

I hope it's clear, english is not my mother tong...

Thank you though!

wyldckat June 30, 2013 07:34

Greetings Arthur,

OK, let's address the two issues at hand:
  1. Running commands as sudo (aka as root) should be avoided as much as possible. This is why usually tutorials about creating variants of OpenFOAM source code indicate that we should edit the file "Make/files" and for example, rename "FOAM_APPBIN" to "FOAM_USER_APPBIN". Here's an example of such a tutorial: http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam - as you should see, all commands are performed as normal user and not as root ;)
  2. So your files are read-only or even not accessible as normal user. Then, depending on where the files are, you can do the following steps (as normal user):
    1. Move the files as root to your user folder:
      Code:

      sudo mv /path/to/root/folder/where/files/are $HOME/my/personal/folder
      This you probably only want to do if the files are located at "/root".
    2. Change the user ownership of the files and folders. This can be done with the following command:
      Code:

      sudo chown -R $USER:$USER /path/to/files/or/folder
      Or if your user's group is "users":
      Code:

      sudo chown -R $USER:users /path/to/files/or/folder
And that's the trick!

Best regards,
Bruno


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