Error in compiling subroutines - Code Saturne 5.2

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
JeremyA
Posts: 31
Joined: Fri Jul 26, 2019 10:33 am

Re: Error in compiling subroutines - Code Saturne 5.2

Post by JeremyA »

Hello,

I have modified the file like you said

here's the compiler when I run a new calculation with the subroutine
I think nothing changed

Thank you for your help

Code_Saturne
************

Version: 5.2-patch
Path: /home/jarancio/salome-cfd/Salome_CFD-SCFD_V8_5_0-Code_Saturne-5_2-univ_d54f597c/modules/CFDSTUDY_v52/

Result directory:
/home/jarancio/Simulations_CodeSaturne/fulldomain/case2/RESU/20190924-1745


****************************************
Compiling user subroutines and linking
****************************************

['gfortran', '-o', 'cs_f_user_boundary_conditions.o', '-I', '/home/jarancio/salome-cfd/Salome_CFD-SCFD_V8_5_0-Code_Saturne-5_2-univ_d54f597c/modules/CFDSTUDY_v52/include/code_saturne', '-x', 'f95-cpp-input', '-Wall', '-pedantic-errors', '-std=f2003', '-fopenmp', '-O', '-c', '/home/jarancio/Simulations_CodeSaturne/fulldomain/case2/RESU/20190924-1745/src_saturne/cs_user_boundary_conditions.f90']
Traceback (most recent call last):
File "/home/jarancio/salome-cfd/Salome_CFD-SCFD_V8_5_0-Code_Saturne-5_2-univ_d54f597c/modules/CFDSTUDY_v52/bin/code_saturne", line 76, in
retcode = cs.execute()
File "/home/jarancio/salome-cfd/Salome_CFD-SCFD_V8_5_0-Code_Saturne-5_2-univ_d54f597c/modules/CFDSTUDY_v52/lib/python2.7/site-packages/code_saturne/cs_script.py", line 91, in execute
return self.commands[command](options)
File "/home/jarancio/salome-cfd/Salome_CFD-SCFD_V8_5_0-Code_Saturne-5_2-univ_d54f597c/modules/CFDSTUDY_v52/lib/python2.7/site-packages/code_saturne/cs_script.py", line 166, in run
return cs_run.main(options, self.package)
File "/home/jarancio/salome-cfd/Salome_CFD-SCFD_V8_5_0-Code_Saturne-5_2-univ_d54f597c/modules/CFDSTUDY_v52/lib/python2.7/site-packages/code_saturne/cs_run.py", line 387, in main
return run(argv, pkg)[0]
File "/home/jarancio/salome-cfd/Salome_CFD-SCFD_V8_5_0-Code_Saturne-5_2-univ_d54f597c/modules/CFDSTUDY_v52/lib/python2.7/site-packages/code_saturne/cs_run.py", line 375, in run
stages=stages)
File "/home/jarancio/salome-cfd/Salome_CFD-SCFD_V8_5_0-Code_Saturne-5_2-univ_d54f597c/modules/CFDSTUDY_v52/lib/python2.7/site-packages/code_saturne/cs_case.py", line 1946, in run
retcode = self.prepare_data(force_id)
File "/home/jarancio/salome-cfd/Salome_CFD-SCFD_V8_5_0-Code_Saturne-5_2-univ_d54f597c/modules/CFDSTUDY_v52/lib/python2.7/site-packages/code_saturne/cs_case.py", line 1506, in prepare_data
d.compile_and_link()
File "/home/jarancio/salome-cfd/Salome_CFD-SCFD_V8_5_0-Code_Saturne-5_2-univ_d54f597c/modules/CFDSTUDY_v52/lib/python2.7/site-packages/code_saturne/cs_case_domain.py", line 602, in compile_and_link
stderr=log)
File "/home/jarancio/salome-cfd/Salome_CFD-SCFD_V8_5_0-Code_Saturne-5_2-univ_d54f597c/modules/CFDSTUDY_v52/lib/python2.7/site-packages/code_saturne/cs_compile.py", line 608, in compile_and_link
stderr=stderr)
File "/home/jarancio/salome-cfd/Salome_CFD-SCFD_V8_5_0-Code_Saturne-5_2-univ_d54f597c/modules/CFDSTUDY_v52/lib/python2.7/site-packages/code_saturne/cs_compile.py", line 569, in compile_and_link
keep_going, stdout, stderr)
File "/home/jarancio/salome-cfd/Salome_CFD-SCFD_V8_5_0-Code_Saturne-5_2-univ_d54f597c/modules/CFDSTUDY_v52/lib/python2.7/site-packages/code_saturne/cs_compile.py", line 431, in compile_src
stdout=stdout, stderr=stderr) != 0:
File "/home/jarancio/salome-cfd/Salome_CFD-SCFD_V8_5_0-Code_Saturne-5_2-univ_d54f597c/modules/CFDSTUDY_v52/lib/python2.7/site-packages/code_saturne/cs_exec_environment.py", line 537, in run_command
p = subprocess.Popen(cmd, universal_newlines=True, env = env, **kwargs)
File "/home/jarancio/salome-cfd/Salome_CFD-SCFD_V8_5_0-Code_Saturne-5_2-univ_d54f597c/prerequisites/Python-2710/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/home/jarancio/salome-cfd/Salome_CFD-SCFD_V8_5_0-Code_Saturne-5_2-univ_d54f597c/prerequisites/Python-2710/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error in compiling subroutines - Code Saturne 5.2

