Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
Project: cocalc-sagemath-dev-slelievre
Views: 418346<Chapter Label="Installing-ANUPQ">1<Heading>Installing the ANUPQ Package</Heading>23The ANU <C>pq</C> program is written in C and the package can be installed4under UNIX and in environments similar to UNIX. In particular5it is known to work on Linux and Mac OS X, and also on Windows6equipped with cygwin.7<P/>89The current version of the &ANUPQ; package requires &GAP; 4.8, and10version 1.2 of the &AutPGrp; package. However, we recommend using11at least &GAP; 4.6 and &AutPGrp; 1.5.12<P/>1314To install the &ANUPQ; package, move the file <C>anupq-<A>XXX</A>.tar.gz</C>15for some version number <A>XXX</A> into the <C>pkg</C> directory in which you16plan to install &ANUPQ;. Usually, this will be the directory <C>pkg</C> in the17hierarchy of your version of &GAP;; it is however also possible to keep an18additional <C>pkg</C> directory in your private directories. The only19essential difference with installing &ANUPQ; in a <C>pkg</C> directory20different to the &GAP; home directory is that one must start &GAP;21with the <C>-l</C> switch (see22Section <Ref BookName="ref" Label="Command Line Options" Style="Text"/>),23e.g. if your private <C>pkg</C> directory is a subdirectory of24<C>mygap</C> in your home directory you might type:2526<Listing><![CDATA[27gap -l ";myhomedir/mygap"28]]></Listing>2930where <A>myhomedir</A> is the path to your home directory, which31may be replaced by a tilde. The empty path before the32semicolon is filled in by the default path of the &GAP; home33directory.34<P/>3536Then, in your chosen <C>pkg</C> directory, unpack <C>anupq-<A>XXX</A>.tar.gz</C> by3738<Listing><![CDATA[39tar xf anupq-<XXX>.tar.gz40]]></Listing>4142Change to the newly created <C>anupq</C> directory. Now you need to call43<C>configure</C>. If you installed &ANUPQ; into the main <C>pkg</C> directory,44call4546<Listing><![CDATA[47./configure48]]></Listing>4950If you installed ANUPQ in another directory than the usual 'pkg'51subdirectory, instead call5253<Listing><![CDATA[54./configure --with-gaproot=<path>55]]></Listing>5657where <A>path</A> is the path to the &GAP; home directory. (You can also call5859<Listing><![CDATA[60./configure --help61]]></Listing>6263for further options.)64<P/>6566What this does is look for a file <C>sysinfo.gap</C> in the root directory of67&GAP; in order to determine an architecture name for the subdirectory of68<C>bin</C> in which to put the compiled <C>pq</C> binary. This only makes sense if69&GAP; was compiled for the same architecture that <C>pq</C> will be. If you70have a shared file system mounted across different architectures, then71you should run <C>configure</C> and <C>make</C> for &ANUPQ; for each architecture72immediately after compiling &GAP; on the same architecture.73<P/>7475If you had to install the package in your own directory but wish to use76the system &GAP; then you will need to find out what <A>path</A> is. To do77this, start up &GAP; and find out what &GAP;'s root path is from78finding the value of the variable <C>GAPInfo.RootPaths</C>, e.g.7980<Log><![CDATA[81gap> GAPInfo.RootPaths;82[ "/usr/local/lib/gap4r4/" ]83]]></Log>8485would tell you to use <C>/usr/local/lib/gap4r4</C> for <A>path</A>.86<P/>8788The <C>configure</C> command will fetch the architecture type for which &GAP;89has been compiled last and create a <C>Makefile</C>. You can now90simply call9192<Listing><![CDATA[93make94]]></Listing>9596to compile the binary and to install it in the appropriate place.97<P/>9899<Index Key="ANUPQ_GAP_EXEC" Subkey="environment variable"><C>ANUPQ_GAP_EXEC</C></Index>100The path of &GAP; (see <E>Note</E> below) used by the <C>pq</C> binary (the value101<C>GAP</C> is set to in the <C>make</C> command) may be over-ridden by setting the102environment variable <C>ANUPQ_GAP_EXEC</C>. These values are only of interest103when the <C>pq</C> program is run as a standalone; however, the <C>testPq</C>104script assumes you have set one of these correctly (see Section <Ref Sect="Testing your ANUPQ installation" Style="Text"/>). When the <C>pq</C> program is started from &GAP;105communication occurs via an iostream, so that the <C>pq</C> binary does not106actually need to know a valid path for &GAP; is this case.107<P/>108109<E>Note.</E> By <Q>path of &GAP;</Q> we mean the path of the command used to110invoke &GAP; (which should be a script, e.g. the <C>gap.sh</C> script111generated in the <C>bin</C> directory for the version of &GAP; when &GAP;112was compiled). The usual strategy is to copy the <C>gap.sh</C> script to a113standard location, e.g. <C>/usr/local/bin/gap</C>. It is a mistake to copy the114&GAP; executable <C>gap</C> (in a directory with name of form115<C>bin/<A>compile-platform</A></C>) to the standard location, since direct116invocation of the executable results in &GAP; starting without being117able to find its own library (a fatal error).118119<Section Label="Testing your ANUPQ installation">120<Heading>Testing your ANUPQ installation</Heading>121122<Index Key="ANUPQ_GAP_EXEC" Subkey="environment variable"><C>ANUPQ_GAP_EXEC</C></Index>123Now it is time to test the installation. After doing <C>configure</C> and124<C>make</C> you will have a <C>testPq</C> script. The script assumes that, if the125environment variable <C>ANUPQ_GAP_EXEC</C> is set, it is a correct path for126&GAP;, or otherwise that the <C>make</C> call that compiled the <C>pq</C> program127set <C>GAP</C> to a correct path for &GAP; (see Section <Ref Sect="Running the pq program as a standalone" Style="Text"/> for more details). To run the tests, just type:128129<Listing><![CDATA[130./testPq131]]></Listing>132133Some of the tests the script runs take a while. Please be patient. The134script checks that you not only have a correct &GAP; (at least version1354.4) installation that includes the &AutPGrp; package, but that the136&ANUPQ; package and its <C>pq</C> binary interact correctly. You should see137something like the following output:138139<Log><![CDATA[140Made dir: /tmp/testPq141Testing installation of ANUPQ Package (version 3.1)142143The first two tests check that the pq C program compiled ok.144Testing the pq binary ... OK.145Testing the pq binary's stack size ... OK.146The pq C program compiled ok! We test it's the right one below.147148The next tests check that you have the right version of GAP149for the ANUPQ package and that GAP is finding150the right versions of the ANUPQ and AutPGrp packages.151152Checking GAP ...153pq binary made with GAP set to: /usr/local/bin/gap154Starting GAP to determine version and package availability ...155GAP version (4.6.5) ... OK.156GAP found ANUPQ package (version 3.1) ... good.157GAP found pq binary (version 1.9) ... good.158GAP found AutPGrp package (version 1.5) ... good.159GAP is OK.160161Checking the link between the pq binary and GAP ... OK.162Testing the standard presentation part of the pq binary ... OK.163Doing p-group generation (final GAP/ANUPQ) test ... OK.164Tests complete.165Removed dir: /tmp/testPq166Enjoy using your functional ANUPQ package!167]]></Log>168169</Section>170171172<Section Label="Running the pq program as a standalone">173<Heading>Running the pq program as a standalone</Heading>174175<Index Key="ANUPQ_GAP_EXEC" Subkey="environment variable"><C>ANUPQ_GAP_EXEC</C></Index>176When the <C>pq</C> program is run as a standalone it sometimes needs to call177&GAP; to compute stabilisers of subgroups; in doing so, it first checks178the value of the environment variable <C>ANUPQ_GAP_EXEC</C>, and uses that, if179set, or otherwise the value of <C>GAP</C> it was compiled with, as the path180for &GAP;. If you ran <C>testPq</C> (see Section <Ref Sect="Testing your ANUPQ installation" Style="Text"/>) and you got both &GAP; is <C>OK</C> and the link between the181<C>pq</C> binary and &GAP; is <C>OK</C>, you should be fine. Otherwise heed the182recommendations of the error messages you get and run the <C>testPq</C> until183all tests are passed.184<P/>185186It is especially important that the &GAP;, whose path you gave, should187know where to find the &ANUPQ; and &AutPGrp; packages. To ensure this188the path should be to a shell script that invokes &GAP;. If you needed189to install the needed packages in your own directory (because, say, you190are not a system administrator) then you should create your own shell191script that runs &GAP; with a correct setting of the <C>-l</C> option and set192the path used by the <C>pq</C> binary to the path of that script. To create193the script that runs &GAP; it is easiest to copy the system one and edit194it, e.g. start by executing the following UNIX commands (skip the second195step if you already have a <C>bin</C> directory; <C>you@unix></C> is your UNIX196prompt):197198<Listing><![CDATA[199you@unix> cd200you@unix> mkdir bin201you@unix> cd bin202you@unix> which gap203/usr/local/bin/gap204you@unix> cp /usr/local/bin/gap mygap205you@unix> chmod +x mygap206]]></Listing>207208At the second-last step use the path of &GAP; returned by <C>which gap</C>.209Now hopefully you will have a copy of the script that runs the system210&GAP; in <C>mygap</C>. Now use your favourite editor to edit the <C>-l</C> part of211the last line of <C>mygap</C> which should initially look something like:212213<Listing><![CDATA[214exec $GAP_DIR/bin/$GAP_PRG -m $GAP_MEM -o 970m -l $GAP_DIR $*215]]></Listing>216217so that it becomes (the tilde is a UNIX abbreviation for your home218directory):219220<Listing><![CDATA[221exec $GAP_DIR/bin/$GAP_PRG -m $GAP_MEM -o 970m -l "$GAP_DIR;~/gapstuff" $*222]]></Listing>223224assuming that your personal &GAP; <C>pkg</C> directory is a subdirectory of225<C>gapstuff</C> in your home directory. Finally, to let the <C>pq</C> program know226where &GAP; is and also know where your <C>pkg</C> directory is that contains227&ANUPQ;, set the environment variable <C>ANUPQ_GAP_EXEC</C> to the complete228(i.e. absolute) path of your <C>mygap</C> script (do not use the tilde229abbreviation).230231</Section>232</Chapter>233234235