Precompiled binaries are not available.
Warp can be built and installed on Linux and Mac OSX. It is not supported on Windows. Several packages are needed to install and run Warp. Below are instructions on how to install the various packages. This assumes that Python is already installed. Note that depending on where Python is installed, root privilege may be needed to install the packages. On Mac OSX, XCode and it's development package need to be installed, as well as XQuartz. Warp is compatible with Python3.
If you do not have root privileges, all of the packages can be installed in your home directory by adding the "--user" option when installing, i.e. using the command "python setup.py install --user". For how to do this with Warp, see the comments below. Note that with --user, there is no need to set PYTHONPATH.
On OSX, a recommended method of installation is to use the Python installed under HomeBrew, http://brew.sh. This offers a number of advantages, including not needing sudo, the Python includes pip for easy package installation, and allows easy install of gfortran (as part of the gcc package), openmpi, and git among other things. After installing brew, you will need to do the following (gcc includes gfortran, and openmpi is only needed for running in parallel).
Note that the directories "/usr/local/bin" and "/usr/local/opt/python/libexec/bin" need to be added to your execute path ahead of "/usr/bin" in order to use the correct Python.
Alternatively, Warp can be installed using Anaconda, which provides a extensive set of Python packages.
Numpy is the numerics package for python. On most variants of Linux, this can be installed using the package manager, such as yum. It is pre-installed in the built in version of Python on Mac OSX. It can also be installed using the Python package managers, pip or easy_install. For example,
Forthon provides the glue linking Fortran and python. It must be installed first before Warp can be built. It can be installed using pip:
Alternatively, it can be downloaded using git, "git clone https://github.com/dpgrote/Forthon.git". After downloading it, cd into the Forthon directory and run "python setup.py install", using the same Python that will be used with Warp.
Warp can be downloaded from bitbucket, https://bitbucket.org/berkeleylab/warp/downloads. Download and extract the tar ball from the most recent release (not the "Download repository" link). It is very likely that an update will be necessary. This can be done using git - cd into the warp directory created from the tar ball and run the following command:
This will connect to the Warp repository and download any updates that were not included in the tar file.
Inside of the warp directory will be pywarp90 which contains the Fortran source and scripts which contains the Python source. The installation is done in the pywarp90 directory.
The fortran backend of Warp is called pywarp90, which can be compiled for single- or multi-processor support. The compilation requires a fortran compiler - the recommended one is gfortran. The following will build the serial, single processor, version and install Warp into Python's site-packages directory, including the Warp scripts.
If a modification of the make process is needed, create a file call Makefile.local (or Makefile.local3) and put the modifications there instead of changing Makefile.Forthon. For example, putting this line in Makefile.local will will set it so that Warp is installed in your home directory.
When installing the parallel version of Warp in an environment that has the command mpifort available, no extra setup is needed. Use this command with Python2
and this with Python3
If mpifort is not available, the compiler type and compiler executable need to be specified in a file called Makefile.local.pympi (or Makefile.local3.pympi for Python3). For example, add these lines:
Also create a file setup.local.py to add the include and library paths for the Fortran libraries. (This is needed since the final linking will be done by a C compiler which may not know which mpi libraries are needed for Fortran.) For example:
After this you can compile and install the parallel version by using "make pinstall" or "make pinstall3".
Parallel Warp needs the mpi4py package, which can be installed using pip.
Updating an existing warp installation
Any updates to Warp can be downloaded using git. The following will update both the serial and the parallel versions (starting in the top directory of warp):
pygist is the plotting package that is used by Warp. It can be obtained from https://bitbucket.org/dpgrote/pygist.
Note that there are other versions of pygist available elsewhere but they will likely not work with Warp since some special coding is needed.
For installation, the X11 header files need to be installed, for example by installing the X11 devel package under Linux.
This will install the python interface as well as the cgm file viewer, gist:
Opyndx is an optional package that provides 3-D visualization tools for Warp. It requires that the OpenDX libraries be installed. Opyndx can be obtained from git.
It is built with the usual installation method for Python packages. Note that the setup.py file may need to be edited in order to specify the location of the OpenDX installation.
Posinst provides routines for handling secondary emission of electrons from impact on surfaces, developed for electron-cloud physics. The source can be obtained by special request. There are several ways to build posinst. For Warp related usage, the following will compile the code and install it into the usual location for python modules.
SciPy is a full fledged scientific numeric package, which contains many useful tools. For Warp, it is only need for optional beam matching scripts. It can be installed using the pip python manager:
After Warp is installed, there are test scripts that can be used to verify that it is functioning properly. Go into the directory warp/warp_tests and run the following command:
This will run the tests - it's output will be a list of each test as it runs, hopefully saying "OK". If there are any problems, there will be output showing the test that failed and the error. It shouldn't take more than a minute or so to run the tests.