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

[OpenFOAM.org] Error running #codeStream/functions wmake lnInclude fails to open *.H Files

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 6 Post By wyldckat
  • 1 Post By tarik

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 24, 2015, 15:56
Default Error running #codeStream/functions wmake lnInclude fails to open *.H Files
  #1
New Member
 
Tarik Ghattas
Join Date: Dec 2015
Location: Brazil, SP
Posts: 3
Rep Power: 10
tarik is on a distinguished road
Hello!
This is my first post on the forum and it's a pleasure to meet you all.

Currently i'm running OpenFoam 3.0.1 built with gcc 5.3 flex 2.5.35 on an Arch system (Linux 4.2.5-1ARCH x86_64). When i tried to run the $FOAM_RUN/tutorials/basic/potentialFoam/cylinder case i came across two problems. First was i was getting an error when running blockMesh due to the #codeStream code in the blockMeshDict file (could not open file dictionary.H etc... fatal error dictionary.H no such file or directory). I changed that file writing the vertices mannually to get rid of that code portion. But then when running
Code:
potentialFoam -withFunctionObjects -writePhi -writep
(as written in the Allrun script) I get pretty much the same error, i.e. Could not open files stringList.H, pointField.H, fvCFD.H, etc. Here's the output:

Code:
[tarik@arch cylinder]$ potentialFoam -withFunctionObjects -writePhi -writep
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 3.0.0-6abec57f5449
Exec   : potentialFoam -withFunctionObjects -writePhi -writep
Date   : Dec 24 2015
Time   : 15:07:06
Host   : "arch"
PID    : 18856
Case   : /home/tarik/OpenFOAM/tarik-3.0.0/run/tutorials/basic/potentialFoam/cylinder
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

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

Create mesh for time = 0


potentialFlow: Operating solver in PISO mode

Reading velocity field U

Constructing pressure field p

Constructing velocity potential field Phi

No MRF models present

No finite volume options present


Calculating potential flow
Using dynamicCode for functionObject difference at line 53 in "/home/tarik/OpenFOAM/tarik-3.0.0/run/tutorials/basic/potentialFoam/cylinder/system/controlDict.functions.difference"
Creating new library in "dynamicCode/error/platforms/linux64GccDPInt32Opt/lib/liberror_e92448da6ae10bc777e0869670f72a48fd0673f1.so"
Invoking "wmake -s libso /home/tarik/OpenFOAM/tarik-3.0.0/run/tutorials/basic/potentialFoam/cylinder/dynamicCode/error"
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file FilterFunctionObjectTemplate.C
could not open file stringList.H for source file FilterFunctionObjectTemplate.C due to No such file or directory
could not open file pointField.H for source file FilterFunctionObjectTemplate.C due to No such file or directory
could not open file OutputFilterFunctionObject.H for source file FilterFunctionObjectTemplate.C due to No such file or directory
Making dependency list for source file functionObjectTemplate.C
could not open file stringList.H for source file functionObjectTemplate.C due to No such file or directory
could not open file pointField.H for source file functionObjectTemplate.C due to No such file or directory
could not open file Time.H for source file functionObjectTemplate.C due to No such file or directory
could not open file fvCFD.H for source file functionObjectTemplate.C due to No such file or directory
could not open file unitConversion.H for source file functionObjectTemplate.C due to No such file or directory
In file included from functionObjectTemplate.C:26:0:
functionObjectTemplate.H:36:24: fatal error: stringList.H: No such file or directory
compilation terminated.
/opt/OpenFOAM/OpenFOAM-3.0.0/wmake/rules/General/transform:8: recipe for target 'Make/linux64GccDPInt32Opt/functionObjectTemplate.o' failed
make: *** [Make/linux64GccDPInt32Opt/functionObjectTemplate.o] Error 1


--> FOAM FATAL IO ERROR: 
Failed wmake "dynamicCode/error/platforms/linux64GccDPInt32Opt/lib/liberror_e92448da6ae10bc777e0869670f72a48fd0673f1.so"


file: /home/tarik/OpenFOAM/tarik-3.0.0/run/tutorials/basic/potentialFoam/cylinder/system/controlDict.functions.difference from line 53 to line 58.

    From function codedBase::createLibrary(..)
    in file db/dynamicLibrary/codedBase/codedBase.C at line 213.

FOAM exiting
Tried using flex 2.6 which fails to build and 2.5.39 which does work but doesn't solve the problem, so i kept 2.5.35. Followed a similar error on a thread here which recommended changing $WM_PROJECT_DIR/wmake/rules/general/sourceToDep from wmkdep to wmkdepend, but unfortunately my installation doesn't have sourceToDep nor wmkdepend files. Also couldn't find it on the git page so i'm assuming their absence is not the real problem. Running as root didn't work either (it fails to open libfiniteVolume.so, but i don't think i was supposed to run as root anyway). I don't have a clue of what to try. Has anyone had some similar troubles or may have any idea i might give a try?

