AndreWeiner / ml-cfd-lecture

Lecture material for machine learning applied to computational fluid mechanics
GNU General Public License v3.0
330 stars 116 forks source link

Error running pimplefoam #6

Closed Akashdl closed 3 years ago

Akashdl commented 3 years ago

./Allrun.singularity Running blockMesh on .../ml-cfd-lecture/exercises/cylinder2D with image ../../of2106.sif Running setExprBoundaryFields on .../ml-cfd-lecture/exercises/cylinder2D with image ../../of2106.sif Running decomposePar on .../ml-cfd-lecture/exercises/cylinder2D with image ../../of2106.sif Error getting 'numberOfSubdomains' from 'system/decomposeParDict' Running renumberMesh (1 processes) on .../ml-cfd-lecture/exercises/cylinder2D with image ../../of2106.sif Error getting 'numberOfSubdomains' from 'system/decomposeParDict'

I get this error message in log.blockMesh, log.decomposePar and log.setExprBoundaryFields

--> FOAM FATAL ERROR: (openfoam-2106)
cannot find file "/home/akash/system/controlDict"

    From virtual Foam::autoPtr<Foam::ISstream> Foam::fileOperations::uncollatedFileOperation::readStream(Foam::regIOobject&, const Foam::fileName&, const Foam::word&, bool) const
    in file global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C at line 542.

FOAM exiting
AndreWeiner commented 3 years ago

Dear @Akashdl, thanks for reporting this issue. What environment are you using, WSL or a native installation? From the error messages, it appears like the Allrun.singularity script is not executed in the right folder. The output should look something like this:

Running blockMesh on /home/akash/ml-cfd-lecture/exercises/cylinder2D with image ../../of2106.sif

Best, Andre

Akashdl commented 3 years ago

I am using native Ubuntu 20.04. I am running the script Allrun.singularity from

akash@akash:/media/akash/Data/Akash_D_L/TU_Braunschweig/3_Sem/Machine-learning-in-computational-fluid-dynamics/ml-cfd-lecture/exercises/cylinder2D$ ./Allrun.singularity

and the message in terminal is Running blockMesh on /media/akash/Data/Akash_D_L/TU_Braunschweig/3_Sem/Machine-learning-in-computational-fluid-dynamics/ml-cfd-lecture/exercises/cylinder2D with image ../../of2106.sif Running setExprBoundaryFields on /media/akash/Data/Akash_D_L/TU_Braunschweig/3_Sem/Machine-learning-in-computational-fluid-dynamics/ml-cfd-lecture/exercises/cylinder2D with image ../../of2106.sif Running decomposePar on /media/akash/Data/Akash_D_L/TU_Braunschweig/3_Sem/Machine-learning-in-computational-fluid-dynamics/ml-cfd-lecture/exercises/cylinder2D with image ../../of2106.sif Error getting 'numberOfSubdomains' from 'system/decomposeParDict'

and the error message in the log files are the same

Best, Akash

AndreWeiner commented 3 years ago

I see. The issue is probably related to mounting the external hard drive into the container. Does it work if you move the ml-cfd-lecture folder to your home directory?

Akashdl commented 3 years ago

I made a fresh clone in home directory and setup requirements as said in exercise-1 . Error getting 'numberOfSubdomains' from 'system/decomposeParDict' Still it has errors I am attaching the log files blockMesh.log decomposePar.log pimpleFoam.log renumberMesh.log setExprBoundaryFields.log .

AndreWeiner commented 3 years ago

Ok, the mounting issue seems to be gone. The second issue is was related to the function to fetch the number of processors. I corrected the function, so running git pull and then trying the instructions again should make it work. Best, Andre