Brian Hanley

40 Reputation

3 Badges

6 years, 88 days

MaplePrimes Activity


These are replies submitted by Brian Hanley

@Preben Alsholm 
# If "filledregions=true" is not present, plot3d will throw an error.
# This code shows the three cases, only one of which will work.

The example code happened to be using Color. I had gone far enough  creating the example.
The point is that you have to have the filled = true option or it won't work.

 

Cheers

The error I got will appear after you fix the colortools library problem. I'm not sure why your color isn't working. You should see the variable and a shaded region that shows you the color as the output. Make a code example that just defines Color to figure it out.

The second problem, yes, it is obvious once you can SEE it. But that result was came from using the replace all function to change a block of repetitive code. Every single change had single quotes around it. And in Maple, it was impossible to see those single quotes!

I could not diagnose this problem until I cut and pasted that block of code into a different editor. Then I could see it.

I mentioned this, because these sorts of bizarre errors created by the editor are maddening time wasters. If someone else is having a similar problem maybe my note will help them.

This is the result of using the editor to make edits using find and replace. It inserts single quotes.
But those quotes are unvisible without cutting and pasting out of Maple to another editor.
The error thrown by plot3d looks quite similar to the error above, when filledregions=true is not present.

contourplot3d(-5*d/(d^2 + y^2 + 1), d = -3 .. 3, y = -3 .. 3, filledregions = true, color = black, `filledregions=true, coloring` = [cGr1s, cGr1s], contours = [-2, -1.5, -1, -0.5, 0, 0.5, 1, 1.5, 2])

Thanks for pointing that out. The lower case vector was a typo. I normally use Vector. Typing "vector" was an artifact of copying over the code section from the fairly complex piece that this problem came from. I radically simplified it, and had to type in new vector array names. I was frustrated and since it worked, didn't notice the lower case.

Here is the array definitions lines from the original code where the problem came from and it gave me an error. But unable to see any '1' single quotes, I couldn't try to figure it out.
YoE := Vector(iVecSize); WoE := Vector(iVecSize); Wlog := Vector(iVecSize); Elog := Vector(iVecSize);

I saw those single quotes when I cut and pasted. I ignored them there because I didn't see them in the Maple editor, and those show up when cutting and pasting fairly frequently. I never typed them.

When I retype this in Maple, the same thing happens. To get it to go away, I cut and pasted the Maple text into gEdit, removed the single quotes, then cut and pasted it back. Then it works. Unfortunately, I can't show this to you with a screen shot.

I have no idea where those '1' quotes came from, because I didn't type them, and retyped those lines. (That's SOP when something really weird happens---delete the line, retype.) I still say this is a bug. If the editor is inserting them for some weird reason, and I can't see them without cutting and pasting to somewhere else, that's not acceptable behavior. 

I sometimes cut and paste large sections of Maple code over to gEdit or some other simple text editor. This is because doing search and replace in the Maple editor is impossible for many things, as I'm sure you know. I see single quotes appear in weird places when pasting from  and to Maple's editor.

I will remember this, but what a waste of time for no purpose. It makes Maple feel rickety and untrustworthy.

@acer I copied that actual code and results.
There is no function named "fproc".  Maple spits that out because of one change, the one that you see. The change is that instead of a range from  133 to 134, the range is 133 to 312.  This makes no sense. As I said, the interpolation object has 3051 elements.

I cannot upload the whole worksheet. I have to spend the time to make an example that is strictly this part. I was in process of doing  that, and Maple hung, as it sometimes does with larger sheets after doing quite a bit of work.  To deal with that, I had to kill it, and then reboot. So, I gave up on that. If I get the time, I will try to  make the example.

In any case to answer this question a person would have to be quite familiar with using interpolation objects. In another thread on MaplePrimes something much  simpler,  but different was discussed. I suspect that the answer it gives to  the small range example is also wrong. So I suspect the real answer is that Maple doesn't allow what I want to  do. So, I have a workaround, which is to use a for loop and make it discrete steps.

Appreciate your comments.

