acer

26362 Reputation

29 Badges

16 years, 319 days

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@serge17 

save G, cat(mypath,"foo.m");


 

On a guess (from the error message it gave that contained a slightly different .so file name!) I tried the following:

I copied the file libfgbuni.so to the new name libfgbunid.so in the same location.

The Linux directory I chose (to contain both .so files as well as the FGblib subdirectory) was this:
    /home/acer/mapleprimes/FGb

The I ran Maple 2020 (64bit Linux) and prepended libname with the subdirectory's location.

This is what happened:

restart;
libname := "/home/acer/mapleprimes/FGb/FGblib", libname:

with(FGb);

Path set to /home/acer/mapleprimes/FGb/FGblib/../libfgbunid.so
    FGb/Maple interface package Version 1.68
    JC Faugere (Jean-Charles.Faugere@inria.fr)
    Type ?FGb for documentation
[ModuleUnload, cpu, date, fgb, fgb_gbasis, fgb_gbasis_elim, fgb_gbasis_lm,
    fgb_hilbert, fgb_interface, fgb_matrixn, fgb_matrixn_radical,
    fgb_matrixn_radical2, fgb_multi, fgb_normalForm, pseudo_fgb_normalForm]

fgb_gbasis([x^2+y,y^2+x],0,[x],[y]);
open simulation
                   2       4
                 [y  + x, y  + y]

The tar file from the website unpacked and contained the file libfgbuni.so, but when I tried all the above without copying to the new file name I got only this:

with(FGb);
libfgbunid.so failed
Error, (in pack_fgb_find_path) cannot find a valid path !

That is why I tried copying the file to the new name libfgbunid.so with the name containing the extra character.

This looks like an oversight/mistake by the author (3rd party). Also, I notice that on the webpage the example does not show the printing of the discovered file location.

@serge17 I'm glad that worked for you, and that you have a solution.

The backslash is the "escape" character in a string (eg, "\n" is a new-line character), which is pretty common even without Maple. To get a literal backslash you can thus escape the backslash, so that "\\" denotes one backslash character.

In modern Maple you can use a forwardslash "/" instead, for file locations even on MS-Windows. I am not sure whether that worked in ancient Maple 7 (2001).

@Lisa6 There are no extra or renaming steps of which I'm aware, for the two Library .ind/.lib files. But note that you have not told us what exactly you have done.

The instructions seem simple:
  1) Create a folder, named as your choice.
  2) Put the unpackage (un-tarred) files/folders there.
  3) Run it in Maple by prepending libname with the sublocation that contains the .lib/.ind files
  4) Add that Maple statement (for libname) to a user initialization file, if you want it automatic for other sessions.

If you cannot understand that then I don't really see how you are going to figure out how to use the 3rd package altogether.

If you follow the instructions and it doesn't work then you should ask the author of the 3rd party site. (Maybe that version from 2015 is no longer relevant to Maple 2020, or maybe you made a mistake, etc. You haven't explained why you want something that -- at least in part -- is bunded with Maple proper.)

You haven't told use exactly where you put the files and exactly what steps you took. You haven't! So how could I guess what step you might possible have done wrong?

You issues are all about using a 3rd party's .lib/.ind pair of Library files, adjusting libname to include their location, and having the happen automatically in a user initialization file. Since you asked (a day or so ago) the same questions (which are not so common) have been repeated under another member handle. I really hope that is not you or a close associate.

It will not help to ask the same question over and over (in diferent places), especially without explicit details.

@serge17 Did you try specifying the precise location when you call the save command?

For example,

    save G, "C:\\\\Users\\Serge\\foo.m" ;

or some other location.

@mmcdara Sorry, I interpreted the first part of your question as meaning that you wanted to use it as a predicate (to test for the quality). Now I understand that you want it actually to split the terms.

(I think its a little clumsy to use the a=... and f=... form in the return as you described, but it should be obvious how to change that. It's just a matter of style. It would be a little cleaner without it, I'd suggest.)

This solution uses the same basic mechanisms as my earlier answer: selectremove and depends. Indeed the key part is essentially the same as before, except I use not to switch the position.

I have assumed that you always have an expression which is actually a product, mostly because you didn't state whether you wanted case of a non-product rejected or handled as 1*expression.

restart;

F := proc(ee::algebraic, nm::name)
       Equate([a,f],[selectremove(not depends,ee,nm)]);
end proc:

F( (A+B)*(t^2+y), t );

[a = A+B, f = t^2+y]

F( (A+B)*(t^2+y)*t^5, t );

[a = A+B, f = (t^2+y)*t^5]

F( (t^2+y)*t^5, t );

[a = 1, f = (t^2+y)*t^5]

F( (A+B)*c*(t^2+y)*t^5, t );

[a = (A+B)*c, f = (t^2+y)*t^5]

F( 3*t,t );

[a = 3, f = t]

Download star_split.mw

Without the a=... and f=... aspect the above could be, say,

restart;

F := proc(ee::algebraic, nm::name)
       [selectremove(not depends,ee,nm)];
end proc:

F( (A+B)*(t^2+y), t );

[A+B, t^2+y]

F( (A+B)*(t^2+y)*t^5, t );

[A+B, (t^2+y)*t^5]

F( (t^2+y)*t^5, t );

[1, (t^2+y)*t^5]

F( (A+B)*c*(t^2+y)*t^5, t );

[(A+B)*c, (t^2+y)*t^5]

F( 3*t,t );

[3, t]

Download starsplit2.mw

@Scot Gould The MapleNet backend which this site still uses to render uploaded worksheets dates from the Maple 18 timeframe.

@Lisa6 You get that message for with(FGb) because the directory containing the .lib and .ind files are not part of the value of libname.

 

@Lisa6 Why are you trying to call march on the .lib file?! There is no reason for you to do that. Don't try and Open that file using the Maple GUI.

I already gave you a URL link to the Help page on initialization files in my previous Reply. Did you read it?

Someone just posted a separate Question about initialization files on Linux, to which I posted an Answer. Try reading that.

If you don't know how to create and edit and save a plain text file in your own Linux operating system then I suspect that you are far out of your depth.

@Lisa6 The instructions on that site are reasonably clear.

It instructs you to adjust libname, so that it includes the location of the .lib/.ind files (and it describes doing that in a Maple initialization file, which would make it default for future Maple sessions).

If you don't understand what libname or initialization files are then you could read about them on their help pages. Maple's Help pages are also accessible directly from within Maple.

@tomleslie So what? The expanded form is not the same expression.

It follows that expanding/factoring/combining should be done beforehand by the user, according to intention.

@mapleuser9 Where is your uploaded worksheet, as an attachment here, whic Rouben mentioned?

Please answer my query about the value of libname.

@Lisa6 Why do you have those < and > symbols in the `mv` ?

Surely you're supposed to use the actual locations. You have mixed that up with pseudocode in a generic instruction.

@Carl Love I don't understand what you mean, sorry. The list L was only used to generate CL, and the substitutions depend on CL rather than L, so I don't see why the order of L should matter.

You might also let us know what the value of libname is, in case you didn't actually make a typo.

If libname looks wrong then it might help to know how you launched Maple.

First 67 68 69 70 71 72 73 Last Page 69 of 489