Post by Yvan Fournier »

Hello,

You modification seems to work, and confirm gfortran is missing or not found.

Checking your previous post, you indicated the command "gfortran-8" works, but did not answer for simply "gfortran". Does it work ? If yes, does it still works under "salome shell" ?

I suspect the "gfortran-8" package does not include a simple, default "gfortran" alias, but need to check it.

Best regards,

Yvan
JeremyA
Posts: 31
Joined: Fri Jul 26, 2019 10:33 am

Re: Error in compiling subroutines - Code Saturne 5.2

Post by JeremyA »

Hello,

gfortran works well in the basic console :

jarancio@arancio:~/Bureau$ gfortran -o hello hello.f95
jarancio@arancio:~/Bureau$ ./hello
Hello World!

Now in the salome shell :

[NS=arancio:2810]$ gfortran -o hello hello.f95
[NS=arancio:2810]$ ./hello
Hello World!

Best regards

Jérémy
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error in compiling subroutines - Code Saturne 5.2

Post by Yvan Fournier »

Hello,

This seems really strange, unless there is some strange issue with paths and environment variables.
We have had issues with "universal" builds, because they are anything but universal, and solving one issue leads to another more subtle issue..

One other possible issue might be a mix of 32 and 64 bit versions, but is not very probable on recent systems. On your "standalone" test with gfortran, you might want to test "file hello" to make sure hello is a 64 bit file just like the Salome environment.

Another test would be to check the Code_Saturne run from "code_saturne gui" run under "salome shell" (unless you have already tested this) instead of running it from the desktop.

Finally, which Linux distribution do you use ? We might have "non-universal" builds of Salome_CFD which work better (but would be using Code_Saturne 6.0 beta or 6.0-rc1).

Best regards,

Yvan
JeremyA
Posts: 31
Joined: Fri Jul 26, 2019 10:33 am

Re: Error in compiling subroutines - Code Saturne 5.2

Post by JeremyA »

I am using Ubuntu 18.04.03 LTS

I have already tried to run with the GUI, with gfortran

About the file "hello" :
[NS=arancio:2810]$ file hello
hello: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/l, for GNU/Linux 3.2.0, BuildID[sha1]=63a4469d110b58c7a8417cb896ec2b4b24d17489, not stripped


Should I come back to Salome CFD with Code Saturne 5.0 ?

Best regards

Jeremy
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error in compiling subroutines - Code Saturne 5.2

Post by Yvan Fournier »

Hello,

We have a build for Ubuntu 16.04, and should have one for 18.04 in a few weeks, but the best solution may be to install an Ubuntu 18.04 version of "standard" Salome from the salome-platform.org website, and install Code_Saturne on that base using the --with-salome option of Code_Saturne's installation (which then requires using "code_saturne salome" to run under Salome.

Unless you need additional tools specific to Salome_CFD, such as ParaView Catalyst, OpenTURNS, or Syrthes, in which case waiting for an Ubuntu 18.04 build may be best (I'll see when we can build it, which depends on whether our build environment is ready or not).

If version 5.0 worked for you before, I suggest going back to 5.0, and waiting just a few weeks (maybe less) for a Ubuntu 18.04 version of Code_Saturne 6.0.

I may also be able to reproduce your bug using a the same build of Salome_CFD on a Ubuntu 18.04 virtual machines (my native machines are Debian 9 and Arch), but I won't be able to test before middle of next week, as I have a few deadlines coming up before that, including the v6.0 release.

Best regards,

Yvan
JeremyA
Posts: 31
Joined: Fri Jul 26, 2019 10:33 am

Re: Error in compiling subroutines - Code Saturne 5.2

Post by JeremyA »

Hello

I will appreciate to know when a version of Salome CFD will be available for Ubuntu 18.04

I am trying my best to download Salome CFD with code saturne 5.0 and make it work..
For example, libmpi.so.1 was missing in the file debianForSalome.. Anyway...

(

/home/jarancio/Logiciels_Simulation_EDF/Salome_CFD_8.5.0/Salome_CFD-V8_3_0-Code_Saturne-5_0_8-x86_64_7070bcd2/modules/CFDSTUDY_v50/libexec/code_saturne/cs_solver: error while loading shared libraries: libmpi.so.1: cannot open shared object file: No such file or directory

)

New issue :

I try to run Case2 from Full Domain to test subroutines
I got the error in the file Compile.log attached

Could you explain me how to solve this issue pls ?

Thank you

Jeremy
Attachments
compile.log
(773 Bytes) Downloaded 159 times
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error in compiling subroutines - Code Saturne 5.2

Post by Yvan Fournier »

Hello,

This means your version of Salome-CFD was built on a system with a different version of gfortran than the system you are running on. In other words, Salome-CFD does not match your system.
So the issue is similar to the one you had before.

To keep things simple and practical, I recommend using a "standolone" Salome for meshing, and a standalone (compiled on your side using the installer) install of Code_Saturne for computation.

Best regards,

Yvan
Post Reply