error in coupling code_saturne and code_aster using Yacs

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
lzhang
Posts: 44
Joined: Mon Nov 06, 2017 2:54 pm

error in coupling code_saturne and code_aster using Yacs

Post by lzhang »

Hello everyone,

I'm currently working on fluid-structure interaction problem, and am trying to use code_saturne/code_aster coupling. When I try to launch the program runcase, generated by the command "code_saturne create -c <fluid> --aster <solid>", I encounter the following error:

Problem in connectService: solid_service Component is probably not launched. Modify your YACS file
+++++++++++++++++++ end calculation +++++++++++++++++++
Proc state : FAILED
Elapsed time after execution: 21275 ms
Execution has ended in error
<error node= proc state= FAILED>
<error node= inter_service state= ERROR>
Problem in connectService: solid_service Component is probably not launched. Modify your YACS file
</error>
<error node= fluid_service state= ERROR>

</error>
<error node= solid_service state= ERROR>
Error while trying to create a new component: component 'FSI_ASTER' is not installed or it's a wrong name
SALOME_Container::create_component_instance failed
</error>
</error>
shutdown SALOME container: /Containers/mouflon/8254_FSI_MILIEU_0x12a7ea0
shutdown SALOME container: /Containers/mouflon/8254_FSI_SATURNE_0x12a8260
shutdown SALOME container: /Containers/mouflon/8254_FSI_ASTER_0x12a7b40
solver script exited with status 2.

Error running the calculation.

Check Code_Saturne log (listing) and error* files for details.


Then I look at the the output file located at /tmp/, trying to understand what the problem is, I have:
>>> 17:46:25.134 [local_shell@/home/lzhang/salome_meca/V2015_2/tools/Code_aster_frontend-20152/lib/python2.7/site-packages/asrun/system.py:338]
ERROR : iret = 127
+++ STANDARD OUTPUT:
sh: 1: /home/lzhang/salome_meca/V2015_2/tools/Code_aster_frontend-20152/12.3/../../bin/aster: not found
EXECUTION_CODE_ASTER_EXIT_8342=127

+++ STANDARD ERROR:

+++ END


It seems that the environment variable is not well set. Does anyone have ideas about how to set correctly the adequate environment variable and to fix the problem?

For your information, I am using code_saturne-5.0.4 and salome_meca-2015_2. And my example is based on a previous post:
viewtopic.php?f=2&t=1852&hilit=YACS


Thanks in advance!

Lei
Yvan Fournier
Posts: 4152
Joined: Mon Feb 20, 2012 3:25 pm

Re: error in coupling code_saturne and code_aster using Yacs

Post by Yvan Fournier »

Hello,

Just to check, did you do the post-install stage (configuring code_saturne.cfg) for the Salome-Meca install ? Did you build Code_Saturne with Salome or Salome_MECA ?

