Hello,
what is the correct way to use the CFD extension for salome meca 2022 with singularity on debian11 ?
thank you!
Hello,
what is the correct way to use the CFD extension for salome meca 2022 with singularity on debian11 ?
thank you!
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
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:
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:
Then the recipe I have followed is:
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
cd sandbox/
chroot . /bin/sh
echo "nameserver 8.8.8.8" > /etc/resolv.conf
apt install pyqt5-dev-tools
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
apt install libomniorb4-dev qttools5-dev-tools
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
So, it compiles but when I launch salome (from within the container and shell), it outputs:
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'
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:
context.appendVariable(r"SalomeAppConfig", os.path.join(s_cfd_study_ROOT_INSTALL_DIR, r"share/salome/resources/cfdstudy"))
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
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
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 ![]()
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:
context.addToVariable(r"SalomeAppConfig", os.path.join(s_cfd_study_ROOT_INSTALL_DIR, r"share/salome/resources/cfdstudy"), separator=":")
So, step 8 of list above is:
cd /opt/salome_meca/2023.1.0-4
singularity build salome_meca-lgpl-2023.1.0-4-20240327-scibian-10.sif sandbox/
Happy simulations!