-
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.
GLUEX_TOP
is a required environment variable, and is used by hdpm
to set the package directory. It is recommended to add it to your startup script for convenience. This variable will be used throughout the instructions.
setenv GLUEX_TOP /path/to/your/package/directory
You can find download links for the latest release at https://github.com/JeffersonLab/hdpm/releases.
64-bit Linux and macOS binaries are available.
The following commands install hdpm version 0.6.0
, and include a command to download it from the command line.
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.6.0.linux.tar.gz
tar xf hdpm-0.6.0.linux.tar.gz -C .hdpm --strip-components=1
rm hdpm-0.6.0.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 use $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.
Use 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>
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 a version XMLfile:
hdpm select --xml https://halldweb.jlab.org/dist/version_1.30.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 build sim-recon
Then you develop a plugin (for example) and build/test it:
hdpm build sim-recon/master/src/plugins/Analysis/myplugin
hdpm clean sim-recon/master/src/plugins/Analysis/myplugin
hdpm build sim-recon/master/src/plugins/Analysis/myplugin
Next you modify other parts of the code and/or merge the master branch, before cleaning and then rebuilding the whole project:
hdpm update sim-recon
hdpm clean sim-recon
hdpm build sim-recon
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 prebuilt packages:
hdpm install
Rerun this command to update.
To do a development build of sim-recon against the prebuilt dependencies:
hdpm install
hdpm build sim-recon
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