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

New OpenFOAM solver in Singularity container

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 20, 2020, 02:01
Default New OpenFOAM solver in Singularity container
  #1
Senior Member
 
mohammad
Join Date: Sep 2015
Posts: 274
Rep Power: 11
mostanad is on a distinguished road
Hi everybody,
I am working on a cluster in which OpenFOAM has been installed. This installation hass been done via singularity container. As you know, singularity container is created by a recipe, and the final result(.sif file) has just a read mode. So now I want to compile my modified solver on this container. The problem is that I have not the related recipe so I should generate my sandbox directory by:
singularity build --sandbox my_sbox cfdem.sif
so after adding the solver, and unfotunately with no compilation, I rebuilt the new sif. file based on the modified sandbox directory:
singularity build --sandbox cfdem2.sif my_sbox/
However, as you know this is just adding a solver into the directories not adding it in a executable form. So what is your opinion for my problem? How I can compile a new solver on my container just the same as the way Im doing on my laptop (ubuntu)?
Every help in this regard is appreciated.
M
mostanad is offline   Reply With Quote

Old   June 30, 2020, 17:14
Default
  #2
Member
 
James
Join Date: Jan 2014
Posts: 38
Rep Power: 12
Madeinspace is on a distinguished road
Hi mostanad,


Were you able to fix this issue? I am currently on the verge of installing OpenFOAM on a singularity container and still struggling with it. But if I can't compile my own solver using singularity container then there is simply no point in doing it. What you have reported, is this an usual issue with the container?



Do you have a documentation or weblinks to install OF in cluster usign singularity container. I would really appereciate if you could share it.


Best regards,
Madeinspace is offline   Reply With Quote

Old   July 1, 2020, 03:25
Default
  #3
Senior Member
 
mohammad
Join Date: Sep 2015
Posts: 274
Rep Power: 11
mostanad is on a distinguished road
Quote:
Originally Posted by Madeinspace View Post
Hi mostanad,


Were you able to fix this issue? I am currently on the verge of installing OpenFOAM on a singularity container and still struggling with it. But if I can't compile my own solver using singularity container then there is simply no point in doing it. What you have reported, is this an usual issue with the container?



Do you have a documentation or weblinks to install OF in cluster usign singularity container. I would really appereciate if you could share it.


Best regards,

Hi James,
Yes. Finally, I became able to modify my container based on my developed solver. If you have your singularity container in which OpenFOAM has been installed you should work with sandbox and try to open it as a writable mode. In the below, you can find the procedure for this. However, I should note that you should have the container with original OpenFOAM source codes within it:
singularity build --sandbox my_sbox YourSifFile.sif (a folder with name: my_sbox is generated)

sudo singularity shell --writable my_sbox (making change in folder would be possible by this line, be careful to do this step in root)

copy your developed solver or make change in the existing source codes
source bashrc (which can be elsewhere in your container and you should give the address)
compile you source code or your solver as you did it before in your ubuntu system

ctrl+d (to exit)
singularity build OpenFoam_modified.sif my_sbox
By the last line, your modified singularity image file (i.e., sif) would be generated.

Last edited by mostanad; July 2, 2020 at 19:34.
mostanad is offline   Reply With Quote

Old   October 6, 2020, 15:45
Default solvers not compiled from sandbox
  #4
ves
Member
 
Veskov Eugene
Join Date: Feb 2011
Posts: 31
Rep Power: 15
ves is on a distinguished road
[bes@localhost ~]$ cd OPENFOAM_8_SINGULARITY
[bes@localhost OPENFOAM_8_SINGULARITY]$ singularity shell --writable my_sbox
Singularity my_sbox:~/OPENFOAM_8_SINGULARITY> source /opt/openfoam8/etc/bashrc
Singularity my_sbox:~/OPENFOAM_8_SINGULARITY> echo $FOAM_RUN
/home/bes/run
Singularity my_sbox:~/OPENFOAM_8_SINGULARITY> cd $FOAM_RUN
Singularity my_sbox:~/run> cd OpenFOAM-8 #folder with first custom solver (varRhoTurbVOF_2)
Singularity my_sbox:~/run/OpenFOAM-8> bash ./Allwmake
./Allwmake: line 66: cd: ../turbulenceDamping: No such file or directory
wmakeLnIncludeAll error: file 'Make/options' does not exist
wmake: 'Make' directory does not exist in /home/bes/run/OpenFOAM-8
Searching up directories tree for Make directory
wmake error: could not find Make directory
Singularity my_sbox:~/run/OpenFOAM-8> bash ./Allwclean
./Allwclean: line 64: cd: ../turbulenceDamping: No such file or directory
wclean: 'Make' directory does not exist in /home/bes/run/OpenFOAM-8
Searching up directories tree for Make directory
wclean error: could not find Make directory
Singularity my_sbox:~/run/OpenFOAM-8> cd ../
Singularity my_sbox:~/run> cd spillwayFlowUr #folder with second custom solver
Singularity my_sbox:~/run/spillwayFlowUr> bash ./Allwmake
Making dependency list for spillwayFlow.C could not open file fvCFD.H for source file spillwayFlow.C due to No such file or directory

Wat's wrong?
ves is offline   Reply With Quote

Reply


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
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 10 September 2, 2021 05:29
OpenFOAM webinar: A multidimensional parallel numerical solver of ADM1 model for anae Gavin OpenFOAM Announcements from Other Sources 0 July 12, 2018 10:30
OpenFOAM Training Jan-Apr 2017, Virtual, London, Houston, Berlin cfd.direct OpenFOAM Announcements from Other Sources 0 September 21, 2016 11:50
[OpenFOAM.org] A Mac OS X of23x Development Environment Using Docker rt08 OpenFOAM Installation 1 February 28, 2016 19:00
OpenCL linear solver for OpenFoam 1.7 (alpha) will come out very soon qinmaple OpenFOAM Announcements from Other Sources 4 August 10, 2012 11:00


All times are GMT -4. The time now is 23:56.