You suggest that I should delete the M, matrix from display. Yes, of course I thought of this. I had already done most of what you have suggested.
But, just because I do that, and I can't see it anymore through the thread of the program, does not mean that the memory is deallocated or freed up.

I would hope that someone in tech support would know the answer to this. Someone must have had to do memory management for large arrays before this. The indications that I get are that it probably is not deallocated. But maybe there is a way and there are commands that will do this.

If this was C it would malloc or calloc and free or realloc to do this.

Please try to understand the real question I am asking. Just giving me things from Maple without verifying that the underlying memory is actually freed up is not helpful. We are going around in circles. I want to know what happens under the covers.

 M:=Matrix(500,500);     
for n from 1 to 500 do   
    for m from 1 to 500 do    
        M[m,n]:=evalf(m*(e)^(-n)); 
    od: 
od:

 M:=evaln(M);  #  clear M    
eval(M); #  check - There appears to be a new M. And this new M is just symbol  
      
     But I can still click into and see the old M has the values modified by the code. So that memory is still allocated.

Set as:
JAVAHEAP=10240 <= Set
CUSTOMHEAP=1 <= Set
JAVASTACK=4 <=original
JVM_OPTIONS="-Dsun.java2d.pmoffscreen=false -Djogamp.gluegen.UseTempJarCache=false" <= original

Results. It takes maybe another hour to get slow with that setting. Java is, as usual, at 1.4 GB of memory according to the system monitor. How exactly is it acting?

I type: ` The quick brown fox jumped over the lazy dog.  <= After I finish typing, I started a stopwatch. It took 17.06 seconds fro the sentence to completely display. That is marginally useable. But it's possible.

Note: When Maple slows down, so does Twitter. Twitter slows so much that I can watch their code (with archeological code flashing up and going away) execute. Typing there is slower, but not ridiculous. A tweet reply though, the popup window is very slow, and typing is mildly affected. After I kill Maple, Twitter goes back to normal.

**But typing in a Java based editor that is a flatpak installation is fine---very fast and unaffected. I suppose that could be a cure? Have the Linux install be a flatpak? I am wondering if flatpak was invented to end issues like this?

@TechnicalSupport

Linux Mint: Operating System: Linux Mint 20.2 Kernel: Linux 5.4.0-124-generic

All Linux Mint updates contained Java changes.
I had a Linux Mint update manager update 03/25/2022. I reported this on 03/28/2022. But it had been happening for weeks. It may have gotten worse, but I don't think so as far as my memory serves.
This problem improved, which is why I stopped posting about it. I think this was after I installed Linux Mint updates 04/30/2022.

My next update was 06/04/2022, and IiRC it got worse, but I was able to work.
Next update was 07/14/2022. The problem become more manageable. Improved a lot.

Then, the problem came back with a vengeance, after installing updates 08/16/2022.
This time, I have gone to the point of breaking out a section of work into a small file. Just 3 sections, about a page and a half.

And, it takes maybe one to 2 hours before Maple becomes unusable. The only way to fix it is to kill Java, which knocks down Maple. Then restore backup and go again. Prior to this, small files I could go all day.

This fits some kind of battle between two Java implementations. Something was done that somebody liked, and that broke someone else's implementation. I suspect the old implementation got stepped on, and those maintainers fixed the "bug" that was a feature to somebody else. I suspect it has gone back and forth like that, and this time whoever did the original "feature" got mad and renovated everything in the area.
It's possible the new way for Java to work is the way it is supposed to operate now. Or, it could be some newbie tromping around breaking things. I don't know, and don't have the ability to go further. But I suggest that bug chaser looks in that direction.
I can send you all my update logs, which may help figure this out.

This needs to be fixed with an update. It is not acceptable behavior for this product. Period. This kind of thing is a beta test issue.  I have built very large worksheets in Maple in past versions without this kind of problem.

If I start a new worksheet, that edits normally. I have a new instance of the engine for each worksheet. This unacceptable behavior is a change. Fix it.

I had a strange event occur about half an hour ago. I switched over to watch the CPU hog behavior that flatlines all 8 CPUs at near 100% utilization for 10 to 30 seconds from a single keystroke. In the process list, Java was running at 60%, but not using extraordinary amounts of memory. I double clicked on it to get into open files, and  a blue link appeared that was somehow active. So I clcked on that. This opened a new worksheet in Maple, with the name Mapleportal. That was very curious. It suggests that perhaps Mapleportal is involved in the loop that is slowing performance. I was running the System Monitor full screen.

Have you looked at the CPU utilization graphs I supplied? I doubt it. Please do. Click on my links and pay attention please.

 

This behavior is reminding me of when I issued a product over 20 years ago and the debug version went out live.  It wasn't the same, but it had strange behavior that would only show up after intensive use. And it was slower than  usual.

And there was another time a decade before that (this one wasn't me) that a dll got linked in that had code in it for debugging a problem. But somehow the debug dll was put into the production link library. But the source code for that module with debug code in it was not checked in. This one was cured by a complete rebuild after wiping all the compiled modules, after figuring out that a dll was the wrong size.

Just asking the questions. It occurs to me that this 2022 version is probably the first time that Maplesoft has delivered a product that was almost certainly developed almost entirely remotely. So different procedures are going to be in practice than they were for all previous versions. Yes, in theory, checking code in and building it should work the same way. But theory and practice can differ.

Yes, I used to manage software development. I was director of development for Tradeyard, and the same for Konnectworld. The latter was an outsourcing firm. So I got familiar with many ways that Murphy's law could operate in remote work.

Please note that for this, I have executed just about 200 lines of Maple code in a large file. I tried this strategy of only executing the absolute minimum to see if it would help. It doesn't help a lot. It may go longer before becoming unusable, but it still stops.

Right click on the popup menu now, after a few executions of a section, and instead of the fragmented menu problem that takes 3-5 tries to be able to move the cursor to Axes/Properties, there is just - nothing. No menu at all.

Here is the CPU utilization for popup not appearing. All CPUs 100% utilized.
https://drive.google.com/file/d/1fxkwBql9IDtZJY_9c2jeKFjtJQxgpAjc/view?usp=sharing

I deleted something, and it took a while. Here is the CPU utilization for a simple deletion that should be less than 1 second. Milliseconds should be the time it takes. Here, again, nearly 100% utilization of nearly every CPU.

https://drive.google.com/file/d/1qiyxvId8PpjTcdhQijnoI4K_BVNYEmYN/view?usp=sharing

 

Thank you Edgardo.
I checked those options, autosave 3 minutes is on. So is save file. But, I can't see any backup files that are obvious.
I use Linux Mint 20.2.
There are two main probably related, problems: 

1. Editor becoming unusable due to slowdown. This problem requires working on the file for 3-5 hours. It may be exacerbated by using another java intensive program, but that's unclear. In the context of getting toward slowdown, I have seen other problems appear.
1.A. Right click of context menu on a plot. At first, the menu works fine. But after a while, it is impossible to access the secondary menu until the 2nd or 3rd time. I can't take a screen print because part of the secondary menu stays visible, although the primary context menu is gone. Screen print won't work until I click somewhere off the scrap of secondary context menu.
1.B. Strange cursor behavior. Usually, it has the odd behavior of inserting at the end of the preceding line. But it may insert at the beginning of the line before. It may type my text on more than one line simultaneously. (That was weird. The text was really there.)

2. Saving at slowdown may output a corrupted file. This happened once out of some 12 -15 restarts and work sessions until slowdown unusability. I clicked on it a couple of times.

Reproducing the problems:
I can get you the file directly. It is for a manuscript and embargo applies. I cannot publish it to a fairly public forum. I sent  you a contact email, and I'll respond with a link to the current file and the corrupted one.
1. When Maple loads, it is fine. The editor functions like its normal 2 decade old designed self.

I have been watching java's memory consumption. When it hits 1.2 GB, I look to tidy things up and shutdown then restart. If I do that by 1.5 GB it's worked.

1 2 Page 1 of 2