macOS
The two options, in order of preference, are compiling from source or using Docker. There are a few extra steps required on a Mac versus Linux.
Compiling from Source
Prerequisites
First install the XCode command line tools if you don't have them. Open a terminal and type:
xcode-select --install
Next, install the base Macports system: go to macports.org/install.php and follow the instructions. Then install the readline library:
sudo port install readline
You also need git. If you are not familiar with git see Help with git. Open a terminal and give the command git — if you get an error it is not installed:
sudo port install git
Download the source code using git
Choose a directory to store the source code, navigate there in your terminal, then type:
git clone https://github.com/jeffreyadams/atlasofliegroups.git
This creates a subdirectory atlasofliegroups and stores the files there.
Compile
You need to tell the compiler where to find the readline libraries by setting the shell variable rl_libs. Edit the appropriate dot file in your home directory (.profile, .zprofile, .zshrc, or .cshrc — do ls -a ~ to find it).
Add this line to the file:
export rl_libs="-lreadline -lcurses -L/opt/local/lib"
If the file is .cshrc add this instead:
setenv rl_libs "-lreadline -lcurses -L/opt/local/lib"
Then run source .profile (or whichever file you edited). You can verify with printenv — you should see rl_libs in the output.
On a Mac there is an issue with the compiler finding the correct readline files. To remedy this (requires admin privileges):
sudo cd /usr/local/include
sudo mkdir readline
sudo chmod 755 readline
sudo cp /opt/local/include/readline/* readline
If you don't already have /usr/local/include:
sudo cd /usr/local
sudo mkdir include
sudo chmod 755 include
sudo cd include
sudo mkdir readline
sudo chmod 755 readline
sudo cp /opt/local/include/readline/* readline
Now cd to the atlasofliegroups directory and type:
make
If all goes well you will have an executable file atlas. Give the command:
atlas
You should see something like:
This is 'atlas' (version 1.1, axis language version 1.0),
the Atlas of Lie Groups and Representations interpreter,
compiled on Dec 30 2021 at 16:01:25. http://www.liegroups.org/
Congratulations! Go on to After compiling for the next steps.
You may need to edit the Makefile to change CXX = g++ -std=c++0x depending on your system. The software has been well tested with g++/gcc versions 4.8 and above. If there are readline errors try make readline=false.
After compiling
We recommend running:
make install
This makes atlas accessible from anywhere by putting a shell script in ~/bin. Make sure ~/bin is in your path. The software relies on auxiliary files in atlasofliegroups/atlas-scripts — these are loaded automatically via make install.
We recommend creating a directory atlasofliegroups/my_files and always starting atlas from there:
cd atlasofliegroups
mkdir my_files
cd my_files
atlas
File Input and Output
Atlas looks for files in the working directory and the atlas-scripts directory (or whatever you specify with --path). Output files are always written to the working directory.
Updating the atlas software
In the atlasofliegroups directory:
git pull origin master
If only .at files changed you typically do not need to recompile. If .cpp files changed, run make again.
Using Docker
Docker installs a self-contained Linux container on your machine. Install Docker (community version), then:
sudo docker run -it jeffreyadams/atlasofliegroups:version1.1
This downloads and runs the software. The first time takes a few minutes; subsequent runs are much faster. To update:
sudo docker pull jeffreyadams/atlasofliegroups:version1.1
File Input and Output in Docker
Since Docker runs in a container, extra effort is required for file I/O. Use the -v flag to mount a host directory:
sudo docker run -it -v /host/path:/container/path jeffreyadams/atlasofliegroups:version1.1