CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   undefined reference (https://www.cfd-online.com/Forums/openfoam-programming-development/174941-undefined-reference.html)

doubledang July 21, 2016 05:04

undefined reference
 
Hi Foamers

I tried to develop a new library, but some strange linking errors appeared:

/platformsnux64GccDPInt64OptbbPBE.so: undefined reference to `Foam::messageStream::masterStream(int)'
/platformsnux64GccDPInt64OptbbPBE.so: undefined reference to `Foam::reduce(double&, Foam::minOp<double> const&, int, int)'
/platformsnux64GccDPInt64OptbbPBE.so: undefined reference to `Foam::HashTableCore::canonicalSize(int)'
/platformsnux64GccDPInt64OptbbPBE.so: undefined reference to `Foam::PstreamBuffers::PstreamBuffers(Foam::UPstre am::commsTypes, int, int, Foam::IOstream::streamFormat, Foam::IOstream::versionNumber)'
/platformsnux64GccDPInt64OptbbPBE.so: undefined reference to `Foam::reduce(double&, Foam::sumOp<double> const&, int, int)'
/platformsnux64GccDPInt64OptbbPBE.so: undefined reference to `Foam::UIPstream::read(Foam::UPstream::commsTypes, int, char*, long, int, int)'
/platformsnux64GccDPInt64OptbbPBE.so: undefined reference to `Foam::UPstream::waitRequests(int)'
platformsnux64GccDPInt64OptbbPBE.so: undefined reference to `Foam::UOPstream::write(Foam::UPstream::commsTypes , int, char const*, long, int, int)'
collect2: error: ld returned 1 exit status

I am exhausted.
I really appreciate your input and help.
Best regards,

hk318i July 21, 2016 07:27

I am afraid, it is not easy for anyone here to help you without giving more details about your code. The problem is basically linking issue or problem with your OpenFOAM installation.

doubledang July 21, 2016 09:34

Hi Hassan,

Glad to have you here.
Basically, I was trying to use a PBE solver that was released at Github:
https://github.com/robertsawko/OpenPBE

These errors happend when I was installing (compiling and linking) it.
I have trying hard to solve it, but still failed.
I was curious what kind of reasons lead to the errors.
I reported the errors to the developer, but got no responses yet.
Could you please have a look at your convenience and give some help?

Best regards,

hk318i July 21, 2016 10:43

Hello,

I installed on my machine and I run the validation case using ``PBEFoam``. It worked fine. When exactly does this error appear?

doubledang July 21, 2016 10:56

Hello Hassan,

I have posted my compiling and linking processes at:

https://github.com/robertsawko/OpenPBE/issues/18

Could you take a look and see if you can find my origin of errors?

By the way, could you please share your installing steps?

Really appreciate!

Best regards,

djou July 21, 2016 10:59

interFoam
 
Hi
i hun interFoam solver and i have this result and stay going like this doesnt converge if some one know why

Phase-1 volume fraction = 1.2403e-06 Min(alpha1) = 0 Max(alpha1) =1 ,,,,,
Phase-1 volume fraction = 2.62429e-06 Min(alpha1) = 0 Max(alpha1) = 1
Phase-1 volume fraction = 4.17437e-06 Min(alpha1) = 0 Max(alpha1) = 1
Phase-1 volume fraction = 4.17437e-06 Min(alpha1) = -3.41753e-06 Max(alpha1) = 1

Phase-1 volume fraction = 5.87017e-06 Min(alpha1) = -2.97194e-06 Max(alpha1) = 1

Phase-1 volume fraction = 5.87016e-06 Min(alpha1) = -4.20485e-06 Max(alpha1) = 1

Phase-1 volume fraction = 7.58627e-06 Min(alpha1) = -3.92262e-06 Max(alpha1) = 1

Phase-1 volume fraction = 7.58627e-06 Min(alpha1) = -0.000100555 Max(alpha1) = 1

hk318i July 21, 2016 11:23

Quote:

Originally Posted by doubledang (Post 610700)
Hello Hassan,

I have posted my compiling and linking processes at:

https://github.com/robertsawko/OpenPBE/issues/18

Could you take a look and see if you can find my origin of errors?

By the way, could you please share your installing steps?

Really appreciate!

Best regards,

I followed the same steps as you did. I think this error could be a problem in your OpenFOAM installation not in OpenPBE. Have you tried to remove it and reinstall? or at least have you tried to recompile OF?

hk318i July 21, 2016 11:25

Quote:

Originally Posted by djou (Post 610701)
Hi
i hun interFoam solver and i have this result and stay going like this doesnt converge if some one know why

Phase-1 volume fraction = 1.2403e-06 Min(alpha1) = 0 Max(alpha1) =1 ,,,,,
Phase-1 volume fraction = 2.62429e-06 Min(alpha1) = 0 Max(alpha1) = 1
Phase-1 volume fraction = 4.17437e-06 Min(alpha1) = 0 Max(alpha1) = 1
Phase-1 volume fraction = 4.17437e-06 Min(alpha1) = -3.41753e-06 Max(alpha1) = 1

Phase-1 volume fraction = 5.87017e-06 Min(alpha1) = -2.97194e-06 Max(alpha1) = 1

Phase-1 volume fraction = 5.87016e-06 Min(alpha1) = -4.20485e-06 Max(alpha1) = 1

Phase-1 volume fraction = 7.58627e-06 Min(alpha1) = -3.92262e-06 Max(alpha1) = 1

Phase-1 volume fraction = 7.58627e-06 Min(alpha1) = -0.000100555 Max(alpha1) = 1

I think this section of the forum is not suitable for your question. You will have to give more details about your case because the convergence depends on many parameters. No one can really help you based on these few lines.

doubledang July 21, 2016 11:45

Hello Hassan

Yes, I have recompiled the openfoam. But still failed...
Could you mind telling me which verion of OF do you use?
I have three versions of OF installed on my machine (don't know if this spoils).
The OS of my computer is Ubuntu LTS 16.04.


Best regards,


Quote:

Originally Posted by hk318i (Post 610650)
I am afraid, it is not easy for anyone here to help you without giving more details about your code. The problem is basically linking issue or problem with your OpenFOAM installation.

Quote:

Originally Posted by hk318i (Post 610699)
Hello,

I installed on my machine and I run the validation case using ``PBEFoam``. It worked fine. When exactly does this error appear?

Quote:

Originally Posted by hk318i (Post 610706)
I followed the same steps as you did. I think this error could be a problem in your OpenFOAM installation not in OpenPBE. Have you tried to remove it and reinstall? or at least have you tried to recompile OF?


hk318i July 21, 2016 11:54

I tested it on Ubuntu 14.04LTS and OpenFOAM-3.0 (pre-compiled version). There is no problem to have multiply versions of OF if your are sourcing the right version. Apart from OpenPBE, is your installation working fine?

doubledang July 21, 2016 12:03

My openfoam installation works fine for all the other applications.
What do you mean by "pre-compiled" version?
Do you mean it is unpacked OF source code folder?
The problem struggled me over almost 2 weeks.
I really exhausted.
:(
Do you have any ideas or suggestions as to work around the problem
in my case?

Really Appreciate your input!


Quote:

Originally Posted by hk318i (Post 610719)
I tested it on Ubuntu 14.04LTS and OpenFOAM-3.0 (pre-compiled version). There is no problem to have multiply versions of OF if your are sourcing the right version. Apart from OpenPBE, is your installation working fine?


anishtain4 July 21, 2016 13:41

In the github you provided it seems OF version 3.0 is needed. OpenFOAM had some fundamental changes in some of the version and most of the utilities will not be compatible if you use the wrong generation of OF.
Also you need Eigen 3 but the errors seem to be from OF.

hk318i July 22, 2016 04:28

Quote:

Originally Posted by doubledang (Post 610720)
My openfoam installation works fine for all the other applications.
What do you mean by "pre-compiled" version?
Do you mean it is unpacked OF source code folder?
The problem struggled me over almost 2 weeks.
I really exhausted.
:(
Do you have any ideas or suggestions as to work around the problem
in my case?

Really Appreciate your input!

I mean Ubuntu version, I didn't compile OF-3 on this particular machine form the source files, {LINK}
Based on your report in Github, you managed to install all the prerequisites successfully, that is why I though it is maybe related to OF installation.

doubledang July 22, 2016 06:01

Quote:

Originally Posted by hk318i (Post 610843)
I mean Ubuntu version, I didn't compile OF-3 on this particular machine form the source files, {LINK}
Based on your report in Github, you managed to install all the prerequisites successfully, that is why I though it is maybe related to OF installation.

Hello , Yes exactly, I also installed it successfully on my labtop this morning.
I have OF3.0.1 on my laptop.
So, I feel strange why it fails on my workstation.
Do you have any suggestions to get the reasons why it sucks on my workstation?

Best regards,

hk318i July 22, 2016 06:09

Maybe it is related to Ubuntu 16.04 LTS, because I think pre-compiled OF-3 does not support Ubuntu 16.04

doubledang July 22, 2016 10:57

Quote:

Originally Posted by hk318i (Post 610867)
Maybe it is related to Ubuntu 16.04 LTS, because I think pre-compiled OF-3 does not support Ubuntu 16.04

Thanks Hassan for your help!

I came to agree with you that is is possibly casued by Ubuntu sys.
By the way, could you hint how to run the validation case?
I have just install PyFoam.
But I have no idea as to how to use pyFoam.


Best regards,

hk318i July 22, 2016 11:04

There is a code called setupCass.py in galinat just run it. This code creates few cases and it uses pyFoam

doubledang July 22, 2016 11:49

Quote:

Originally Posted by hk318i (Post 610909)
There is a code called setupCass.py in galinat just run it. This code creates few cases and it uses pyFoam

Yes, i have run the setupCases.py file, then some cases are established.
How could i run the cases such as re6400NC10 re6400NC20 ...
I tried to use pyFoamRunner.py, but failed.
Do I need to write pyFoam script to run them?


Thanks!

Best regards,

hk318i July 22, 2016 12:26

I run blockMesh then the solver as any OpenFOAM case. Personally, I don't use pyFoam

doubledang July 24, 2016 10:00

Quote:

Originally Posted by hk318i (Post 610938)
I run blockMesh then the solver as any OpenFOAM case. Personally, I don't use pyFoam

Okay, thanks, Hassan


All times are GMT -4. The time now is 00:07.