Page 1 of 3
saturne 2.2 coupled with syrthes 3.4
Posted: Tue May 08, 2012 11:58 am
by Pisolino
Hi all,
in ubuntu 12.04 i've just succeed in compiling saturne using --with-syrthes=usr/lib/syrthes , where syrthes 3.4 was installed from synaptic.
This is what i get:
Configuration options:
use debugging code: no
use malloc hooks: no
use graphical user interface: yes
use long integers: no
Zlib (gzipped file) support: yes
MPI (Message Passing Interface) support: yes
MPI I/O support: yes
MPI2 one-sided communication support: yes
OpenMP support: no
BLAS (Basic Linear Algebra Subprograms) support: yes
Libxml2 (XML Reader) support: yes
ParMETIS (Parallel Graph Partitioning) support: yes
PT-SCOTCH (Parallel Graph Partitioning) support: yes
ADF support: no
CCM support: no
HDF (Hierarchical Data Format) support: yes
CGNS (CFD General Notation System) support: yes
MED (Model for Exchange of Data) support: yes
MED MPI I/O support: no
MEDCoupling support: no
SALOME GUI support: yes
SALOME Kernel support: no
Dynamic loader support (for YACS): yes
SYRTHES 3 coupling support: yes
Warning: CGNS version used is 2.5, which is deprecated.
in future versions, CGNS >= 3.1 will be required.
The package has been configured. Type:
make
make install
Installing it's ok but now... is there any tutorial on how run a simple coupled case? thanks in advance
Andrea
Re: saturne 2.2 coupled with syrthes 3.4
Posted: Tue May 08, 2012 1:41 pm
by Yvan Fournier
Hello,
Im am afraid there is no tutorial yet (at least on this web site).
Are you new to SYRTHES, or only to coupling ? If you have not used SYRTHES yet, I would really recommend using SYRTHES 4 instead of 3.4. SYRTHES 4.0.1 has been released recently, so it is not packaged under Debian or Ubuntu yet, but it is much moe modern than SYRTHES 3.4, has a GUI, and may run in parallel (incuding coupling with Code_Saturne).
Also, SYRTHES 3.4 uses meshes with 10-node tetrahedra, while SYRTHES 4 uses meshes with 4-node tetrahedra, so switching from one to the other requires at least modifying/re-saving your meshes.
SYRTHES 4 also has a tutorial in its documentation directory, so starting directly with SYRTHES 4 is thus better.
In any case, for a coupled case, you need to add a --syrthes=<syrthes_case_name> to the options of "code_saturne create" when creating a new case. This will create 2 case directories, one for the Code_Saturne domain, one for the SYRTHES domain (each with their standard hierarchy), as well as a "runcase_coupling" file and a RESULTS_COUPLING directory.
Initially, both domains may be setup independently, preprocessed, and possibly tested without coupling (with adiabatic boundary conditions for example). When ready for the full calculation, you need to edit both the Code_Saturne and the SYRTHES data (using the appropriate GUI is simples) to tell each code with which other domain it is coupled, and which part of its boundary is coupled (use the "conjugate heat transfer tab in the Code_Saturne GUI; for SYRTHES, I do not remember, but it is easy to find).
When all is setup, run the "runcase_coupling" from the toplevel directory instead of <case>SCRIPTS/runcase, and you have a coupled calculation.
Note also that multiple couplings are possible (for example, 2 Code_Saturne domains and 1 SYRTHES domain for a heat exchanger with 2 different fluids on each side).
Best regards,
Yvan
Re: saturne 2.2 coupled with syrthes 3.4
Posted: Tue May 08, 2012 4:23 pm
by Pisolino
really thx !
i will try it, just one question, all that you said works only with 4.0 or also with 3.4? i'm not so able with linux and i'm afraid to mess up something linking to syrthes the same libraries of saturne installation this is why i compiled with syrthes3.4 from repositories.
Re: saturne 2.2 coupled with syrthes 3.4
Posted: Tue May 08, 2012 5:03 pm
by Yvan Fournier
Hello,
Syrthes only installs libraries in its own subdirectories (or links to preinstalled libraries), so there is no risk. Just take your time editing your setup.ini file for Syrthes.
Just in case, here is my own setup.ini for Syrthes, on my own Ubuntu 12.04 system. Compared to the reference setup.ini, I used Ubuntu packages where possible, making the install lighter and faster. You would need to edit the user name, and also the path for the PLE (or Code_Saturne, which includes PLE) install for your own system. Note that in my case, I had alreay built SCOTCH and METIS, so I pointed to those. The SYTHES installer may also build them, and you may install SCOTCH from a Ubuntu package (you do not need both SCOTCH and METIS, and need one only if running SYRTHES in parallel).
One very important thing I forgot to mention :
use the same MPI library for Code_Saturne and SYRTHES, so that coupling will work (i.e. use either OpenMPI or MPICH2, but do not mix them, or mix different versions of MPICH2). Basically, if you have already installed Code_Saturne, use the sae MPI library for SYRTHES. If you installed Code_Saturne without MPI, you need to re-install it with MPI, as it is used for coupling.
Also, SYRTHES requires you to source a .syrthes.profile file once it is installed. This is not a problem, and is required even for "code_saturne create --case=Fluid --syrthes=Solid" to work (due to the SYRTHES part), but I recommend not sourcing during Code_Saturne installation (if you rebuild Code_Saturne for example), unless you want to use SYRTHES's copy of Qt4 instead of the system-installed one.
Also, note that for SYRTHES 4, there is no --with-syrthes option for configure, but you need to edit <code_saturne_prefix>/etc/code_saturne.cfg, or your own $HOME/.code_saturne.cfd, as mentioned at the end of the installation manual.
Finally, SYRTHES 3.4 support has been removed from the developpement trunk a few weeks ago, so Code_Saturne 2.3, which should be released early July, will only allow coupling with SYRTHES 4.
Best regards,
Yvan
Re: saturne 2.2 coupled with syrthes 3.4
Posted: Wed May 09, 2012 12:04 pm
by Martin Isack
Parallel simulations with SYRTHES 4.0.1 wont run under Ubuntu 12.04. The syrthes installer doesn’t find the the appropriate scotch libraries as they are split into different folders for different integer sizes. Furthermore syrthes-post, which is needed to join the results after a parallel simulation, doesn’t compile properly and will not run.
These issues can be fixed and if you really need to run parallel simulations I may try to explain how to fix them.
Re: saturne 2.2 coupled with syrthes 3.4
Posted: Wed May 09, 2012 2:06 pm
by Pisolino
i only would like to start coupling fluid with solid, when i'll succeed i may ask you how to fix this problem. Since i have compiled saturne with syrthes 3.4 in a directory, should i compile again saturne with syrthes 4.0 in another directory?
thanks a lot
Re: saturne 2.2 coupled with syrthes 3.4
Posted: Wed May 09, 2012 3:24 pm
by Pisolino
Test number 1 (2.2 +s3.4 as mentioned before)
when running i get :
ltmm1@ltmm1:~/studio3$ ./runcase_coupling
Coupling execution between:
o Code_Saturne [1 domain(s)];
o SYRTHES [1 domain(s)];
Traceback (most recent call last):
File "./runcase_coupling", line 146, in <module>
save_results=True)
File "/usr/local/lib/python2.7/dist-packages/code_saturne/cs_case.py", line 1642, in run
mpi_environment)
File "/usr/local/lib/python2.7/dist-packages/code_saturne/cs_case.py", line 1198, in prepare_data
n_procs_default)
File "/usr/local/lib/python2.7/dist-packages/code_saturne/cs_exec_environment.py", line 1206, in __init__
self.mpi_env = mpi_environment(pkg, self.resources, wdir)
File "/usr/local/lib/python2.7/dist-packages/code_saturne/cs_exec_environment.py", line 643, in __init__
init_method(p, resource_info, wdir)
File "/usr/local/lib/python2.7/dist-packages/code_saturne/cs_exec_environment.py", line 907, in __init_openmpi__
launcher_base = os.path.basename(self.mpiexec)
File "/usr/lib/python2.7/posixpath.py", line 112, in basename
i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'
(in the meanwhile i'm trying to compile on another pc sat2.2&syr4)
Re: saturne 2.2 coupled with syrthes 3.4
Posted: Wed May 09, 2012 3:50 pm
by Yvan Fournier
Hello,
I have already encountered a similar issue, and this is probably related to the installation (we can try improving configuration tests to avoid this, or detect it at compile time).
To solve it, installing the mpi-default-bin package on Ubuntu should help (it basically adds a link to the mpiexec command in /usr/lib/openmpi to /usr/bin), if it dos not mix things up between OpenMPI and MPICH2 when both are installed.
If this is not enough, when configuring Code_Saturne, you can add --with-mpi-exec=<prefix to path where mpiexec or mpiexec.openmpi is found> to the "configure" command, and reinstall the code.
Best regards,
Yvan
Re: saturne 2.2 coupled with syrthes 3.4
Posted: Thu May 10, 2012 8:53 am
by Martin Isack
Hello,
Yvan, you used
/usr as mpi PATH in your setup.ini. In Ubuntu 12.04 mpi.h is located in /usr/lib/openmpi/include/ and the syrthes installer doesn’t find it. This effects the convert tools only, which need MED. I had to use
/usr/lib/openmpi as mpi PATH to be able to compile everything.
A similar problem occurs with the Debian scotch libraries. They are located under
/usr/include/scotch-[int length]. But it is not possible to just change the scotch PATH in syrthes.ini. I had to change the library paths for scotch in config_makeFileIN.py in lines 318 and 319 as follows:
Code: Select all
makefileinFile.write("LIBSCOTCH=$(DIR_SCOTCH)/lib/libscotch.a $(DIR_SCOTCH)/lib/scotch-int64/libscotcherr.a\n")
makefileinFile.write("INC_SCOTCH=-I$(DIR_SCOTCH)/include/scotch-int64\n")
syrthes-post has to be compiled with the debug option “-g”. Otherwise it wont work under 12.04. This is a fix, Isabelle has told me:
- go to the directory [after installation]: syrthes4.0.1/src/syrthes-post/src
- build syrthes-post (with debug option -g) : gcc -g -I../include -o syrthes-post *.c
- and move the syrthes-post file : mv syrthes-post syrthes4.0.1/arch/YOUR_ARCH/bin/.
In my opinion such problems would occur less, if the SYRTHES team switched to the GNU build system, wouldn’t they? Actually, how many developers are involved in the SYRTHES developement?
Regards,
Martin
Re: saturne 2.2 coupled with syrthes 3.4
Posted: Thu May 10, 2012 11:52 am
by Yvan Fournier
Hello Martin,
Yes, things would probably simpler if SYRTHES also used the Autotools, but the development team is small (2 people, who work only a fraction of their time on the code, + occasional subcontracting for the GUI and tools).
Regarding /usr as a path for MPI in setup.ini, this should work if you have the mpi-default-dev package includes (which adds the necessary symbolic links). I had mentioned mpi-default-bin on some thread of this forum (amybe this one), but forget to add mpi-default-dev...
Thanks for all the other details, which may be helpful to others (as I had mentioned, I installed SYRTHES on my own Ubuntu 12.04 machine, but I used versions of METIS and SCOTCH that I had already installed for Code_Saturne, so I did not test the whole install script).
Best regards,
Yvan