Hello,
what is the correct way to use the CFD extension for salome meca 2022 with singularity on debian11 ?
thank you!
singularity Salome_Meca CFD extension install
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 4168
- Joined: Mon Feb 20, 2012 3:25 pm
Re: singularity Salome_Meca CFD extension install
Hello,
I am no familiar with salome_meca 2022. From discussions with code_aster developpers and you post, I understand it is built using Singularity ?
Depending on whether the Singularity container includes all the tools needed for configuration, compilation and build (see code_saturne install guide for prerequisites and recommended packages), you may be able to simply follow the regular build procedure from the container or need a more advanced setup procedure.
This is not something we have tried/tested so far (the work on code_saturne/code_saturne coupling has been tested on cluster install, native at least on the code_saturne side).
Other people who have more knowledge concerning the salome_meca container are welcome to contribute to this thread...
Best regards,
Yvan
I am no familiar with salome_meca 2022. From discussions with code_aster developpers and you post, I understand it is built using Singularity ?
Depending on whether the Singularity container includes all the tools needed for configuration, compilation and build (see code_saturne install guide for prerequisites and recommended packages), you may be able to simply follow the regular build procedure from the container or need a more advanced setup procedure.
This is not something we have tried/tested so far (the work on code_saturne/code_saturne coupling has been tested on cluster install, native at least on the code_saturne side).
Other people who have more knowledge concerning the salome_meca container are welcome to contribute to this thread...
Best regards,
Yvan
Re: singularity Salome_Meca CFD extension install
Hello! This is an old issue, but I think that I can add my little contribution
I've trying to couple Aster + saturne at salome platform for so many years... and now I am still trying, but I feel that I am closer than ever
What I have done up to now:
1. Installing salome + aster + saturne from sources:
Installing salome + saturne doesn't give much trouble (I have done it in the past). The real problem is aster, I have tried to compile but given up at what I considered a death end:
https://forum.code-aster.org/public/d/2 ... on-manjaro
2. Installing salome-meca (singularity) + saturne (from sources):
I think this is the less painful approach. Singularity can be installed according to the instructions in aster web, although it is out-of-date:
https://code-aster.org/spip.php?article303
Then the recipe I have followed is:
Line 29 at file "/opt/salome_meca/2023.1.0_scibian_univ/prerequisites/Cea_archive-9100/extra.env.d/120_s_cfd_study.py" is:
and if I comment it, it works but without cfd_extension. What is wrong with this code?
Unluckily I can't try "salome_cfd", as it seems to be an out-dated command, not used any more. What can I do now? Any clue will be welcome!
P.S: Some data about my system:
Linux: manjaro
kernel: 6.6.54-2-MANJARO
salome: salome_meca-lgpl-2023.1.0-4-20240327-scibian-10.sif
saturne: 8.2.0
I've trying to couple Aster + saturne at salome platform for so many years... and now I am still trying, but I feel that I am closer than ever
What I have done up to now:
1. Installing salome + aster + saturne from sources:
Installing salome + saturne doesn't give much trouble (I have done it in the past). The real problem is aster, I have tried to compile but given up at what I considered a death end:
https://forum.code-aster.org/public/d/2 ... on-manjaro
2. Installing salome-meca (singularity) + saturne (from sources):
I think this is the less painful approach. Singularity can be installed according to the instructions in aster web, although it is out-of-date:
https://code-aster.org/spip.php?article303
Then the recipe I have followed is:
- "unzip" the singularity container in a sandbox, so that you can browse the filesystem, and get into its shell:
Code: Select all
singularity build --sandbox sandbox/ salome_meca-lgpl-2023.1.0-4-20240327-scibian-10.sif singularity shell salome_meca-lgpl-2023.1.0-4-20240327-scibian-10.sif
- "sandbox" is now a folder in your filesystem, you need to chroot it as if it was the root filesystem:
Code: Select all
cd sandbox/ chroot . /bin/sh
- In my system, if I chroot, internet doesn't work in the shell, so I had to do:
Code: Select all
echo "nameserver 8.8.8.8" > /etc/resolv.conf
- Install saturne pre-requisites (note: it doesn't matter the system you are using, the singularity is built in scibian, a fork of debian, so you have to use apt as package manager):
Code: Select all
apt install pyqt5-dev-tools
- Install code saturne with the following setup file:
Code: Select all
prefix /opt/salome_meca/2023.1.0_scibian_univ/tools/ salome /opt/salome_meca/2023.1.0_scibian_univ/prerequisites/Cea_archive-9100/ hdf5 yes no /opt/salome_meca/2023.1.0_scibian_univ/prerequisites/Cea_archive-9100/BINARIES-DB10/hdf5 cgns yes no /opt/salome_meca/2023.1.0_scibian_univ/prerequisites/Cea_archive-9100/BINARIES-DB10/cgns med yes no /opt/salome_meca/2023.1.0_scibian_univ/prerequisites/Cea_archive-9100/BINARIES-DB10/medfile
- Install salome_cfd_extensions pre-requisites
Code: Select all
apt install libomniorb4-dev qttools5-dev-tools
- Install salome_cfd_extensions. I would like to detail this step, because (spoiler) although it installs without error it doesn't work:
Code: Select all
cd opt/salome_meca/2023.1.0_scibian_univ/tools/ mkdir cfdstudy_src && cd cfdstudy_src git clone https://github.com/code-saturne/salome_cfd_extensions salome_cfd_extensions/sbin/bootstrap mkdir build && cd build ../salome_cfd_extensions/configure --prefix=/opt/salome_meca/2023.1.0_scibian_univ/tools/salome_cfd_extensions --with-salome=/opt/salome_meca/2023.1.0_scibian_univ/prerequisites/Cea_archive-9100/ CS_ROOT_DIR=/opt/salome_meca/2023.1.0_scibian_univ/tools/code_saturne-8.2.0 --with-env-id=120 OMNIIDL=/opt/salome_meca/2023.1.0_scibian_univ/prerequisites/Cea_archive-9100/BINARIES-DB10/omniORB/bin/omniidl make && make install
- Last step would be "zip" again the singularity container, not done yet because it doesn't work.
Code: Select all
Traceback (most recent call last):
File "/opt/salome_meca/2023.1.0_scibian_univ/prerequisites/Cea_archive-9100/mesa_salome", line 1073, in <module>
main(args)
File "/opt/salome_meca/2023.1.0_scibian_univ/prerequisites/Cea_archive-9100/mesa_salome", line 1042, in main
module.init(context, out_dir_Path)
File "/opt/salome_meca/2023.1.0_scibian_univ/prerequisites/Cea_archive-9100/extra.env.d/120_s_cfd_study.py", line 29, in init
context.appendVariable(r"SalomeAppConfig", os.path.join(s_cfd_study_ROOT_INSTALL_DIR, r"share/salome/resources/cfdstudy"))
AttributeError: 'SalomeContext' object has no attribute 'appendVariable'
Code: Select all
context.appendVariable(r"SalomeAppConfig", os.path.join(s_cfd_study_ROOT_INSTALL_DIR, r"share/salome/resources/cfdstudy"))
Unluckily I can't try "salome_cfd", as it seems to be an out-dated command, not used any more. What can I do now? Any clue will be welcome!
P.S: Some data about my system:
Linux: manjaro
kernel: 6.6.54-2-MANJARO
salome: salome_meca-lgpl-2023.1.0-4-20240327-scibian-10.sif
saturne: 8.2.0
-
- Posts: 4168
- Joined: Mon Feb 20, 2012 3:25 pm
Re: singularity Salome_Meca CFD extension install
Hello,
Thanks for the feedback.
Regarding coupling between code_saturne and code_aster, the old coupling based on Salome's YACS module has been broken since 2019 I believe (I last tested it with salome_meca 2017), and its architecture was a dead end (defined more for project constraints which are not relevant anymore).
The coupling was rewritten about a year ago using saner technical choices, based on MEDCoupling, but had not been tested in recent months, and required some code_aster changes developements which had not been merged. A colleague has been working on it again recently, so hopefully we should finally have a robust, industrial coupling in code_saturne 9.0 (to be released June 2025), with matching updates for the 2025 code_aster release.
Best regards,
Yvan
Thanks for the feedback.
Regarding coupling between code_saturne and code_aster, the old coupling based on Salome's YACS module has been broken since 2019 I believe (I last tested it with salome_meca 2017), and its architecture was a dead end (defined more for project constraints which are not relevant anymore).
The coupling was rewritten about a year ago using saner technical choices, based on MEDCoupling, but had not been tested in recent months, and required some code_aster changes developements which had not been merged. A colleague has been working on it again recently, so hopefully we should finally have a robust, industrial coupling in code_saturne 9.0 (to be released June 2025), with matching updates for the 2025 code_aster release.
Best regards,
Yvan
Re: singularity Salome_Meca CFD extension install
ok, I thought there was a problem with a path or something else, because the installation was successful... It's a pity, I felt it so close. Anyway, I can't wait for the next version
[SOLVED] singularity Salome_Meca CFD extension install
Finally I got it!!!!
After some weeks fighting with the issue, I let it go... and found the solution looking for something else, as usually happens:
As the error said, attribute "appendVariable" doesn't exist (it doesn't for salome_meca, although it does for salome stand-alone, which gave me the clue). So, the solution is comment line 29 of file "/opt/salome_meca/2023.1.0_scibian_univ/prerequisites/Cea_archive-9100/extra.env.d/120_s_cfd_study.py" and add:
So, step 8 of list above is:
Happy simulations!
After some weeks fighting with the issue, I let it go... and found the solution looking for something else, as usually happens:
As the error said, attribute "appendVariable" doesn't exist (it doesn't for salome_meca, although it does for salome stand-alone, which gave me the clue). So, the solution is comment line 29 of file "/opt/salome_meca/2023.1.0_scibian_univ/prerequisites/Cea_archive-9100/extra.env.d/120_s_cfd_study.py" and add:
Code: Select all
context.addToVariable(r"SalomeAppConfig", os.path.join(s_cfd_study_ROOT_INSTALL_DIR, r"share/salome/resources/cfdstudy"), separator=":")
Code: Select all
cd /opt/salome_meca/2023.1.0-4
singularity build salome_meca-lgpl-2023.1.0-4-20240327-scibian-10.sif sandbox/