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

[OpenFOAM.org] UPstream.H: No such file or directory (but exists)

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 15, 2020, 16:19
Default UPstream.H: No such file or directory (but exists)
  #1
Member
 
Join Date: Mar 2016
Posts: 33
Rep Power: 7
mahmoodn is on a distinguished road
Hi
On Centos-7 with GCC-4.8.5 and OpenFoam-7, I get this error for missing UPstream.H file while everything look normal and I have sourced etc/bashrc file.


Code:
[marzieh@hpc ~]$ source ~/OpenFOAM-7/etc/bashrc
[marzieh@hpc ~]$ env | grep WM
WM_LINK_LANGUAGE=c++
WM_ARCH=linux64
WM_COMPILER_TYPE=system
WM_OSTYPE=POSIX
WM_THIRD_PARTY_DIR=/home/marzieh/ThirdParty-7
WM_CXXFLAGS=-m64 -fPIC -std=c++0x
WM_CFLAGS=-m64 -fPIC
WM_PROJECT_VERSION=7
WM_COMPILER_LIB_ARCH=64
WM_PROJECT_INST_DIR=/home/marzieh
WM_CXX=g++
WM_PROJECT_DIR=/home/marzieh/OpenFOAM-7
WM_LABEL_OPTION=Int32
WM_PROJECT=OpenFOAM
WM_LDFLAGS=-m64
WM_COMPILER=Gcc
WM_MPLIB=SYSTEMOPENMPI
WM_CC=gcc
WM_COMPILE_OPTION=Opt
WM_DIR=/home/marzieh/OpenFOAM-7/wmake
WM_LABEL_SIZE=32
WM_PROJECT_USER_DIR=/home/marzieh/OpenFOAM/marzieh-7
WM_OPTIONS=linux64GccDPInt32Opt
WM_PRECISION_OPTION=DP
WM_ARCH_OPTION=64
[marzieh@hpc ~]$ cd OpenFOAM-7/
[marzieh@hpc OpenFOAM-7]$ ./Allwmake
Allwmake /home/marzieh/OpenFOAM-7
make: Nothing to be done for `all'.

========================================
Start ThirdParty Allwmake
========================================

========================================
Build MPI libraries if required

========================================
Build Scotch decomposition library scotch_6.0.6
    /home/marzieh/ThirdParty-7/platforms/linux64GccDPInt32/scotch_6.0.6
    scotch header in /home/marzieh/ThirdParty-7/platforms/linux64GccDPInt32/scotch_6.0.6/include
    scotch libs   in /home/marzieh/ThirdParty-7/platforms/linux64GccDPInt32/lib

========================================
Build PTScotch decomposition library scotch_6.0.6 (uses MPI)
    /home/marzieh/ThirdParty-7/platforms/linux64GccDPInt32/scotch_6.0.6

    ptscotch header in /home/marzieh/ThirdParty-7/platforms/linux64GccDPInt32/scotch_6.0.6/include/openmpi-system
    ptscotch libs   in /home/marzieh/ThirdParty-7/platforms/linux64GccDPInt32/lib/openmpi-system

========================================
Build Metis decomposition
    optional component Metis was not found

========================================
Done ThirdParty Allwmake
========================================

Allwmake src
version changed from previous build
removing .o files corresponding to OpenFOAM/global/global.o ...
Allwmake src/Pstream
wmake dummy
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3  -DNoRepository -ftemplate-depth-100   -IlnInclude -I. -I/home/marzieh/OpenFOAM-7/src/OpenFOAM/lnInclude -I/home/marzieh/OpenFOAM-7/src/OSspecific/POSIX/lnInclude   -fPIC -c UPstream.C -o /home/marzieh/OpenFOAM-7/platforms/linux64GccDPInt32Opt/src/Pstream/dummy/UPstream.o
UPstream.C:26:22: fatal error: UPstream.H: No such file or directory
 #include "UPstream.H"
                      ^
compilation terminated.
make: *** [/home/marzieh/OpenFOAM-7/platforms/linux64GccDPInt32Opt/src/Pstream/dummy/UPstream.o] Error 1
and


Code:
[marzieh@hpc OpenFOAM-7]$ find . -name UPstream.H
./src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H
Any idea to fix that?
mahmoodn is offline   Reply With Quote

Old   October 10, 2020, 10:55
Default
  #2
New Member
 
Ace Ventura
Join Date: Nov 2017
Posts: 2
Rep Power: 0
kingdomkarl is on a distinguished road
Hey,
have you ever managed to remedy this issue ?
Im facing it now as well ...
kingdomkarl is offline   Reply With Quote

Old   October 11, 2020, 06:51
Default
  #3
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,171
Rep Power: 29
olesen will become famous soon enougholesen will become famous soon enough
Quote:
Originally Posted by kingdomkarl View Post
Hey,
have you ever managed to remedy this issue ?
Im facing it now as well ...
Since OpenFOAM compromises many source files in many different directories and subdirectories, it would be tedious and error-prone to have all of them listed as include directories. To get around this, when any OpenFOAM library is compiled, the first step is to create an "lnInclude" directory with soft-links to all of the headers. If these are missing, or have incorrect links, you will get the type of error that you are seeing.
I am not sure where you got your package (built it yourself, downloaded somewhere,..) but you will need to recreate these directories.
Try something like this :
Code:
cd src/
wmakeLnIncludeAll -update
olesen is offline   Reply With Quote

Old   October 11, 2020, 06:56
Default
  #4
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,171
Rep Power: 29
olesen will become famous soon enougholesen will become famous soon enough
Quote:
Originally Posted by kingdomkarl View Post
Hey,
have you ever managed to remedy this issue ?
Im facing it now as well ...
BTW if you are using CentOS, you could also give the precompiled packages a try.
https://develop.openfoam.com/Develop...ompiled/redhat

In this case the '-devel' subpackage would contain the sources and the corresponding lnInclude directories
olesen is offline   Reply With Quote

Old   January 15, 2021, 04:22
Default Thanks
  #5
New Member
 
Jinguo Sun
Join Date: Jan 2017
Posts: 5
Rep Power: 6
sunjg13 is on a distinguished road
Quote:
Originally Posted by olesen View Post
Since OpenFOAM compromises many source files in many different directories and subdirectories, it would be tedious and error-prone to have all of them listed as include directories. To get around this, when any OpenFOAM library is compiled, the first step is to create an "lnInclude" directory with soft-links to all of the headers. If these are missing, or have incorrect links, you will get the type of error that you are seeing.
I am not sure where you got your package (built it yourself, downloaded somewhere,..) but you will need to recreate these directories.
Try something like this :
Code:
cd src/
wmakeLnIncludeAll -update
It works well!!! The code "wmakeLnIncludeAll -update" solves the problem about "Upstream.h not found"
sunjg13 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
how to calculate mass flow rate on patches and summation of that during the run? immortality OpenFOAM Post-Processing 104 February 16, 2021 08:46
[swak4Foam] swak4foam for OpenFOAM 4.0 mnikku OpenFOAM Community Contributions 77 May 7, 2020 04:22
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation 225 August 25, 2015 19:43
Trouble compiling utilities using source-built OpenFOAM Artur OpenFOAM Programming & Development 14 October 29, 2013 10:59
Problem installing on Ubuntu 9.10 -> 'Cannot open : No such file or directory' mfiandor OpenFOAM Installation 2 January 25, 2010 09:50


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