keeping 2 versions of saturne

All questions about installation
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Christine Leroy

keeping 2 versions of saturne

Post by Christine Leroy »

Hello everyone,
 
I have a short question : is it possible to install the last version of Saturne (version 2.1.4) , keeping the previous one (2.0.4) or is there a risk of conflict?
in that case, how should I uninstall the previous one in a clean way so as to be sure there won't be some "pieces" left that will do conflict?
 
thanks in advance
 
Christine
Jacques Fontaine

Re: keeping 2 versions of saturne

Post by Jacques Fontaine »

Hello Christine,
Yes, it is possible to install 2.1.x and 2.0.x and there is no risk
of conflict if you force with --prefix your install directory.
More details are given in the installation guide; the main steps are:
(I assume you have already install the 2.0 version)
Create for example a "Code_Saturne-2.1" directory
Copy the Code_Saturne 2.1 sources in "Code_Saturne-2.1" in a folder "saturne21-src" (for example).
Create 2 new dir "saturne21-build" and "saturne21-bin" in "Code_Saturne-2.1".
Go to "saturne21-build" dir (cd saturne21-build). In this empty directory you must configure the code using the prefix "saturne21-bin" (../saturne21-src/configure --prefix=/complete_link/saturne21-bin).
Other options can be added in the configure step (hdf5/med/blas ...). Next
enter the command "make && make install".
A new executable has been created in /complete_link/saturne21-bin/bin and you can add an alias in your .bashrc; for example: alias cs_21='/complete_link/saturne21-bin/bin/code_saturne'.

Next you can run CS 2.1 with the command cs_21 and run CS 2.0 as before.

Best regards,
JF
Christine Leroy

Re: keeping 2 versions of saturne

Post by Christine Leroy »

Hello Jacques,
 
Thank you very much, it seems to be ok and the installation of the last version is much more easy than the previous one.
 
Best Regards
 
 
Christine
Christine Leroy

Re: keeping 2 versions of saturne

Post by Christine Leroy »

Hello again
 
I've installed CS 2.1.4 and everything was ok as previously mentionned. I followed exactly what was written in Jacques's post.

The code is running, but it seems that I don't have all the options. And for example, is it normal that when I just create a case
code_saturne create -s TEST CASE1, in the SCRIPTS directory the runcase has quite nothing in it? just this :

Code: Select all

#!/bin/bash
# Ensure the correct command is found:
export PATH="/home/leroy/software/code_saturne-2.1/saturne214-bin/bin":$PATH
# Run command:
\code_saturne run
 
thank you

Christine
Yvan Fournier

Re: keeping 2 versions of saturne

Post by Yvan Fournier »

Hello,
Yes, the runcase for Code_Saturne 2.1 is much simpler than that from 2.0.
All options which were set in the 2.0 runcase are now set using the GUI (in the XML file), or using the DATA/cs_user_scripts.py (copied from DATA/REFERENCE/cs_user_scripts.py and adapted).
Only batch system information and choice of XML file is handled by the runcase.
If you use  batch system, you should edit the <install_prefix>/etc/code_saturne.cfg file after installation.
When using the GUI, you must go to tha last section (batch calculation) to choose the correct runcase so that it is updated when you save the XML (adds "--param <xml_file>" to the "code_saturne run" command).
Best regards,
  Yvan
Christine Leroy

Re: keeping 2 versions of saturne

Post by Christine Leroy »

ciao Yvan,
 
Thanks for your explanation.
I have another question: where can I find the codes of the functions called in the subroutines? for example, in the usproj.f90, there are some functions (synsca, grdcel, getfbr...) that are used in the subroutine, where can I find there code?
If I write my own subroutine, will Saturne be able to run it or everything must be done with the existing subroutines?
Thanks in advance
Best regards
Christine
Jacques Fontaine

Re: keeping 2 versions of saturne

Post by Jacques Fontaine »

Hello,
You can find these functions in the sources of the code (the package downloaded on our website) in the folder src/ (for 2.1v) and ncs-2.0.x/src (for 2.0v).
You can write your own subroutine:
- in existing subroutine (ex.: usclim.f90) you can add a new subroutine for example "newsub" and use it in usclim or in other subroutines - you can create a new file newsub.f90 or newsub.c in CS_sources/user/base and next you must add this new file in Makefile.am in cs_sources/src/base and recompile the code (it's more complicated that the previous way)
 
Best regards,
JF
Christine Leroy

Re: keeping 2 versions of saturne

Post by Christine Leroy »

Hello Jacques,
thank you for your explanations.
I've already started my own subroutine in the first way. More easy for beginners ;-)
But for the functions I was talking about, I'm still not able to find them..ok for the existing subroutines like usclim.f90 etc...but what I would like to find are the codes for the functions that are called inside these subroutines as getfrb, synsca etc... are these codes integrated in some other subroutines? in that case, is there any way to find in which one? it's not possible to open every subroutine to find them......
thanks again
Christine
 
Yvan Fournier

Re: keeping 2 versions of saturne

Post by Yvan Fournier »

Hello,
You may use the "grep" command on the Code_Saturne source tree to find where those functions are defined and used (do "man grep" for info).
In any case, getfbr is a wrapper for C functions using a selector syntax interpretation and accessing the mesh structure, and synsca uses mesh ghost cells and MPI to synchronize parallel data, so the code called inside both of these examples is not really for beginners...
Best regards,
  Yvan
Post Reply