Last edited by tarik; December 26, 2015 at 23:17.
tarik is offline   Reply With Quote

Old   December 25, 2015, 14:46
Default
  #2
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 Tarik and welcome to the forum!

Something isn't right... either you have two conflicting versions of OpenFOAM installed, where 3.0.0 is possibly not completely installed, or you meant to write that you had installed OpenFOAM 3.0.0 and not 3.0.1.

Because according to the output you've provided from the solver, all sings point to OpenFOAM 3.0.0. The problem is that the "lnInclude" folders don't seem to be populated. I don't know how exactly you installed OpenFOAM in your machine, but I would suggest that you switch into installation mode and run the following commands:
Code:
cd $WM_PROJECT_DIR
wmakeLnIncludeAll
Then you should be able to use the "#codeStream" feature.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   December 26, 2015, 23:15
Default
  #3
New Member
 
Tarik Ghattas
Join Date: Dec 2015
Location: Brazil, SP
Posts: 3
Rep Power: 10
tarik is on a distinguished road
That worked perfectly. Tested in 3 different cases and everything is working! Thanks!!

Edit: Forgot to mention I also checked my openfoam version. It is indeed ver 3.0.0. But my package manager says 3.0.0-2 which I kind of read wrong.
wyldckat likes this.

Last edited by tarik; December 26, 2015 at 23:23. Reason: Extra info
tarik is offline   Reply With Quote

Old   December 12, 2016, 00:12
Unhappy buoyantPimpleFoam fails with -withFunctionObjects
  #4
Member
 
a
Join Date: Oct 2014
Posts: 49
Rep Power: 11
cfd@kgp is on a distinguished road
I am trying to create a new field "mag(U)" using coded function and compute_ptot using swak4foam. here is extract from controlDict addded to the "hotRoom" turorial for buoyantPimpleFoam,

