segfault

145 Reputation

5 Badges

2 years, 206 days

MaplePrimes Activity


These are questions asked by segfault

How do add two or more variables to the save command ?

e.g.  the following works for one variable

number:=1;
A:=5;
fname:=sprintf("file(%a)",number);
save A, fname;

but how do you e.g. add another variable to the fname ?

Lets say I want  to add the contents of another variable say Var2
 

number:=1;
A:=5;
Var2:="b";
fname:=sprintf("file(%a)_Var2",number);

save A, fname

How do I do that ?

On a similar track,

If you have a worksheet that contains a calculation and results that took very long to complete and saved with all the results, is it possible to load the maple worksheet, and let maple load all the results  and not execute all the commands.

Thereby you can immediately work further and dont have to completely recalculate the worksheet. ?

Basically a resume function for the worksheet. Will save a huge amount of time and I cannot see a reason why the worksheet cannot load just using the previously calculated results in the document.

Is there an easy way to convert a maple worksheet to a command line .mpl file to be executed from command line?

Basically strips all the comments and just keep the commands.in the .mpl file.

The exports in the Maple interface do not produce command line executable code.

It is ok if there is a third party script also to do this.

Relative path does not seems to work on Linux.
 e.g. consider the read command
 `read  "/home/harpo/skits/slapstick/boguscalculus.mw"

At the moment I have to enter the full path above as stated to be able to read in "boguscalculus.mw"

This highly unfortunte, as generally you want to specify a path, independent of the home path.

That would mean

read "~/skits/slapstick/boguscalculus.mw"   , but this does not work. Any idea why ?

Furthermore using "currentdir" to set the current directory, I also have to use the full path from root "\" which is highly unusual.

Lastly given that I set a current directory with currentdir, how do I use the currentdir to read a file inside currentdir with read command ?

e.g.

currentdir "/home/harpo/skits"
how do I read the file in a worksheet using from the  currentdir

e.g. it should be

read "slapstick/boguscalculus.mw"

But that doesnt work either.

It is not clear to me how to set up parallel processing for let's say 10 completely independent tasks/processes process1,process2 .....process10

Further, no communication between the 10 tasks/processes, process1,process2 .....process10, takes place and they only use  previously calculated functions and variables in the worksheet.

So how do you set up the 10 processes to run in parallel using proc or grid.  ??

I cannot make out from the examples in the manual how and where the processes are run.

1 2 3 4 5 6 7 Page 2 of 9