Background


Scope

Perl-speaks-NONMEM (PsN), Pirana and bbi/bbr are tools to manage modeling and simulation projects, and they each come with a variety of options for executing commands. Below we discuss running NONMEM via PsN/Pirana or bbi/bbr, and some of the capabilities and pitfalls for each set of tooling.

PsN & Pirana

PsN is a collection of tools that aid in developing nonlinear mixed-effects (NLME) models using NONMEM. Installation instructions and documentation can be found here. Users interact with PsN via the command line. PsN has a long list of statistical tooling for pharmacometric analyses. Its limitations are few, but it’s not as concise or user friendly as other tools. Pirana is a graphical user interface (GUI) that allows users to manage models, pass PsN commands to run NONMEM, and utilize Xpose/R functionality to generate diagnostic plots.

bbi/bbr

bbr is an open-source R package for interacting with the bbi Go library. bbr was developed by MetrumRG to serve three primary purposes:

  • Submit NONMEM models, particularly for execution in parallel and/or on a high-performance compute (HPC) cluster (e.g., Metworx).
  • Parse NONMEM outputs into R objects to facilitate model evaluation and diagnostics in R.
  • Annotate the model development process for easier and more reliable traceability and reproducibility.

For more information, as well as tutorials, please visit NONMEM via bbr/bbi or our Getting Started article.

Versions of NONMEM

Both PsN and bbr can point to all installed versions of NONMEM, as shown in the examples below.

Check NONMEM version in PsN

If you have PsN installed, find out which versions of NONMEM you have installed by entering psn -nm_versions in your terminal:

Valid choices for option -nm_version (see 'psn_options -h nm_version' for details):

nm75_nmfe                 (/opt/NONMEM/nm75,7.5)
default                   (/opt/NONMEM/nm75,7.5)
nm74_nmfe                 (/opt/NONMEM/nm74gf_nmfe,7.4)
nm73_gf                   (/opt/NONMEM/nm73gf,7.3)
nm74_gf                   (/opt/NONMEM/nm74gf,7.5)
nm73_nmfe                 (/opt/NONMEM/nm73gf_nmfe,7.3)

The default is /opt/NONMEM/nm75,7.5

The psn.conf in use is /usr/local/share/perl/5.26.1/PsN_5_2_6/psn.conf

To specify the NONMEM version pass -nm_version="nm75" to the execute command. When using NONMEM versions compiled via nmqual, you also need the -nmqual argument.

execute -nm_version="nm74_gf" -nmqual run105.mod

Check NONMEM version with bbi/bbr

To view the list of available NONMEM versions, first download and initialize bbi using the use_bbi and bbi_init functions, respectively (see an example here). Assuming you have set the bbi installation directory to file.path(TEST_DIR, "bbi"), you can then inspect the yaml file using the following command:

installed_versions <- yaml::read_yaml(file.path(TEST_DIR, "bbi.yaml"))$nonmem

To specify the NONMEM version when submitting models pass bbi_args to the submit_model function.

bbr::submit_model(loc_std, .bbi_args = list(nm_version = "nm75))

NONMEM versions available on Metworx

All versions of NONMEM installed on Metworx are available under the path /opt/NONMEM. For example, for nm74gf, the base path is /opt/NONMEM/nm74gf. No version of nonmem/nmfe is available by default on the user's system path.

For NONMEM 7.3 and 7.4 both nmqual and normal installations are provided. Installations following the naming convention nm7<x>_gf correspond to the nmqual installed version (for backwards compatibility with prior versions of Metworx). nm7<x>_nmfe are the standard install.

The nmqual tool has been deprecated for NONMEM 7.5. It was originally designed to help qualify possible heterogeneous NONMEM configurations. However, this is less relevant for NONNMEM 7.5 given user-defined custom modules are rare and the default configuration is suitable. Additionally, nmqual handled installation, testing, running models, which are now split out into separate stages and managed by independent tools and processes. Hence, NONMEM 7.5 does not have a _gf designated install, and has been simplified to a single install under the path nm75.

Metworx 20.12 & 21.08 Blueprints

NONMEM 7.5 compiled with gfortran is the default NONMEM installation for PsN. The following options are available:

  • nm75: 7.5 gfortran default
  • nm74_nmfe: 7.4 gfortran
  • nm74_gf: 7.4 gfortran + nmqual
  • nm73_nmfe: 7.3 gfortran
  • nm73_gf: 7.3 gfortran + nmqual

Metworx 20.03, 20.04 & 20.06 Blueprints

NONMEM 7.4.4 compiled with gfortran is the default NONMEM installation for PsN. The following options are available:

  • nm74_nmfe: 7.4 gfortran default
  • nm73_nmfe: 7.3 gfortran
  • nm73_gf: 7.3 gfortran + nmqual
  • nm74_gf: 7.4 gfortran + nmqual

Metworx 3.x Performance/Envision

NONMEM 7.4.3 compiled with gfortran is the default NONMEM installation for PsN. The following options are available:

  • nm74: NONMEM 7.4, Intel fortran compiled
  • nm74_gf: NONMEM 7.4, gfortran compiled
  • nm74: NONMEM 7.4, Intel fortran compiled
  • nm72: NONMEM 7.2, gfortran
  • nm73: NONMEM 7.3, Intel
  • nm72_gf: NONMEM 7.2, gfortran
  • nm73_gf: NONMEM 7.3, gfortran