Quote:
functions
{
compute_ptot
{
functionObjectLibs ( "libutilityFunctionObjects.so" );
type coded;
// enabled true;
redirectType ptot;
outputControl outputTime;
// outputInterval 1;
code
#{

const volVectorField& U = mesh().lookupObject<volVectorField>("U");
volScalarField mymagu
(
IOobject
(
"mymagu",
mesh().time().timeName(),
U.mesh(),
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mag(U)
);
mymagu.write();

#};
}

compute_ptot
{
type expressionField;
outputControl outputTime;
outputInterval 1;
fieldName ptot;
expression "(mag(U))";
autowrite true;
}
};
with following libraries

Quote:
libs (


"libsimpleSwakFunctionObjects.so"


"libswakFunctionObjects.so"


);
In both the method I can see the output files of the variables "mymagu" and "compute_ptot", but they are not readable in paraview.
Quote:


Quote:
buoyantPimpleFoam -withFunctionObjects
produces following error,

Quote:


Usage: buoyantPimpleFoam [OPTIONS]
options:
-case <dir> specify alternate case directory, default is the cwd
-noFunctionObjects
do not execute functionObjects
-parallel run in parallel
-roots <(dir1 .. dirN)>
slave root directories for distributed running
-srcDoc display source code in browser
-doc display application documentation in browser
-help print the usage

Using: OpenFOAM-3.0.1 (see www.OpenFOAM.org)
Build: 3.0.1-18e358711b4e



--> FOAM FATAL ERROR:
Invalid option: -withFunctionObjects


FOAM exiting
Is this a bug in openfoam or I am making some mistake?

Please help

Thanks and regards.
cfd@kgp is offline   Reply With Quote

Old   December 13, 2016, 09:58
Default
  #5
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
Quick answer: I see that you reported this as a bug: https://bugs.openfoam.org/view.php?id=2385 - and it's not a bug.
The original post here refers to potentialFoam, not buoyantPimpleFoam. This means that you don't need to use any additional option like potentialFoam did.
wyldckat is offline   Reply With Quote

Old   November 7, 2019, 10:05
Default
  #6
Senior Member
 
Ali Shayegh
Join Date: Oct 2015
Posts: 130
Rep Power: 10
amuzeshi is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings Tarik and welcome to the forum!

Something isn't right... either you have two conflicting versions of OpenFOAM installed, where 3.0.0 is possibly not completely installed, or you meant to write that you had installed OpenFOAM 3.0.0 and not 3.0.1.

Because according to the output you've provided from the solver, all sings point to OpenFOAM 3.0.0. The problem is that the "lnInclude" folders don't seem to be populated. I don't know how exactly you installed OpenFOAM in your machine, but I would suggest that you switch into installation mode and run the following commands:
Code:
cd $WM_PROJECT_DIR
wmakeLnIncludeAll
Then you should be able to use the "#codeStream" feature.

Best regards,
Bruno
Dear Bruno,
I am writing to ask a question about this tutorial on codeStream.
After executing icoFoam, I received an error, the main part of which is
Code:
fatal error: fvCFD.H: No such file or directory
The whole output is in the following. I examined it under of6 and of7 unsuccessfully.
I would appreciate if you could help solving this problem.

Best Regards,
Ali

Code for codeStream:
Code:
    velocity-inlet-5
    {
        type            fixedValue;
        value           #codeStream
        {
            codeInclude
            #{
                #include "fvCFD.H"
            #};

            codeOptions
            #{
                -I$(LIB_SRC)/finiteVolume/lnInclude \
                -I$(LIB_SRC)/meshTools/lnInclude
            #};

    	    //libs needed to visualize BC in paraview
    	    codeLibs
    	    #{
        	-lmeshTools \
        	-lfiniteVolume
    	    #};
...
icoFoam output:
Code:
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  7
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 7-109ba3c8d53a
Exec   : icoFoam
Date   : Nov 07 2019
Time   : 18:27:09
Host   : "soha"
PID    : 27707
I/O    : uncollated
Case   : /home/ali/OpenFOAM/ali-7/run/3weeks/11/programming1/2Delbow_UparabolicInlet
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

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

Create mesh for time = 0

Reading transportProperties

Reading field p

Reading field U

Using #codeStream at line 33 in file "/home/ali/OpenFOAM/ali-7/run/3weeks/11/programming1/2Delbow_UparabolicInlet/0/U.boundaryField.velocity-inlet-5"
Using #codeStream with "/home/ali/OpenFOAM/ali-7/run/3weeks/11/programming1/2Delbow_UparabolicInlet/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_8e7d2492166cb8f6513bf377941d8d0987def757.so"
Invoking "wmake -s libso /home/ali/OpenFOAM/ali-7/run/3weeks/11/programming1/2Delbow_UparabolicInlet/dynamicCode/_8e7d2492166cb8f6513bf377941d8d0987def757"
wmake libso /home/ali/OpenFOAM/ali-7/run/3weeks/11/programming1/2Delbow_UparabolicInlet/dynamicCode/_8e7d2492166cb8f6513bf377941d8d0987def757
    Ctoo: codeStreamTemplate.C
/home/ali/OpenFOAM/ali-7/run/3weeks/11/programming1/2Delbow_UparabolicInlet/0/U.boundaryField.velocity-inlet-5.#codeStream:37:11: fatal error: fvCFD.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPInt32Opt/codeStreamTemplate.o] Error 1
/opt/openfoam7/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Opt/codeStreamTemplate.o' failed


--> FOAM FATAL IO ERROR: 
Failed wmake "dynamicCode/_8e7d2492166cb8f6513bf377941d8d0987def757/platforms/linux64GccDPInt32Opt/lib/libcodeStream_8e7d2492166cb8f6513bf377941d8d0987def757.so"


file: /home/ali/OpenFOAM/ali-7/run/3weeks/11/programming1/2Delbow_UparabolicInlet/0/U.boundaryField.velocity-inlet-5 from line 32 to line 32.

    From function static void (* Foam::functionEntries::codeStream::getFunction(const Foam::dictionary&, const Foam::dictionary&))(Foam::Ostream&, const Foam::dictionary&)
    in file db/dictionary/functionEntries/codeStream/codeStream.C at line 218.

FOAM exiting
amuzeshi is offline   Reply With Quote

Old   February 21, 2020, 12:19
Default
  #7
New Member
 
Ravi Teja Paineni
Join Date: Jun 2017
Posts: 3
Rep Power: 8
rigid42 is on a distinguished road
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : _f3950763fe-20191219 OPENFOAM=1912
Arch : "LSB;label=32;scalar=64"
Exec : blockMesh
Date : Feb 21 2020
Time : 18:13:17
Host : DESKTOP-G42P1AL
PID : 4074
I/O : uncollated
Case : /home/raviteja/OpenFOAM/OpenFOAM-v1912/run/cylinder
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

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

Creating block mesh from "system/blockMeshDict"
Using #codeStream at line 19 in file "/home/raviteja/OpenFOAM/OpenFOAM-v1912/run/cylinder/system/blockMeshDict"
Using #codeStream with "/home/raviteja/OpenFOAM/OpenFOAM-v1912/run/cylinder/dynamicCode/platforms/linux64Gcc63DPInt32Opt/lib/libcodeStream_6edbd5c787a632d4d115e6ab6424ed259ef3 77d6.so"
Could not load "/home/raviteja/OpenFOAM/OpenFOAM-v1912/run/cylinder/dynamicCode/platforms/linux64Gcc63DPInt32Opt/lib/libcodeStream_6edbd5c787a632d4d115e6ab6424ed259ef3 77d6.so"
/home/raviteja/OpenFOAM/OpenFOAM-v1912/run/cylinder/dynamicCode/platforms/linux64Gcc63DPInt32Opt/lib/libcodeStream_6edbd5c787a632d4d115e6ab6424ed259ef3 77d6.so: cannot open shared object file: No such file or directory
Invoking wmake libso /home/raviteja/OpenFOAM/OpenFOAM-v1912/run/cylinder/dynamicCode/_6edbd5c787a632d4d115e6ab6424ed259ef377d6
wmake libso /home/raviteja/OpenFOAM/OpenFOAM-v1912/run/cylinder/dynamicCode/_6edbd5c787a632d4d115e6ab6424ed259ef377d6
Ctoo: codeStreamTemplate.C
In file included from /home/raviteja/OpenFOAM/ThirdParty-v1912/platforms/linux64/gcc-6.3.0/include/c++/6.3.0/x86_64-pc-linux-gnu/bits/c++config.h:507:0,
from /home/raviteja/OpenFOAM/ThirdParty-v1912/platforms/linux64/gcc-6.3.0/include/c++/6.3.0/type_traits:38,
from /home/raviteja/OpenFOAM/OpenFOAM-v1912/src/OpenFOAM/lnInclude/dictionary.H:91,
from codeStreamTemplate.C:31:
/home/raviteja/OpenFOAM/ThirdParty-v1912/platforms/linux64/gcc-6.3.0/include/c++/6.3.0/x86_64-pc-linux-gnu/bits/os_defines.h:39:22: fatal error: features.h: No such file or directory
#include <features.h>
^
compilation terminated.
/home/raviteja/OpenFOAM/OpenFOAM-v1912/wmake/rules/General/transform:34: recipe for target '/home/raviteja/OpenFOAM/OpenFOAM-v1912/build/linux64Gcc63DPInt32Opt/run/cylinder/dynamicCode/_6edbd5c787a632d4d115e6ab6424ed259ef377d6/codeStreamTemplate.o' failed
make: *** [/home/raviteja/OpenFOAM/OpenFOAM-v1912/build/linux64Gcc63DPInt32Opt/run/cylinder/dynamicCode/_6edbd5c787a632d4d115e6ab6424ed259ef377d6/codeStreamTemplate.o] Error 1


--> FOAM FATAL IO ERROR:
Failed wmake "dynamicCode/_6edbd5c787a632d4d115e6ab6424ed259ef377d6/platforms/linux64Gcc63DPInt32Opt/lib/libcodeStream_6edbd5c787a632d4d115e6ab6424ed259ef3 77d6.so"


file: /home/raviteja/OpenFOAM/OpenFOAM-v1912/run/cylinder/system/blockMeshDict

From function static void (* Foam::functionEntries::codeStream::getFunction(con st Foam::dictionary&, const Foam::dictionary&))(Foam::Ostream&, const Foam::dictionary&)
in file db/dictionary/functionEntries/codeStream/codeStream.C at line 202.

FOAM exiting


Hie Bruno, I have tried the code you posted but i wasn't able to shake off the error. can you please guide me out it.
thanks & regards
ravi
rigid42 is offline   Reply With Quote

Old   June 13, 2020, 22:31
Default
  #8
New Member
 
Pranav Uchiha
Join Date: Jul 2019
Posts: 2
Rep Power: 0
pranavbahldce@gmail.com is on a distinguished road
Did you find the answer ? Please let me know I am encountering a similar problem
pranavbahldce@gmail.com is offline   Reply With Quote

Old   June 14, 2020, 03:12
Default
  #9
Senior Member
 
Ali Shayegh
Join Date: Oct 2015
Posts: 130
Rep Power: 10
amuzeshi is on a distinguished road
Quote:
Originally Posted by pranavbahldce@gmail.com View Post
Did you find the answer ? Please let me know I am encountering a similar problem
Are you refering to my question?
amuzeshi is offline   Reply With Quote

Reply

Tags
error lninclude functions


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
Problems in compiling paraview in Suse 10.3 platform chiven OpenFOAM Installation 3 December 1, 2009 07:21
OpenFOAM15 paraFoam bug koen OpenFOAM Bugs 19 June 30, 2009 10:46
OpenFOAM15 installables are incomplete problem with paraFoam tryingof OpenFOAM Bugs 17 December 7, 2008 04:41
Results saving in CFD hawk Main CFD Forum 16 July 21, 2005 20:51
[making animations] fclose fails to close files? Mika FLUENT 0 March 30, 2001 08:19


All times are GMT -4. The time now is 10:36.