The PCQA is written in C and the package can only be installed under UNIX. It has been tested on SUNs running SunOS and on IBM PCs running FreeBSD 2.1.0. It requires the GNU multiple precision arithmetic. Make sure that this library is installed before trying to install the PCQA.
If you got a complete binary and source distribution for your machine, nothing has to be done if you want to use the PCQA for a single architecture. If you want to use the PCQA for machines with different architectures skip the extraction and compilation part of this section and proceed with the creation of shell scripts described below.
If you got a complete source distribution, skip the extraction part of this section and proceed with the compilation part below.
In the example we will assume that you, as user gap
, are installing the
PCQA package for use by several users on a network of two SUNs, called
bert
and tiffy
, and a NeXTstation, called bjerun
. We assume that
GAP is also installed on these machines following the instructions
given in Installation of GAP for UNIX.
Note that certain parts of the output in the examples should only be taken as rough outline, especially file sizes and file dates are not to be taken literally.
First of all you have to get the file pcqa.zoo
(see Getting GAP).
Then you must locate the GAP directories containing lib/
and doc/
,
this is usually gap3r4p?
where ?
is to be be replaced by the patch
level.
gap@tiffy:~ > ls -l drwxr-xr-x 11 gap gap 1024 Nov 8 15:16 gap3r4p3 -rw-r--r-- 1 gap gap 106307 Jan 24 15:16 pcqa.zoo
Unpack the package using unzoo
(see Installation of GAP for UNIX).
Note that you must be in the directory containing gap3r4p?
to unpack
the files. After you have unpacked the source you may remove the
archive-file.
gap@tiffy:~ > unzoo -x pcqa.zoo gap@tiffy:~ > ls -l gap3r4p3/pkg/pcqa -rw-r--r-- 1 gap gap 3697 Dec 14 15:58 Makefile drwxr-xr-x 2 gap gap 1024 Dec 14 15:57 bin/ drwxr-xr-x 2 gap gap 1024 Dec 14 16:12 doc/ drwxr-xr-x 2 gap gap 1024 Dec 15 18:28 examples/ -rw-r--r-- 1 gap gap 11819 Dec 14 13:31 init.g drwxr-xr-x 2 gap gap 3072 Dec 14 16:03 src/
Switch into the directory src/
and type make
to compile the PCQA. If
the header files for the GNU multiple precision arithmetic are not in
/usr/local/include
you must set GNUINC
to the correct directory. If
the library for the GNU multiple precision arithmetic is not
/usr/local/lib/libgmp.a
you must set GNULIB
. In our case we first
compile the SUN version.
gap@tiffy:~ > cd gap3r4p3/pkg/pcqa/src gap@tiffy:../src > make GNUINC=/usr/gnu/include \ GNULIB=/usr/gnu/lib/libmp.a#
you will see a lot of messages
If you want to use the PCQA on multiple architectures you have to move the executable to unique name.
gap@tiffy:../pcqa > mv bin/pcqa bin/pcqa-sun-sparc-sunos
Now repeat the compilation for the NeXTstation. Do not forget to clean up.
gap@tiffy:../pcqa > rlogin bjerun gap@bjerun:~ > cd gap3r4p3/pkg/pcqa/src gap@bjerun:../src > make clean gap@bjerun:../src > make#
you will see a lot of messages gap@bjerun:../src > mv bin/pcqa ../bin/pcqa-next-m68k-mach gap@bjerun:../src > exit gap@tiffy:../src >
Switch into the subdirectory bin/
and create a script which will call
the correct binary for each machine. A skeleton shell script is provided
in bin/pcqa.sh
.
gap@tiffy:../src > cd .. gap@tiffy:../pcqa > cat bin/pcqa.sh#
!/bin/csh switch ( `hostname` ) case 'bert': case 'tiffy': exec $0-dec-mips-ultrix $* ; breaksw ; case 'bjerun': exec $0-next-m68k-mach $* ; breaksw ; default: echo "pcqa: sorry, no executable exists for this machine" ; breaksw ; endswctr-
D
gap@tiffy:../pcqa > chmod 755 bin/pcqa
Now it is time to test the package.
gap> RequirePackage("pcqa"); gap> f := FreeGroup(2); Group( f.1, f.2 ) gap> ds := CallPCQA( g, 2 ); rec( isDerivedSeries := true, DerivedLength := 2, QuotientStatus := 0, PolycyclicPresentation := rec( Generators := 3, ExponentList := [ 0, 0, 0 ], ppRelations := [ [ [ 0, 1, -1 ], [ 0, 1, 0 ] ], [ [ 0, 0, 1 ] ] ], pnRelations := [ [ [ 0, -1, 1 ], [ 0, -1, 0 ] ], [ [ 0, 0, -1 ] ] ], npRelations := [ [ [ 0, 0, 1 ], [ 0, -1, 1 ] ], [ [ 0, 0, 1 ] ] ], nnRelations := [ [ [ 0, 0, -1 ], [ 0, 1, -1 ] ], [ [ 0, 0, -1 ] ] ], PowerRelations := [ ] ), Homomorphisms := rec( Epimorphism := [ [ 1, 1, 0 ], [ 1, 0, 0 ] ], InverseMap := [ [ [ 2, 1 ] ], [ [ 3, -1 ], [ 1, 1 ] ], [ [ 1, 1 ], [ 3, -1 ] ] ] ), MembershipArray := [ 1, 3 ] ) gap> ExtendPCQA( g, ds.PolycyclicPresentation, ds.Homomorphisms ); rec( QuotientStatus := 5 )
GAP 3.4.4