Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in running example.ABL.flatTerrain.neutral #39

Closed
yulins opened this issue Feb 28, 2019 · 14 comments
Closed

error in running example.ABL.flatTerrain.neutral #39

yulins opened this issue Feb 28, 2019 · 14 comments

Comments

@yulins
Copy link

yulins commented Feb 28, 2019

Hello guys

I am trying to run the "example.ABL.flatTerrain.neutral" case as a starting point to learn SOWFA. The environment is Ubuntu 16.04 + OpenFOAM 2.4.x. I managed to produce the mesh with ./runscript.preprocess, but when excuting ./runscript.solve.1, it fails and the error messages come out in "log.1.ABLSolver" and "log.1.setFieldsABL"

As indicated in the log file, I didn't find anything called processor0. Am I missing some step?
I tried to search for the answer but no success. Any help is appreciated. Thanks.

Kind regards
Yulin

/*---------------------------------------------------------------------------*\
Abort is in progress...hit ctrl-c again within 5 seconds to forcibly terminate

| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.4.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.4.x-2b147f41daf9
Exec   : ABLSolver -parallel
Date   : Feb 27 2019
Time   : 23:08:40
Host   : "ubuntu"
PID    : 18858
Case   : /home/yulin/OpenFOAM/SOWFA-2.4.x/exampleCases/example.ABL.flatTerrain.neutral
nProcs : 4
Slaves : 
3
(
"ubuntu.18859"
"ubuntu.18860"
"ubuntu.18861"
)

Pstream initialized with:
    floatTransfer      : 0
    nProcsSimpleSum    : 0
    commsType          : nonBlocking
    polling iterations : 0
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
[0] 
[0] 
[0] --> FOAM FATAL ERROR: 
[0] ABLSolver: cannot open case directory "/home/yulin/OpenFOAM/SOWFA-2.4.x/exampleCases/example.ABL.flatTerrain.neutral/processor0"
[0] 
[0] 
FOAM parallel run exiting
[0] 
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD 
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
@ewquon
Copy link
Collaborator

ewquon commented Feb 28, 2019 via email

@yulins
Copy link
Author

yulins commented Mar 1, 2019

Many thanks @ewquon for your swift response, and you are absolutely right. The decomposePar didn't run correctly, as I changed the default 216 cores in the setup file into 4 (i.e. my personal computer), so the decomOrder didn't agree with that. So, I made it back to 216 cores and the decomposePar can now produce correct partitions (there are processor0-processor216 in the folder). Now the only modification that I made in the setup file are 'Number of cells' intending for a more coarse mesh.

/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.4.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/

// Domain size and number of cells.
xMin                 0.0;                         // Minimum x-extent of domain (m).
yMin                 0.0;                         // Minimum y-extent of domain (m).
zMin                 0.0;                         // Minimum z-extent of domain (m).
xMax                 3000.0;                      // Maximum x-extent of domain (m).
yMax                 3000.0;                      // Maximum y-extent of domain (m).
zMax                 1020.0;                      // Maximum z-extent of domain (m).
nx                   30;                         // Number of cells in x-direction.
ny                   30;                         // Number of cells in y-direction.
nz                   10;                         // Number of cells in z-direction.




// Number of cores and domain decomposition information.
nCores               216;                         // Number of cores on which to run this case.
decompType           simple;                      // Decomposition algorithm.  "simple" and "scotch" are good choices.
decompOrder          (6 6 6);                   // Order of the decomposition number of partitions in (x y z)-directions.




// Planar averaging and source term statistics options.
statisticsOn         true;                        // Gather planar-averaged flow statistics.
statisticsFrequency  5;                           // Frequency in time steps of statistics gathering.


However, I still can't make the solver work, and it seems from the command line that the solver doesn't start at all. Is it becasue I set the wrong core value?

$ sudo ./runscript.solve.1 
Purging and loading modules...
Nothing to unset...
Sourcing /home/yulin/OpenFOAM/OpenFOAM-2.4.x/etc/bashrc...
Purging and loading modules...
     *Unsetting OpenFOAM environment variables...
Sourcing /home/yulin/OpenFOAM/OpenFOAM-2.4.x/etc/bashrc...
cp: cannot stat 'system/controlDict.1': No such file or directory
Starting OpenFOAM job at:  Thu Feb 28 18:19:31 PST 2019
using  600  cores
Ending OpenFOAM job at:  Thu Feb 28 18:19:31 PST 2019

Thanks again.

@ewquon
Copy link
Collaborator

ewquon commented Mar 1, 2019

Looks like your runscript.solve.1 has something wrong in there. You probably still have cores=600 set; this should be the same as nCores in your setUp file.

The cp error is suspicious. This should be run from inside your case directory, i.e., the directory that contains your setUp file as well as the system, constant, and processor* subdirectories.

@yulins
Copy link
Author

yulins commented Mar 2, 2019

Thanks again @ewquon for following this. Yes you are right, the cp error is a trouble, as the cd $PBS_O_WORKDIR didn't find the correct path in the 'runscript.slove.1' file. Another thing I figure out is that we should never use 'sudo' in compling SOWFA and its cases, as this will lead to many command permission troubles. Now it seems the ABLsolver is working, and I looking forward to see the results with paraView. Many thanks for your help.

@SH-Liao
Copy link

SH-Liao commented Mar 4, 2019

hello @yulins ,I'm facing the familiar problem.I just can't fine out where exactlly $PBS_O_WORKDIR leads .would you mind to tell me where it leads? when running 'runscript.slove.1',it apears to "cp system/contrilDirt.1 :no such file or directry".please help

@yulins
Copy link
Author

yulins commented Mar 4, 2019

Hi @ShenghaiLiao Just simply comment this out with #cd $PBS_O_WORKDIR, and open terminal in the example case, it will find the path.

@SH-Liao
Copy link

SH-Liao commented Mar 4, 2019

hlleo @yulins ,thanks for your answer.I tried cd $PBS_O_WORKDIR ,but it simply returned to my home directry,when #echo $PBS_O_WORKDIR it comes out with nothing
by the way ,my foam is at $HOME/OpenFOAM/OpenFOAM-2.4.0,
and SOWFA is at $HOME/OpenFOAM/$USR-2.4.0

@yulins
Copy link
Author

yulins commented Mar 4, 2019

Hi, I mean just comment it or delete it. The runscript.solve.1 should be excuted in the examplecase folder, such as' example.ABL.flatTerrain.neutral', than it will find 'system/controlDict.1'

@ewquon
Copy link
Collaborator

ewquon commented Mar 14, 2019

$PBS_O_WORKDIR is an environment variable from the Moab/Torque high-performance computing (HPC) environment. If you're directly running this script or using another HPC environment, then you should comment/delete that line as the previous commenter suggested.

@ewquon ewquon closed this as completed Mar 14, 2019
@Cookiewyf
Copy link

Hi ,everyone. I was trying to run example.ABL.flatTerrain.neutral. I modified runscript.preprocess:
image
image
and in the runscript.solve.1, I changed "source" and "cores":
image
In the setUp, I just modified ncores and decompOrde
image
Then I fellowed the step,./runscript.preprocess next ./runscript.solve.1
But it failed:

[3] --> FOAM FATAL IO ERROR:
[3] Unknown patchField type velocityABLWallFunction for patch type wall
....
...
[3]
[3]
[3] file: /home/ubuntu18/SOWFA/SOWFA_RUN/example.ABL.flatTerrain.neutral/processor3/0/U.boundaryField.lower from line 28 to line 31.
[3]
[3] From function fvPatchField::New(const fvPatch&, const DimensionedField<Type, volMesh>&, const dictionary&)
[3] in file /home/ubuntu18/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvPatchFieldNew.C at line 143.
[3]
FOAM parallel run exiting
I felt confused cause I didnot changed anything about "U"
another question is these warning can be fixed?
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

--> FOAM Warning :
From function dlOpen(const fileName&, const bool)
in file POSIX.C at line 1179
dlopen error : libSOWFAfiniteVolume.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 99
could not load "libSOWFAfiniteVolume.so"
--> FOAM Warning :
From function dlOpen(const fileName&, const bool)
in file POSIX.C at line 1179
dlopen error : libSOWFAincompressibleLESModels.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 99
could not load "libSOWFAincompressibleLESModels.so"
Create mesh for time = 0
setFieldsABL.md
ABLSolverlog.md
@ewquon @yulins @SH-Liao @pablo-benito
Thanks for your help!

@pablo-benito
Copy link
Contributor

libSOWFAfiniteVolume.so: cannot open shared object file: No such file or directory libSOWFAincompressibleLESModels.so: cannot open shared object file: No such file or directory

Where are those libraries in your computer? OpenFoam needs to know the locations of those libraries..
If, assuming that those libraries are located inside a folder like this ${HOME}/SOWFA/applications/lib/${WM_OPTIONS}, then you must add this path to LD_LIBRARY_PATH env variable, before you launch your OpenFoam commands, like this:

export LD_LIBRARY_PATH=${SOWFA_DIR}/lib/${WM_OPTIONS}/:${LD_LIBRARY_PATH}

@Cookiewyf
Copy link

libSOWFAfiniteVolume.so: cannot open shared object file: No such file or directory libSOWFAincompressibleLESModels.so: cannot open shared object file: No such file or directory

Where are those libraries in your computer? OpenFoam needs to know the locations of those libraries.. If, assuming that those libraries are located inside a folder like this ${HOME}/SOWFA/applications/lib/${WM_OPTIONS}, then you must add this path to LD_LIBRARY_PATH env variable, before you launch your OpenFoam commands, like this:

export LD_LIBRARY_PATH=${SOWFA_DIR}/lib/${WM_OPTIONS}/:${LD_LIBRARY_PATH}

is that right?

ubuntu18@Ubuntu18:~/SOWFA/SOWFA_RUN/example.ABL.flatTerrain.stable$ export SOWFA_DIR="${HOME}/SOWFA" ubuntu18@Ubuntu18:~/SOWFA/SOWFA_RUN/example.ABL.flatTerrain.stable$ export LD_LIBRARY_PATH=${SOWFA_DIR}/lib/${WM_OPTIONS}/:${LD_LIBRARY_PATH} ubuntu18@Ubuntu18:~/SOWFA/SOWFA_RUN/example.ABL.flatTerrain.stable$ source ${HOME}/OpenFOAM/OpenFOAM-2.4.0/etc/bashrc ubuntu18@Ubuntu18:~/SOWFA/SOWFA_RUN/example.ABL.flatTerrain.stable$ ./runscript.preprocess ./runscript.preprocess: line 82: of240: command not found -Renumbering the mesh with renumberMesh... -Decomposing the domain with decomposePar... -Checking the mesh with checkMesh...
I still have this warning, and the location is exactly right as you said.

Besides that, do you have any suggesstion about my error.
Thanks for your help!

@pablo-benito
Copy link
Contributor

But, you still have the error about not finding the libraries? If that's true, please check that the path that you plug into the LD_LIBRARY_PATH is the correct one.. Check that those libraries are actually there..

Also, you can safely remove the command 'of240' of those scripts. They are intended to load the correct openfoam inside NREL facilities. It's just to load the OpenFoam environment, exactly as the command source ${HOME}/OpenFOAM/OpenFoam-2.4.0/etc/bashrc

@hy1112006
Copy link

hy1112006 commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants