Glowing

70 Reputation

4 Badges

5 years, 221 days

MaplePrimes Activity


These are replies submitted by Glowing

@tomleslie 

It seems you have somewhat prejudice in DocumentTools[RunWorksheet]( )?

You say DocumentTools[RunWorksheet]( ) is not good, but can you just back up yourself by explaining specifically why it is not good in the situation here?

@ Dr. Venkat Subramanian 256

Thanks for your replying!

It’s a great relief to see someone knowing what I want!

 

@tomleslie 

Thanks for your replying!

This maple code was written several years ago, targeting for solving a specific scientific problem in our research program.

Recently, I need to use it to calculate this scientific problem under various conditions.

Surely I can run it over and over manually to get all the results, but I just wish to have a script or something to make this process automatically.

Therefore, DocumentTools[RunWorksheet]( )  seems to be the optimum option under such circumstance.

@tomleslie

 

Thanks for your so detailed replying with a solution that can fix this problem!

Besides, I have gone over the help document and find the function “DocumentTools[RunWorksheet]( )” can readily accomplish the job here. Actually, I deem it is specifically designed to serve for this purpose.

 “DocumentTools[RunWorksheet]( )” seems to be a more elegant way.

 

@bmartin 

Thanks for your replying!

I have gone over the help document and find the function “DocumentTools[RunWorksheet]( )” can readily accomplish the job here. Actually, I deem it is specifically designed to serve for this purpose.

@acer 

Thanks for your replying!

I have gone over the help document and find the function “DocumentTools[RunWorksheet]( )” can readily accomplish the job. Actually, I deem it is specifically designed to serve for this purpose.

One again, I have to repeat if the procedure, which requires the whole code contained into one single execution group, is adopted, it would be inconvenient to revise and debug the code within the procedure.

In the effective programming nowadays, modularization is of the key, which means you should code each module separately and save it in each single file, then organize them together by calling them in another so-called backbone code.

In my problem here, I have accomplished the module and I just want to call this module again and again with different parameters in another backbone code.

Do you ever think it’s practical to accomplish a very complicated calculation in just one file?

 

@tomleslie 

This utility can be readily achieved in Matlab with the aid of the M file.

Is there anything similar to the M file in Matlab?

 

@tomleslie 

Thanks for your replying!

I just want the whole code to be executed multiple times.

The code is as long as several hundred lines and has a nested loop structure, the varied parameter is just at the top level of the nested loop structure

It would be inconvenient to include the whole code into one single execution group which seq( ) or proc( ) requires.

 

@tomleslie

Thanks for your reply!

There are two modes in Maple, the worksheet mode and the document mode

This error won’t happen in the worksheet mode, but it will happen in the document mode.

 

@Christopher2222

Thanks a lot! 

This DIY Convert( ) is great!

@Carl Love 

Thanks a lot for your reply!

Do your words mean you’re planning to add a new function to Maple? If so, it’s wonderful!

You may add a setting term in the Preference to specify how the floating number is displayed, or add an option to convert( ) to reserve the original form of a floating number .   

@tomleslie 

Thanks a lot!

@tomleslie 

 

Thanks a lot for your reply!

 

After limiting the number of CPU cores used by the OS to 2 in the BIOS, the problem just disappeared.  

 

“it *seems* to be spread across all 8 cores, but none of these hits a cpu usage of much more than about 30%.”

This phenomenon due to the power saving technology by Microsoft and is widely used in modern OS.

 

By the way, i7-3770K is a 4-core CPU, not 8-core. The only 8-core i7 now available is i7-5960X, which is far more expensive than the average i7 and seldom people would buy it because it’s really cost-ineffective.

@Carl Love 

Thanks a lot for your detailed reply, really so sorry for not noticing the cos( ) isn’t thread-safe.

The result of the code you’ve provided on my E5 workstation is as the following,

 

memory used=130.73MiB, alloc change=85.31MiB, cpu time=21.78s, real time=1.73s, gc time=296.40ms

[40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40]

 

while the result on my i5 laptop is,

 

memory used=3.55GiB, alloc change=0 bytes, cpu time=100.31s, real time=32.89s, gc time=13.69ms

 [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4]

 

 

Because the E5-2687W v3 support Hyper-threading, 20 cores means 40 threads.

To observe the CPU usage on my E5 workstation, I change the last parameter into (2000$20), the CPU usage is about 60%.

 

One more strange thing is that the memory used on my laptop reported by Maple is 3.55GB, this can’t be true, because the memory used reported by the task manager of Windows 7 is just 0.12GB.

One my another laptop with i7-4510U CPU,  the memory used reported by Maple is 5.29GB, while that reported by the task manager of Windows 7 is still just 0.12GB.

Could I say this is a new bug of Maple?

 

@acer 

The problem is that when Maple solving a second-order linear ODE, a*y”(t)+b*y’(t)+c*y(t)=x’(t), in the complex domain , where a,b,c are constants, x(t) is a piecewise complex function, but being continuous and smooth in its whole domain of definition.

 

The solution from Maple will contain indefinite integrals, after applying “value( )  assuming continuous” to the solution, the answer returned by Maple isn’t continuous at the boundary points.

 

1 2 3 4 Page 1 of 4