-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import issue when using underworld #98
Comments
This is a stripy / underworld issue. |
Here is the link that how to install them, using conda to install stripy and compile the underworld from source code in the env. |
update:
|
update: |
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Avenir Next";
panose-1:2 11 5 3 2 2 2 2 2 4;}
@font-face
{font-family:"Times New Roman \(Body CS\)";
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:-webkit-standard;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
code
{mso-style-priority:99;
font-family:"Courier New";}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}
span.EmailStyle22
{mso-style-type:personal-reply;
font-family:"Avenir Next",sans-serif;
color:#002060;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
-->Just to help us figure out what is going on, can you try with a non-zero value of the random scale parameter. Also, if you look at the documentation, you can access the underlying triangulation routines and have a bit more control on what is happening with stripy. https://underworldcode.github.io/stripy/2.1.0b1/SphericalMeshing/CartesianTriangulations/Ex1-Cartesian-Triangulations.html That would allow you to permute the points in response to this error and we can most certainly determine whether the error is some sort of bug in the loading of libraries. L Prof Louis ***@***.***(m) +61 4 0333 1413(us) +1 505 349 ***@***.*** From: Neng Lu ***@***.***>Date: Monday, 8 November 2021 at 11:25 amTo: underworldcode/stripy ***@***.***>Cc: Subscribed ***@***.***>Subject: [underworldcode/stripy] import issue when using underworld (Issue #98)Hi guys,I run into an import issue and that bother me a while, would you help me check with that?if import underworld and stripy together, it will somehow get the wrong tri.simplices:import underworldfrom stripy import cartesian_meshesminX, maxX, minY, maxY, dx, dy = 0.0, 3.0 ,0.0, 1.0, 0.015625 ,0.015625extent_xy = [minX, maxX, minY, maxY]tri = cartesian_meshes.square_mesh(extent_xy, dx,dy, random_scale=0.0, refinement_levels=0)tri.simplicesThe result is:TRMESH - Fatal error! The first 3 nodes are collinear. Try reordering the data.array([], shape=(0, 3), dtype=int64)While import stripy alone, the tri.simplices are correct as:array([[ 0, 12544, 11005], [ 0, 11005, 193], [ 1, 12543, 11470], ..., [12096, 12434, 12433], [12209, 12398, 12397], [12260, 12419, 12418]])Are there any function conflicts there in underworld and stripy or? Thanks in advance.—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hi Louis,
It's more likely the dynamic libraries issue like Romain mentioned. |
Using python3.9 and trying: Error: Rank mismatch in argument ‘lcc’ at (1) (rank-1 and scalar)
src/srfpack.f:7391:37:
7391 | CALL intrc1(xs(i),ys(i),ncc,lcc,n,x,y,zdata,lst,lptr,lend,
| 1
Error: Rank mismatch in argument ‘lcc’ at (1) (rank-1 and scalar) Using gfortran 11.2.0. This is a stripy issue. I'll look into updating it. |
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:"Avenir Next";
panose-1:2 11 5 3 2 2 2 2 2 4;}
@font-face
{font-family:"Times New Roman \(Body CS\)";
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:-webkit-standard;
panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
code
{mso-style-priority:99;
font-family:"Courier New";}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}
span.pl-k
{mso-style-name:pl-k;}
span.EmailStyle23
{mso-style-type:personal-reply;
font-family:"Avenir Next",sans-serif;
color:#002060;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
***@***.***, Is this occurring during the build ? And are you using the current beta version ? It’s worthwhile to squash all the bugs at once and get the new release out there … L Prof Louis ***@***.***(m) +61 4 0333 1413(us) +1 505 349 ***@***.*** From: Julian Giordani ***@***.***>Date: Wednesday, 17 November 2021 at 3:04 pmTo: underworldcode/stripy ***@***.***>Cc: Louis Moresi ***@***.***>, Comment ***@***.***>Subject: Re: [underworldcode/stripy] import issue when using underworld (Issue #98)Using python3.9 and trying:pip install stripy I get the following error:Error: Rank mismatch in argument ‘lcc’ at (1) (rank-1 and scalar) src/srfpack.f:7391:37: 7391 | CALL intrc1(xs(i),ys(i),ncc,lcc,n,x,y,zdata,lst,lptr,lend, | 1 Error: Rank mismatch in argument ‘lcc’ at (1) (rank-1 and scalar)Using gfortran 11.2.0.This is a stripy issue. I'll look into updating it.—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe.
|
Yes it's occurring during the build. I'm on Also what client are you using with github @lmoresi, your replies to tickets are full of css jargon. |
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Avenir Next";
panose-1:2 11 5 3 2 2 2 2 2 4;}
@font-face
{font-family:"Times New Roman \(Body CS\)";
panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
code
{mso-style-priority:99;
font-family:"Courier New";}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Avenir Next",sans-serif;
color:#002060;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
-->Email … From: Julian Giordani ***@***.***>Date: Wednesday, 17 November 2021 at 3:38 pmTo: underworldcode/stripy ***@***.***>Cc: Louis Moresi ***@***.***>, Mention ***@***.***>Subject: Re: [underworldcode/stripy] import issue when using underworld (Issue #98)Yes it's occurring during the build. I'm on master and I fixed the problem!I also see the fix is also on branch dev. Should we merge dev into master and make a new release?Also what client are you using with github @lmoresi, your replies to tickets are full of css jargon.—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.
|
Sorry I saw that a bit late. I fixed it on master... |
OK results of my investigations for today... x.txt and y.txt are just dumps of Neng's code when using stripy only... What does not work:
What works (from the directory where _tripack.*.so is located)
The difference is that in case 1 we have some extra dynamic libraries loaded...
Not very helpful My first thought was to try passing the -fPIC options when building the libraries.... Note that we can reduce the complexity by doing That's all for now... Ideas? In the first case trmesh gets nothing... no values.. Might be worth looking at the memory address that get passed... Romain |
One thing that might confuse the loader is the fact that the routines have the same names in the different Fortran extensions... |
Yep that is exactly what is happening... There is an ambiguity between the trmesh subroutine in stripack.f90 and tripack.f90... |
That's a pity because one of the virtues of wrapping the code is that we don't have to touch the original fortran ... and hence we are never going to introduce new bugs. Is there a way to fix this via f2py that keeps the original code untouched, or do we need a super-grep intervention ? |
I don't know yet. I will investigate. I agree we shouldn't have to touch the Fortran code |
I'll keep documenting the debugging process...sorry if I'm spamming everyone... So What works (from the directory where _tripack.*.so is located)
Also works:
Does not work and throws an sTRMESH error (so the wrong routine gets called). I think its a fortran wrapping issue...:
|
I have tried to reproduce the issue with a package that is not Underworld but has Swig generated so files... The issue only occur when importing Underworld before the stripy submodules...And it only appears when we load strimesh before trimesh... Somehow UW messes up the way the interpreter loads the f2py generated modules in stripy... The fact that we had a very similar issue with an older version of Badlands makes me believe that the pb comes from UW... Something to revisit I suppose. Running out of ideas.... |
Hi guys,
I run into an import issue and that bother me a while, would you help me check with that?
if import underworld and stripy together, it will somehow get the wrong tri.simplices:
The result is:
While import stripy alone, the tri.simplices are correct as:
Are there any function conflicts there in underworld and stripy or? Thanks in advance.
The text was updated successfully, but these errors were encountered: