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

Excercise #2+3: ./Allrun error #22

Closed wonskc closed 1 year ago

wonskc commented 1 year ago

Hi again,

yesterday I solved my problem with setup-env. Now I confront another issue to run ./Allrun. When I run it, I got an error message.

Running blockMesh on /home/user/ml-cfd-lecture/exercises/cylinder2D
Running setExprBoundaryFields on /home/user/ml-cfd-lecture/exercises/cylinder2D
Running decomposePar on /home/user/ml-cfd-lecture/exercises/cylinder2D
Error getting 'numberOfSubdomains' from 'system/decomposeParDict'
Running renumberMesh (1 processes) on /home/user/ml-cfd-lecture/exercises/cylinder2D 
Error getting 'application' from system/controlDict
Error getting 'numberOfSubdomains' from 'system/decomposeParDict'
Running false (1 processes) on /home/user/ml-cfd-lecture/exercises/cylinder2D

I cloned again the repository on my home folder with git clone https://github.com/AndreWeiner/ml-cfd-lecture.git and followed Excercise 2+3 from beginning, it shows still same error message.

Hope it can be solved well this time.

Kinds, Wonseok

JanisGeise commented 1 year ago

Hi @wonskc,

Have you build the openfoam container (of2206-py1.12.1-cpu.sif) in the top-level of the repository? The console output should display something like

Running blockMesh on /home/.../cylinder2D with image /home/.../ml-cfd-lecture/of2206-py1.12.1-cpu.sif

indicating that the simulation is using the container.

Regards, Janis

AndreWeiner commented 1 year ago

Hi @wonskc, creating a fresh copy of the simulation case from test_cases in your exercise folder might solve the problem. Best, Andre

wonskc commented 1 year ago

@JanisGeise
Yes, I have checked that the command apptainer shell of2206-py1.12.1-cpu.sif works well.

@AndreWeiner I did it already several times, but still shows same error.

Maybe I will bring this issue for tomorrow class.

Best, Wonseok

JanisGeise commented 1 year ago

Hi @wonskc,

Did you execute the ./Allrun from inside the openfoam container? If that is the case, it will throw an error. For executing the ./Allrun script you don't need to be inside the container (it's not necessary to execute the command apptainer shell of2206-py1.12.1-cpu.sif), just make sure the container is located in the top-level of the repository. For executing the simulation

  1. execute the source setup-env command (also from the top-level of the repository)
  2. execute cd exercises/cylinder2D/
  3. execute ./Allrun

Regards Janis

wonskc commented 1 year ago

@JanisGeise

I solved this issue as running sudo apptainer build of2206-py1.12.1-cpu.sif docker://andreweiner/of_pytorch:of2206-py1.12.1-cpu. Thank you so much for your support.

Best, Wonseok