Sbgrid integration
Calling SBGrid Programs from other Applications
In most cases, it is relatively straightforward to use SBGrid Programs from non-SBGrid applications. Using topaz as an example, create an adapter/wrapper script. You can also refer to the developer's link for more details:
#!/usr/bin/env bash
# activate the environment, so that it doesn't need to be always enabled under the user account running the non-SBGrid program.
source /programs/sbgrid.shrc
# Optionally, specify the SBGrid version of the title.
# Explicit version configuration can help troubleshooting integration issues.
export TOPAZ_X=0.2.5a_cu11.3_py36
# call the executable with original arguments
topaz "$@"
Make this script executable (for example, chmod +x topaz_adapter.bash). Place it somewhere readable and executable by the external program. Use the full path to the script (for example, /programs/local/adapter_scripts/topaz_adapter.bash) when configuring the non-SBGrid program.
Common Problems/Sub-optimal Approaches
- Using the output of
which topaz(/programs/x86_64-linux/system/sbgrid_bin/topaz); this requires the SBgrid environment to be persistently active in the environment/user account of the other program, and makes it ambiguous which version is being used. - Using the output of
sbwhich topaz(/programs/x86_64-linux/topaz/0.2.5a_cu11.3_py36/topaz_extlib/envs/topaz-py3.6/bin/topaz); this may work, but will miss capsule initialization, which may cause avoidable job failures.
Less Common Problems
- The above approach will work for executable calls. It will not usually work for cases where the other program is using the executable path to find library paths to import into a non-SBGrid interpreter or process memory space. If you encounter a case like this (or encounter other problems), please feel free to contact us at
bugs@sbgrid.org.