-
Notifications
You must be signed in to change notification settings - Fork 2
Usage
The following instructions assume a 64-bit Linux user working in a tcsh
shell, but bash
is also supported.
The GLUEX_TOP
environment variable is used by hdpm
as the package directory, and thus must be set prior to using hdpm. It is recommended to add it to your startup script (or equivalent) for convenience.
setenv GLUEX_TOP /path/to/your/package/directory
You can find download links for the latest release at https://github.com/JeffersonLab/hdpm/releases.
x86-64 Linux and macOS binaries are available.
The following commands install hdpm 0.7.3
to the $GLUEX_TOP/.hdpm directory.
If you have already installed hdpm 0.6.0
or later, you can proceed to the next section.
macOS users should replace linux
with macOS
in the following commands.
cd $GLUEX_TOP && mkdir -p .hdpm
curl -OL https://halldweb.jlab.org/dist/hdpm/hdpm-0.7.3.linux.tar.gz
tar xf hdpm-0.7.3.linux.tar.gz -C .hdpm --strip-components=1
rm hdpm-0.7.3.linux.tar.gz
To put hdpm in your PATH:
source .hdpm/setup.csh
Add GLUEX_TOP
and HALLD_MY
(optional) to your startup script (or equivalent).
Add the hdpm binary to your PATH in that same script:
setenv PATH $GLUEX_TOP/.hdpm/bin:$PATH
Alternatively, you can source $GLUEX_TOP/.hdpm/setup.csh to set up your initial environment.
Starting with hdpm 0.6.0
, update hdpm to the latest release with
hdpm selfupdate
This command updates the binary in the $GLUEX_TOP/.hdpm/bin directory.
Run hdpm version
to verify that the new version is first in your PATH (rehash if needed).
To show available commands:
hdpm
To see usage:
hdpm help <command>
For online access to help messages, see the Commands page.
If you are doing an initial build on a new system or otherwise think you could be missing prerequisites, see Installing Prerequisites.
Show prerequisites by running
hdpm show -p
If you are working on the JLab CUE, please visit the Usage on JLab CUE page for instructions.
To write the default package settings to the $GLUEX_TOP/.hdpm/settings directory:
hdpm select master
To customize the package settings, edit the JSON files in the settings directory.
To save your package settings:
hdpm save <settings-id>
To select a group of package settings:
hdpm select <settings-id>
To set your versions using the latest version XMLfile:
hdpm select --xml https://halldweb.jlab.org/dist/version.xml
The following cycles are typical in usage of hdpm.
The intermediate steps of editing and running the code being developed are not indicated in the commands below.
First you do an initial build:
hdpm install
Then you develop a plugin (for example) and build/test it:
hdpm install sim-recon/master/src/plugins/Analysis/myplugin
hdpm clean sim-recon/master/src/plugins/Analysis/myplugin
hdpm install sim-recon/master/src/plugins/Analysis/myplugin
Next you modify other parts of the code and/or update the master branches, before cleaning and then rebuilding the whole project:
hdpm fetch
hdpm clean
hdpm install
Then you start on a new line of development.
hdpm can install a distribution of prebuilt packages.
This is mainly intended for use outside of the JLab CUE.
If you are working on the JLab CUE, use the group builds instead.
To install the latest distribution of prebuilt packages:
hdpm install --dist
Rerun this command to update.
To do a development build of sim-recon and friends against the prebuilt dependencies:
hdpm install --dist
hdpm install
To set up the GlueX environment (default settings id):
source $GLUEX_TOP/.hdpm/env/master.csh
To use sim-recon binary distribution:
source $GLUEX_TOP/.hdpm/env/dist.csh
To set or unset (-u option) GlueX env variables:
eval `hdpm env`
eval `hdpm env -u`
For bash:
eval "$(hdpm env)"
eval "$(hdpm env -u)"