cs solver doesn't take into account user routines in SRC

All questions about installation
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
jtache
Posts: 16
Joined: Thu Apr 19, 2012 4:01 pm

cs solver doesn't take into account user routines in SRC

Post by jtache » Sun Apr 14, 2019 2:48 pm

Hello everyone,

I have the following problem : after a fresh installl of CS4.0.8 on a fresh installed Ubuntu 16, Code_saturne is working just fine except that user subroutines in SRC directory are not taken into account during the run. I know these routines are working well with cs4.0.8 for having used them in the past without any problems.

Routines are well copied in src_saturne directory of the RESU/2019*** directory and they are well compiled at the beginning of the run (compil.log is ok).

After having recompiled CS a dozen times, I still don't know what's going on and I'm still in trouble.

Could you help me on this?

Best regards,
Jeremie

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

Re: cs solver doesn't take into account user routines in SRC

Post by Yvan Fournier » Sun Apr 14, 2019 8:06 pm

Hello,

This behavior was observed with the "packaged" version of the code on Ubuntu quite a while ago. I filed a bug remarking we had this issue while the parent Debian version worked fine, but that bug has been ignored so far.

This is the first time is seems to occur with a user-compiled version. I am not sure where this comes from (some subtle linker priorities I guess, but it is difficult to find what distributions are doing at a low level which explains this).

A workaround might be to add "--disable-shared" at configure tile to force a static build, though in that case, you cannot "clean up" user files to use only the functions/subroutines you need; you must also leave the unmodified/empty subroutines in the file to avoid link issues.).

Are you sure you do not have a packaged version of the code in the background ?

Another possible solution to test would be to add "LDFLAGS=-Wl,--as-needed" to the "configure" command. If this fixes the issue, feedback will be welcome and we could add it by default.

Best regards,

Yvan

jtache
Posts: 16
Joined: Thu Apr 19, 2012 4:01 pm

Re: cs solver doesn't take into account user routines in SRC

Post by jtache » Wed Apr 24, 2019 10:19 am

Hello Yvan,

Thank you for your prompt reply, I really greatly appreciated.
I took some time to test these workarounds you gave me, but unfortunately I didn't succed to fix my problem.
I tried several things on several Ubuntu-based distro (Mint, Kubuntu) also through Virtualbox, without any results.

I finally solved my problem by installing the EDF debian-based distro Scibian then code-saturne 4.3.3 deb package : it works fine now !
BTW I didn't know this distro and I think it's a great project. I will continue to follow it closely.

I regret not to have identified what was the root cause of my problem, I would have liked to give you a useful feedback on this...
I should install cs5 in the following weeks, so I would post my comments on this if I think it could help others users.

Again, thanks a lot.

Jeremie

Post Reply