Also (but this is important only at a later stage), there were some issues in the code_aster side of the coupling that were fixed in 2016 or 2017 (can't remember, but the fixes were sent to the code_aster team pretty late, so the 2015 version probably does not have them). Without the fixes, the coupling can run, but displacements are much too small (missing some multiplication factor).

Regards,

Yvan
lzhang
Posts: 44
Joined: Mon Nov 06, 2017 2:54 pm

Re: error in coupling code_saturne and code_aster using Yacs

Post by lzhang »

Thank you for your response!

Yes, I did the post-install stage by specifying "aster = /home/lzhang/salome_meca/V2015_2/tools/Code_aster_stable-1240" for my installation. And I have built code_saturne with salome_meca_2015_2.

It seems that my installation salome_meca is not complete, indeed I don't have the directory /12.3 as indicated by the error message: /home/lzhang/salome_meca/V2015_2/tools/Code_aster_frontend-20152/12.3/../../bin/aster: not found. I then created the directory 12.3/, and made a symbolic link for "aster" in the corresponding directory, and I have no more the previous error, and the container FSI_ASTER looks well built.

However now I come up with an error in execution stage:

+++++++++++++++++++ start calculation +++++++++++++++++++
th. 140410348734208 - Trace /home/I27518/TRAV/C3/V2015_2_public/modules/src/KERNEL/src/Container/SALOME_ContainerManager.cxx [620] : [GiveContainer] waiting 60 second steps container /Containers/mouflon/13424_FSI_SATURNE_0x10db510
th. 140410257139456 - Trace /home/I27518/TRAV/C3/V2015_2_public/modules/src/KERNEL/src/Container/SALOME_ContainerManager.cxx [620] : [GiveContainer] waiting 60 second steps container /Containers/mouflon/13424_FSI_MILIEU_0x10db150
th. 140410265532160 - Trace /home/I27518/TRAV/C3/V2015_2_public/modules/src/KERNEL/src/Container/SALOME_ContainerManager.cxx [620] : [GiveContainer] waiting 60 second steps container /Containers/mouflon/13424_FSI_ASTER_0x10dadf0
th. 140410348734208 - Trace /home/I27518/TRAV/C3/V2015_2_public/modules/src/KERNEL/src/Container/SALOME_ContainerManager.cxx [432] : [GiveContainer] container /Containers/mouflon/13424_FSI_SATURNE_0x10db510 launched
SalomeContainer launched : /Containers/mouflon/13424_FSI_SATURNE_0x10db510 mouflon 13452
th. 140410257139456 - Trace /home/I27518/TRAV/C3/V2015_2_public/modules/src/KERNEL/src/Container/SALOME_ContainerManager.cxx [432] : [GiveContainer] container /Containers/mouflon/13424_FSI_MILIEU_0x10db150 launched
SalomeContainer launched : /Containers/mouflon/13424_FSI_MILIEU_0x10db150 mouflon 13454
th. 140410265532160 - Trace /home/I27518/TRAV/C3/V2015_2_public/modules/src/KERNEL/src/Container/SALOME_ContainerManager.cxx [432] : [GiveContainer] container /Containers/mouflon/13424_FSI_ASTER_0x10dadf0 launched
SalomeContainer launched : /Containers/mouflon/13424_FSI_ASTER_0x10dadf0 mouflon 13456
YACS Exception during execute
Execution problem: Salome Exception occurredTraceback (most recent call last):
File "/home/lzhang/Code_Saturne_Salome/5.0.4/code_saturne-5.0.4/arch/Linux_x86_64/lib/python2.7/site-packages/salome/FSI_ASTER_module.py", line 139, in op0117
raise ExecutionError("Error in initial execution")
ExecutionError: Error in initial execution


Do you have any ideas to fix it?

Thank you!
Lei
Yvan Fournier
Posts: 4152
Joined: Mon Feb 20, 2012 3:25 pm

Re: error in coupling code_saturne and code_aster using Yacs

Post by Yvan Fournier »

Hello,

You probably need to look at the error logs for each code, to see which one crashed or complained about some option or another. These logs should be in each code's subdirectory, though YACS might also have logs in some other place (debugging this type of coupling is always a pain, and YACS only makes things more complicated than for example the Code_Saturne/Syrthes coupling)...

Best regards,

Yvan
lzhang
Posts: 44
Joined: Mon Nov 06, 2017 2:54 pm

Re: error in coupling code_saturne and code_aster using Yacs

Post by lzhang »

Hello,

As you suggested, I looked at the log file for each code. I have the following error message for code_aster:

CR phase d'initialisation
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! erreur de syntaxe, Erreur de nom: name 'CALC_IFS_DNL' is not defined ligne 152 !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
fin CR phase d'initialisation


My installation cannot recognize the commande 'CALC_IFS_DNL', however in the installation files, the files calc_ifs_dnl.py and cal_ifs_dnl_ops.py do exist.

Best regards,
Lei
Yvan Fournier
Posts: 4152
Joined: Mon Feb 20, 2012 3:25 pm

Re: error in coupling code_saturne and code_aster using Yacs

Post by Yvan Fournier »

Hello,

In the beginning of the ".comm" file, you may need to add:

Code: Select all

from Contrib.init_compo import INIT_COMPO
from Contrib.calc_ifs_dnl import CALC_IFS_DNL
Regards,

Yvan
lzhang
Posts: 44
Joined: Mon Nov 06, 2017 2:54 pm

Re: error in coupling code_saturne and code_aster using Yacs

Post by lzhang »

Hello,

Thank you! Indeed with the two lines in the ".comm" file, there is no more problem with the execution of code_aster.

The simulation seems to work, however it stops at the end of 10 iterations with following errors:

YACS Exception during execute
Execution problem: probably an error in input arguments of service 'inter_run' from component 'FSI_MILIEU'
Problem in disconnect(CORBA::SystemException) uses port: DTCALC
Problem in disconnect(CORBA::SystemException) uses port: DTCALC
Problem in disconnect(CORBA::SystemException) uses port: EPSILO
Problem in disconnect(CORBA::SystemException) uses port: EPSILO
Problem in disconnect(CORBA::SystemException) uses port: TTINIT
Problem in disconnect(CORBA::SystemException) uses port: TTINIT
Problem in disconnect(CORBA::SystemException) uses port: PDTREF
Problem in disconnect(CORBA::SystemException) uses port: PDTREF
Problem in disconnect(CORBA::SystemException) uses port: DEPSAT
Problem in disconnect(CORBA::SystemException) uses port: FORAST
Problem in disconnect(CORBA::SystemException) uses port: NBPDTM
Problem in disconnect(CORBA::SystemException) uses port: NBPDTM
Problem in disconnect(CORBA::SystemException) uses port: NBSSIT
Problem in disconnect(CORBA::SystemException) uses port: NBSSIT
Problem in disconnect(CORBA::SystemException) uses port: ISYNCP
Problem in disconnect(CORBA::SystemException) uses port: NTCHRO
Problem in disconnect(CORBA::SystemException) uses port: ICVEXT
Problem in disconnect(CORBA::SystemException) uses port: ICVAST
Problem in disconnect(CORBA::SystemException) uses port: NB_DYN
Problem in disconnect(CORBA::SystemException) uses port: NB_FOR
+++++++++++++++++++ end calculation +++++++++++++++++++
Proc state : ACTIVATED
Elapsed time after execution: 13388 ms
Execution has ended in error

shutdown SALOME container: /Containers/mouflon/25739_FSI_SATURNE_0x1d7a280
shutdown SALOME container: /Containers/mouflon/25739_FSI_ASTER_0x1d79b60
pure virtual method called
terminate called without an active exception
/home/lzhang/Study_Code_Saturne/FSI_test_new/RESU_COUPLING/20171129-1331/appli/runSession : ligne 131 : 25739 Abandon (core dumped) ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py -exec $*
solver script exited with status 134.

Error running the calculation.

Check Code_Saturne log (listing) and error* files for details.


****************************
Saving calculation results
****************************

Error in calculation stage.


And I checked also log files, FSI_ASTER works well, while for FSI_SATURNE I have:

./cs_solver: symbol lookup error: /home/lzhang/Code_Saturne_Salome/5.0.4/code_saturne-5.0.4/arch/Linux_x86_64/lib/salome/libSalomeIDLFSI.so.0: undefined symbol: _ZN4omni18proxyObjectFactoryD2Ev

and for FSI_MILIEU, I have

terminate called after throwing an instance of 'omni_thread_fatal'
Aborted (core dumped)


I hope that you could help!

Thanks!

Best regards,
Lei
Last edited by lzhang on Thu Nov 30, 2017 10:50 am, edited 1 time in total.
Yvan Fournier
Posts: 4152
Joined: Mon Feb 20, 2012 3:25 pm

Re: error in coupling code_saturne and code_aster using Yacs

Post by Yvan Fournier »

Hello,

I'm not sure, but I would recommend using the latest Salome-Meca to make sure you have the bug fixes I mentioned in a previous post.

Otherwise, does something specific happen first at the 10th time step (such as postprocessing, additional exchanges, ...) ?

Regards,

Yvan
lzhang
Posts: 44
Joined: Mon Nov 06, 2017 2:54 pm

Re: error in coupling code_saturne and code_aster using Yacs

Post by lzhang »

Hello,

As you recommended, I'll try with the latest version of salome-meca.

I found that the problem at the 10th step was due to the fact that in yacs scheme, the iteration number was defined to be 10. I think that it's a default value given by launching the code coupling. It looks like the program can not terminate correctly.

Besides, in the example "externecylindresconcentriques.zip" you gave in the post viewtopic.php?f=2&t=1852&hilit=YACS
in the result directory there is the same error that I encounter here:
FSI_MILIEU Unknown_placement inter_service end execution ABORT, Execution problem: probably an error in input arguments of service 'inter_run' from component 'FSI_MILIEU'

So could you please give here a working example?

Thanks a lot!

Best regards,
Lei
Yvan Fournier
Posts: 4152
Joined: Mon Feb 20, 2012 3:25 pm

Re: error in coupling code_saturne and code_aster using Yacs

Post by Yvan Fournier »

Hello,

Yes, the program does not terminate correctly, but runs until the end and produces all the required output before crashing. Unfortunately, we have not been able to look much into this (as this does not prevent the computation from running correclty, it has not bee a priority), but it all iterations run, you should be OK.

In any case, updating to the latest version should avoid "too small" displacements.

Regards,

Yvan
Post Reply