CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] installation problem: "./Allwmake: ... [[: not found" (https://www.cfd-online.com/Forums/openfoam-community-contributions/102231-installation-problem-allwmake-not-found.html)

Rajarshi May 25, 2012 12:11

installation problem: "./Allwmake: ... [[: not found"
 
Hi,
I'm very new to cfd programming and openfoam. I need groovyBC to impose a robin boundary condition of the type (dT/dn)_wall=(h/k)(T_wall-T_inf) at the walls(according to http://www.cfd-online.com/Forums/ope...acianfoam.html) and hence require swak4Foam. I've downloaded swak4Foam to $HOME/swak4Foam directory and used 'wmake all' to build. But it seems it hasn't installed correctly as it cannot identify "libgroovyBC.so" in controlDict file of the case after running blockMesh.
This is the output after running 'wmake all' (for the 2nd time):

No 'swakConfiguration'. Python etc won't work
Checking swak4Foam-version and generating file
./Allwmake: 9: [[: not found
./Allwmake: 17: [[: not found
Bison is version 2.4.1
./Allwmake: 33: cannot open 2.3: No such file
./Allwmake: 33: [[: not found
OpenFOAM-version: Major 2 Minor 1 Patch 0
./Allwmake: 67: [[: not found
No change to swak4FoamParsers/foamVersion4swak.H
'/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/lib/libswak4FoamParsers.so' is up to date.
'/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/lib/libgroovyBC.so' is up to date.
'/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/lib/libswakFunctionObjects.so' is up to date.
'/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/lib/libsimpleFunctionObjects.so' is up to date.
'/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/lib/libsimpleSwakFunctionObjects.so' is up to date.
'/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/lib/libswakTopoSources.so' is up to date.
'/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/lib/libswakSourceFields.so' is up to date.
'/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/lib/libgroovyStandardBCs.so' is up to date.
SWAK_PYTHON_INCLUDE not defined .... no Python-Integration
make[1]: Entering directory `/home/rajarshi/swak4Foam/Utilities/funkyDoCalc'
make[1]: `/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/bin/funkyDoCalc' is up to date.
make[1]: Leaving directory `/home/rajarshi/swak4Foam/Utilities/funkyDoCalc'
make[1]: Entering directory `/home/rajarshi/swak4Foam/Utilities/funkySetBoundaryField'
make[1]: `/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/bin/funkySetBoundaryField' is up to date.
make[1]: Leaving directory `/home/rajarshi/swak4Foam/Utilities/funkySetBoundaryField'
make[1]: Entering directory `/home/rajarshi/swak4Foam/Utilities/funkySetFields'
make[1]: `/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/bin/funkySetFields' is up to date.
make[1]: Leaving directory `/home/rajarshi/swak4Foam/Utilities/funkySetFields'
make[1]: Entering directory `/home/rajarshi/swak4Foam/Utilities/replayTransientBC'
make[1]: `/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/bin/replayTransientBC' is up to date.
make[1]: Leaving directory `/home/rajarshi/swak4Foam/Utilities/replayTransientBC'

Why does it show these "not found" at the beginning( also, I don't have python installed)? Please help me identify the problem. Any advice is appreciated.

Thank you.

gschaider May 25, 2012 18:33

Quote:

Originally Posted by Rajarshi (Post 363128)
Hi,

This is the output after running 'wmake all' (for the 2nd time):

No 'swakConfiguration'. Python etc won't work
Checking swak4Foam-version and generating file
./Allwmake: 9: [[: not found
./Allwmake: 17: [[: not found
Bison is version 2.4.1
./Allwmake: 33: cannot open 2.3: No such file
./Allwmake: 33: [[: not found
OpenFOAM-version: Major 2 Minor 1 Patch 0
./Allwmake: 67: [[: not found
No change to swak4FoamParsers/foamVersion4swak.H
'/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/lib/libswak4FoamParsers.so' is up to date.
'/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/lib/libgroovyBC.so' is up to date.
'/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/lib/libswakFunctionObjects.so' is up to date.
'/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/lib/libsimpleFunctionObjects.so' is up to date.
'/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/lib/libsimpleSwakFunctionObjects.so' is up to date.
'/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/lib/libswakTopoSources.so' is up to date.
'/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/lib/libswakSourceFields.so' is up to date.
'/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/lib/libgroovyStandardBCs.so' is up to date.
SWAK_PYTHON_INCLUDE not defined .... no Python-Integration
make[1]: Entering directory `/home/rajarshi/swak4Foam/Utilities/funkyDoCalc'
make[1]: `/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/bin/funkyDoCalc' is up to date.
make[1]: Leaving directory `/home/rajarshi/swak4Foam/Utilities/funkyDoCalc'
make[1]: Entering directory `/home/rajarshi/swak4Foam/Utilities/funkySetBoundaryField'
make[1]: `/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/bin/funkySetBoundaryField' is up to date.
make[1]: Leaving directory `/home/rajarshi/swak4Foam/Utilities/funkySetBoundaryField'
make[1]: Entering directory `/home/rajarshi/swak4Foam/Utilities/funkySetFields'
make[1]: `/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/bin/funkySetFields' is up to date.
make[1]: Leaving directory `/home/rajarshi/swak4Foam/Utilities/funkySetFields'
make[1]: Entering directory `/home/rajarshi/swak4Foam/Utilities/replayTransientBC'
make[1]: `/home/rajarshi/OpenFOAM/rajarshi-2.1.0/platforms/linuxGccDPOpt/bin/replayTransientBC' is up to date.
make[1]: Leaving directory `/home/rajarshi/swak4Foam/Utilities/replayTransientBC'

Why does it show these "not found" at the beginning( also, I don't have python installed)? Please help me identify the problem. Any advice is appreciated.

Thank you.

You're working on a fairly recent Ubuntü-Linux, right? They seem to have replaced the default shell /bin/sh : don't know what it is, but not a bash anymore. Replace in Libraries/Allwmake the first line
Code:

#! /bin/sh
with
Code:

#! /bin/bash
and it should work.

The warning in the beginning is about a configuration file. If you don't want the library with the Python-support, then you're fine

Rajarshi May 26, 2012 02:31

Thank you Bernhard!!! Yes, I am using ubuntu 11.10. I made the changes and its working fine right now.

slint May 30, 2012 19:03

Hello,

I tried to install swak4foam on Ubuntu 12.04 LTS. After downloading swak4Foam to $HOME/swak4Foam directory and using ./Allwmake , i got this error message while starting simpleFoam:


// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

--> FOAM Warning :
From function dlOpen(const fileName&, const bool)
in file POSIX.C at line 1175
dlopen error : libgroovyBC.so: cannot open shared object file: No such file or directory
--> FOAM Warning :
From function dlLibraryTable::open(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 96
could not load "libgroovyBC.so"
Create mesh for time = 0

Reading field p

Reading field U



--> FOAM FATAL IO ERROR:
Unknown patchField type groovyBC for patch type patch

Valid patchField types are :

62
(
SRFFreestreamVelocity
SRFVelocity
activeBaffleVelocity
activePressureForceBaffleVelocity
advective
atmBoundaryLayerInletVelocity
calculated
codedFixedValue
codedMixed
cyclic
cyclicAMI
cyclicSlip
cylindricalInletVelocity
directionMixed
empty
fixedGradient
fixedInternalValue
fixedNormalSlip
fixedShearStress
fixedValue
flowRateInletVelocity
fluxCorrectedVelocity
freestream
inletOutlet
kqRWallFunction
mapped
mappedField
mappedFixedInternalValue
mappedFixedPushedInternalValue
mappedFlowRate
mappedVelocityFlux
mixed
movingWallVelocity
nonuniformTransformCyclic
oscillatingFixedValue
outletInlet
outletMappedUniformInlet
partialSlip
pressureDirectedInletOutletVelocity
pressureDirectedInletVelocity
pressureInletOutletParSlipVelocity
pressureInletOutletVelocity
pressureInletUniformVelocity
pressureInletVelocity
pressureNormalInletOutletVelocity
processor
processorCyclic
rotatingPressureInletOutletVelocity
rotatingWallVelocity
sliced
slip
supersonicFreestream
surfaceNormalFixedValue
swirlFlowRateInletVelocity
symmetryPlane
timeVaryingMappedFixedValue
translatingWallVelocity
turbulentInlet
uniformFixedValue
waveTransmissive
wedge
zeroGradient
)


file: /home/robert/OpenFOAM/robert-2.1.0/run/cube3d/cube3d_kepsilon/0/U::boundaryField::inlet from line 25 to line 28.

From function fvPatchField<Type>::New(const fvPatch&, const DimensionedField<Type, volMesh>&, const dictionary&)
in file /home/opencfd/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvPatchFieldNew.C at line 135.

FOAM exiting

//********************************//

I got multiple error messages while compiling:

No 'swakConfiguration'. Python etc won't work
Checking swak4Foam-version and generating file
./Allwmake: 6: ./Allwmake: [[: not found
./Allwmake: 14: ./Allwmake: [[: not found
./Allwmake: 1: ./Allwmake: bison: not found
Bison is version
./Allwmake: 23: ./Allwmake: cannot open 2.3: No such file
./Allwmake: 23: ./Allwmake: [[: not found
OpenFOAM-version: Major 2 Minor 1 Patch 0
./Allwmake: 56: ./Allwmake: [[: not found
No change to swak4FoamParsers/foamVersion4swak.H
SOURCE=FieldValueExpressionParser.yy ; rm -f Make/linux64GccDPOpt/FieldValueExpressionParser.C Make/linux64GccDPOpt/FieldValueExpressionParser.tab.hh; mkdir $$; cd $$; bison -ra -v -d ../$SOURCE ; mv *.tab.cc ../Make/linux64GccDPOpt/FieldValueExpressionParser.C ; sed -i.bak "s/position.hh/FieldValueExpressionParser_position.hh/" location.hh ; mv location.hh ../lnInclude/FieldValueExpressionParser_location.hh ; mv stack.hh ../lnInclude/FieldValueExpressionParser_stack.hh ; mv position.hh ../lnInclude/FieldValueExpressionParser_position.hh ; sed -i.bak "s/stack.hh/FieldValueExpressionParser_stack.hh/;s/location.hh/FieldValueExpressionParser_location.hh/" FieldValueExpressionParser.tab.hh ;mv *.hh ../lnInclude ; touch -r ../$SOURCE ../lnInclude/FieldValueExpressionParser*.hh ; cd ..; rm -r $$; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -IMake/linux64GccDPOpt -I/opt/openfoam210/src/finiteVolume/lnInclude -I/opt/openfoam210/src/sampling/lnInclude -I/opt/openfoam210/src/triSurface/lnInclude -I/opt/openfoam210/src/lagrangian/basic/lnInclude -I/opt/openfoam210/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -c Make/linux64GccDPOpt/FieldValueExpressionParser.C -o Make/linux64GccDPOpt/FieldValueExpressionParser.o
/bin/sh: 1: bison: not found


So I guess the installation failed. The advice from gschaider don't work.

Can anybody help me to identify the problem?

Thanks

gschaider May 30, 2012 19:18

Quote:

Originally Posted by slint (Post 363924)
/bin/sh: 1: bison: not found

What could this mean? Maybe that a prerequisite is missing?

slint June 2, 2012 13:49

Indeed, bison was not installed. I thought, this is a standard application in ubuntu.

Thanks :)

nik May 13, 2013 06:20

compiler option
 
Hello,

I am trying to install swak4Foam and I have one question. Is it possible to define which compiler to use? On the machine I am trying to install, there is a problem with the compiler name, and when I am trying to compile I have to explicitly define CC=icc. I have the same problem with OpenFOAM, and the way around is when I am trying to compile an application, I just go to Make/options and add CC=icc.

This is what I get when I try to install swak4Foam.

Code:

SOURCE=helpers/printSwakVersion.C ;  -Dlinux64 -DWM_DP -wd327,654,819,1125,1476,1505,1572  -DNoRepository -IMake/linux64IccDPOpt          -I/gpfs/eb/software/OpenFOAM/2.1.1-ictce-4.0.6/OpenFOAM-2.1.1/src/finiteVolume/lnInclude -I/gpfs/eb/software/OpenFOAM/2.1.1-ictce-4.0.6/OpenFOAM-2.1.1/src/sampling/lnInclude  -I/gpfs/eb/software/OpenFOAM/2.1.1-ictce-4.0.6/OpenFOAM-2.1.1/src/triSurface/lnInclude -I/gpfs/eb/software/OpenFOAM/2.1.1-ictce-4.0.6/OpenFOAM-2.1.1/src/surfMesh/lnInclude -I/gpfs/eb/software/OpenFOAM/2.1.1-ictce-4.0.6/OpenFOAM-2.1.1/src/lagrangian/basic/lnInclude -I/gpfs/eb/software/OpenFOAM/2.1.1-ictce-4.0.6/OpenFOAM-2.1.1/src/meshTools/lnInclude -IlnInclude -I. -I/gpfs/eb/software/OpenFOAM/2.1.1-ictce-4.0.6/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/gpfs/eb/software/OpenFOAM/2.1.1-ictce-4.0.6/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64IccDPOpt/printSwakVersion.o
/bin/sh: -Dlinux64: command not found

Most probably CC is empty and when expanding it leaves it blank.

Is there something I can do here?

Regards,
Nicolas

gschaider May 13, 2013 08:25

Quote:

Originally Posted by nik (Post 427122)
Hello,

I am trying to install swak4Foam and I have one question. Is it possible to define which compiler to use? On the machine I am trying to install, there is a problem with the compiler name, and when I am trying to compile I have to explicitly define CC=icc. I have the same problem with OpenFOAM, and the way around is when I am trying to compile an application, I just go to Make/options and add CC=icc.

This is what I get when I try to install swak4Foam.

Code:

SOURCE=helpers/printSwakVersion.C ;  -Dlinux64 -DWM_DP -wd327,654,819,1125,1476,1505,1572  -DNoRepository -IMake/linux64IccDPOpt          -I/gpfs/eb/software/OpenFOAM/2.1.1-ictce-4.0.6/OpenFOAM-2.1.1/src/finiteVolume/lnInclude -I/gpfs/eb/software/OpenFOAM/2.1.1-ictce-4.0.6/OpenFOAM-2.1.1/src/sampling/lnInclude  -I/gpfs/eb/software/OpenFOAM/2.1.1-ictce-4.0.6/OpenFOAM-2.1.1/src/triSurface/lnInclude -I/gpfs/eb/software/OpenFOAM/2.1.1-ictce-4.0.6/OpenFOAM-2.1.1/src/surfMesh/lnInclude -I/gpfs/eb/software/OpenFOAM/2.1.1-ictce-4.0.6/OpenFOAM-2.1.1/src/lagrangian/basic/lnInclude -I/gpfs/eb/software/OpenFOAM/2.1.1-ictce-4.0.6/OpenFOAM-2.1.1/src/meshTools/lnInclude -IlnInclude -I. -I/gpfs/eb/software/OpenFOAM/2.1.1-ictce-4.0.6/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/gpfs/eb/software/OpenFOAM/2.1.1-ictce-4.0.6/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64IccDPOpt/printSwakVersion.o
/bin/sh: -Dlinux64: command not found

Most probably CC is empty and when expanding it leaves it blank.

Is there something I can do here?

Regards,
Nicolas

At first: for the sake of your sanity I'd recommend always using the same compiler to compile swak as the one that compiled OF

Compiler and options are determined by the appropriate sub-directory in wmake/rules whose name is taken from the environment variables WM_ARCH, WM_ARCH_OPTION and WM_COMPILER. To override any of these either edit etc/bashrc or set them in a files ~/OpenFOAM/site/2.2.x/prefs.sh. Something like
Code:

export WM_COMPILER=Icc
should use the ready-made settings for the Intel-compiler

With some architectures the compiler can be overruled by setting WM_CC and WM_CXX but only do this if you know what you're doing (see first sentence)

nik May 13, 2013 09:05

Dear Bernhard,

thank you very much for your reply. The problem was with the environmental variables set for the compiler options of OpenFOAM in wmake/rules. Now swak4Foam is installing. Thanks again.

Regards,
Nicolas


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