Excercise #2+3: Not able to run ./Allrun.singularity
lanrikhenge opened this issue · comments
Hello everyone,
Executing the command ./Allrun.singularity
does not work, even tho all explanations of the available materials have been obeyed.
I am working on a separate Linux operating system. The system set-up was done according to Exercise 1. As explained in that notebook I set up an OpenFOAM-PyTorch container named of2206-py1.12.1-cpu.sif
.
As explained in the notebook Exercise 2+3 an OpenFOAM-Container ../../of2106.sif
is expected, when running the command ./Allrun.singularity
. However, this container has not been initiated up to this point.
Trying to run the code without any changes leads to the following Erro massage:
(ml-cfd) henrik@henrik-ThinkPad-P1-Gen-2:~/Documents/master_aerospace/ml-cfd-lecture/exercises/cylinder2D$ ./Allrun.singularity Could not find Singularity image ../../of2106.sif Could not find Singularity image ../../of2106.sif Could not find Singularity image ../../of2106.sif FATAL: could not open image /home/henrik/Documents/master_aerospace/ml-cfd-lecture/of2106.sif: failed to retrieve path for /home/henrik/Documents/master_aerospace/ml-cfd-lecture/of2106.sif: lstat /home/henrik/Documents/master_aerospace/ml-cfd-lecture/of2106.sif: no such file or directory Error getting 'numberOfSubdomains' from 'system/decomposeParDict' Could not find Singularity image ../../of2106.sif FATAL: could not open image /home/henrik/Documents/master_aerospace/ml-cfd-lecture/of2106.sif: failed to retrieve path for /home/henrik/Documents/master_aerospace/ml-cfd-lecture/of2106.sif: lstat /home/henrik/Documents/master_aerospace/ml-cfd-lecture/of2106.sif: no such file or directory Error getting 'numberOfSubdomains' from 'system/decomposeParDict' Could not find Singularity image ../../of2106.sif
My first idea was to rename the existing container to the required name:
of2206-py1.12.1-cpu.sif
-> of2106.sif
This time another error message is created:
(ml-cfd) henrik@henrik-ThinkPad-P1-Gen-2:~/Documents/master_aerospace/ml-cfd-lecture/exercises/cylinder2D$ ./Allrun.singularity Running blockMesh on /home/henrik/Documents/master_aerospace/ml-cfd-lecture/exercises/cylinder2D with image ../../of2106.sif Running setExprBoundaryFields on /home/henrik/Documents/master_aerospace/ml-cfd-lecture/exercises/cylinder2D with image ../../of2106.sif Running decomposePar on /home/henrik/Documents/master_aerospace/ml-cfd-lecture/exercises/cylinder2D with image ../../of2106.sif INFO: underlay of /etc/localtime required more than 50 (88) bind mounts /usr/bin/bash: line 1: /usr/lib/openfoam/openfoam2106/etc/bashrc: No such file or directory Error getting 'numberOfSubdomains' from 'system/decomposeParDict' Running renumberMesh (1 processes) on /home/henrik/Documents/master_aerospace/ml-cfd-lecture/exercises/cylinder2D with image ../../of2106.sif INFO: underlay of /etc/localtime required more than 50 (88) bind mounts /usr/bin/bash: line 1: /usr/lib/openfoam/openfoam2106/etc/bashrc: No such file or directory Error getting 'numberOfSubdomains' from 'system/decomposeParDict' Running pimpleFoam (1 processes) on /home/henrik/Documents/master_aerospace/ml-cfd-lecture/exercises/cylinder2D with image ../../of2106.sif
I would be happy if some can help me solving this issue.
Thank you,
Henrik
Hi @lanrikhenge,
As far as I know @AndreWeiner is currently updating this exercise. However, for now you can just adjust the path in the functions file as follows:
- at the top-level of the ml-cfd-lecture directory there should be a file called functions
- replace the first line image=... with the current openfoam image (of2206-py1.12.1-cpu.sif)
- in the second line (bashrc=... ), replace the openfoam version with the current version openfoam2206, so the file looks like:
If the error is still present, please let me know. Just FYI, for running this simulation it is not necessary to activate the virtual environment since no python code is used.
Regards, Janis
Hi @JanisGeise,
Thank you for your help. Now the code is running successfully. Furthermore, thank you for the advice regarding the usage of python.
@AndreWeiner in case the exercise is actually being updated at the moment, perhaps it would be possible to add some kind of remark to the notebook so that it is clear if an exercise is good to go or not.
Best regards, Henrik
Hi @lanrikhenge,
thanks for reporting the issues encountered with the exercise. Unfortunately, I did not finish my revision on time - my apologies. As you can see in the two commits above, exercises 2 and 3 are now revised. Please have a look at the updated version:
# get the latest version of all files; run from the top-level folder
git pull
I also followed your advice to add a note of missing completion to the upcoming exercise notebooks.
@JanisGeise, could you please have a look at the revised version and report any additional issues in this thread?
Thanks again to both of you for the input!
Best, Andre
Hi @AndreWeiner,
everything worked fine, I didn't encounter any issues with the exercise notebook. However, I have two suggestions:
- maybe add a note that the basilisk simulation can be done on more than 2 MPI ranks, depending on the available hardware
- a note to exit the Apptainer container after the simulation is done, otherwise paraview command is not found
some minor typos:
- required instead of requires (sentence over
source setup-env
in part 1 of exercise) - a missing \n before question 5.4 in openfoam section
- captial letters for Tip: (after question marks)
- missing s in folders (in question 10 of openfoam section)
Regards Janis
Awesome, thanks for the hints!
I'll close this issue for now, but feel free to re-open it in case the fix does not work for you @lanrikhenge.
Best, Andre