Coder Social home page Coder Social logo

Error assigning nm version about bbr HOT 11 CLOSED

ldbro0 avatar ldbro0 commented on September 26, 2024
Error assigning nm version

from bbr.

Comments (11)

kyleam avatar kyleam commented on September 26, 2024 1

Is there is a way to build the 304 fix?

If you have go installed on your system, you can run make from the top-level directory of the repository https://github.com/metrumresearchgroup/bbi. Make sure the main branch is up to date so that it includes the merge of pr 304.

make will build bbi and install it to ~/go/bin/bbi.

To use the dev version from bbr, you'll need to point bbr to it and tell it to not check the bbi version:

options(
  "bbr.bbi_exe_path" = "~/go/bin/bbi",
  "bbr.DEV_no_min_version" = TRUE
)

You could also test bbi directly from the command line with

~/go/bin/bbi init --dir /apps/nonmem/

We're planning to cut a bbi release in the next week or two. We can consider tagging a pre-release if you have trouble getting the above steps to work; with a pre-release, you could then do bbr::use_bbi(..., .version = "NNN").

from bbr.

OmarAshkar avatar OmarAshkar commented on September 26, 2024 1

@kyleam This solution works for me. Thanks!

from bbr.

kyleam avatar kyleam commented on September 26, 2024 1

@OmarAshkar bbi v3.2.3 is now released. Calling bbr::use_bbi() without a version will pull that in. You can also download it from https://github.com/metrumresearchgroup/bbi/releases/tag/v3.2.3.

@ldbro0 With that release, I'm going to close this bbr issue. From our debugging session, I know that the "directory with period in its name" problem was only one of the issues you were hitting. However, let's follow up with a dedicated issue in the bbi repo once we have something actionable to go on. Thanks.

from bbr.

kyleam avatar kyleam commented on September 26, 2024

bbi_init(.dir = "nonmem/study_id/poppk", .nonmem_dir = "/gstore/scratch/u/id_12345/7.5.0-foss-2017a", .nonmem_version = "nmfe75")
[...]
Must specify a valid .nonmem_version for bbi_init(). nonmem/study_id/poppk/bbi.yaml contains the following options: ``

Underneath, bbi init looks through .nonmem_dir and tries to detect subdirectories for different NONMEM versions (code). Under each of those subdirectories, it looks for things like expected subdirectories, a license file, and an NONMEM executable.

As an example, on Metworx .nonmem_dir is /opt/NONMEM/. Here's how that looks:

$ ls -1 /opt/NONMEM | grep nm
nm73gf
nm73gf_nmfe
nm74gf
nm74gf_nmfe
nm75

$ fd -t f 'nmfe[0-9]+$' /opt/NONMEM
/opt/NONMEM/nm73gf/run/nmfe73
/opt/NONMEM/nm73gf/util/nmfe73
/opt/NONMEM/nm73gf_nmfe/run/nmfe73
/opt/NONMEM/nm73gf_nmfe/util/nmfe73
/opt/NONMEM/nm74gf/run/nmfe74
/opt/NONMEM/nm74gf/util/nmfe74
/opt/NONMEM/nm74gf_nmfe/run/nmfe74
/opt/NONMEM/nm74gf_nmfe/util/nmfe74
/opt/NONMEM/nm75/run/nmfe75
/opt/NONMEM/nm75/util/nmfe75

Based on the error message, it looks like bbi init isn't finding anything. What's the structure of /gstore/scratch/u/id_12345/7.5.0-foss-2017a/? Perhaps you need to remove the rightmost directory level.

Error: Cannot find id_12345/project/r_code/nonmem//id_12345/project/nonmem/study_id/poppk Make sure you are in the correct working directory and have passed the correct path to bbi_init(.dir)

That error message should be improved to not unconditionally append getwd():

bbr/R/bbr.R

Lines 342 to 350 in dbc3fb3

bbi_init <- function(.dir, .nonmem_dir, .nonmem_version = NULL, .bbi_args = NULL, .no_default_version = FALSE) {
# check that destination directory exists
if (!fs::dir_exists(.dir)) {
stop(paste(
glue("Cannot find {file.path(getwd(), .dir)}"),
"Make sure you are in the correct working directory and have passed the correct path to bbi_init(.dir)",
sep = "\n"
), call. = FALSE)
}

However, putting aside the confusing message, that still means that you're passing a .dir value that doesn't point to an existing directory. Have you checked that here("nonmem/study_id/poppk") is returning the path that you expect?

from bbr.

ldbro0 avatar ldbro0 commented on September 26, 2024

Yeah it's an odd folder structure as it's on an HPC system I doctored the files around a bit but it still doesn't work

fd -t f 'nmfe[0-9]+$' /gstore/scratch/u/id_12345/7.5.0-foss-2017a

/gstore/scratch/u/id_12345/7.5.0-foss-2017a/util/nmfe75
/gstore/scratch/u/id_12345/7.5.0-foss-2017a/run/nmfe75
/gstore/scratch/u/id_12345/7.5.0-foss-2017a/nm75/util/nmfe75
/gstore/scratch/u/id_12345/7.5.0-foss-2017a/nm75/run/nmfe75

same error:

 bbi_init(.dir = "nonmem/study_id/poppk",
          .nonmem_dir = "/gstore/scratch/u/id_12345/7.5.0-foss-2017a",
          .nonmem_version = "nm75")
          
Error in bbi_init(.dir = "nonmem/study_id/poppk", .nonmem_dir = "/gstore/scratch/u/id_12345/7.5.0-foss-2017a",  : 
  Must specify a valid `.nonmem_version` for bbi_init(). nonmem/study_id/poppk/bbi.yaml contains the following options: ``

from bbr.

kyleam avatar kyleam commented on September 26, 2024

I doctored the files around a bit but it still doesn't work

Sorry for not being clear. I wasn't suggesting that you modify the layout on disk. I was suggesting that you adjust the path you specify as .nonmem_dir (in particular that you pass the parent directory of what you're currently passing).

For example, assuming 7.5.0-foss-2017a is the installation directory for a particular NONMEM version (like, say, the nm75 directory in my example), then you should pass the parent directory as .nonmem_dir, because bbi init looks underneath this directory for NONMEM installations.

Does this work?

bbi_init(.dir = "nonmem/study_id/poppk",
         .nonmem_dir = "/gstore/scratch/u/id_12345",
         .nonmem_version = "7.5.0-foss-2017a")

from bbr.

ldbro0 avatar ldbro0 commented on September 26, 2024

No luck with this either

bbi_init(.dir = "nonmem/study_id/poppk",
         .nonmem_dir = "/gstore/scratch/u/id_12345",
         .nonmem_version = "7.5.0-foss-2017a")

from bbr.

OmarAshkar avatar OmarAshkar commented on September 26, 2024

@kyleam I also have this problem. My executable location is "/apps/nonmem/7.4.4/run/nmfe74"

from bbr.

kyleam avatar kyleam commented on September 26, 2024

@OmarAshkar

I also have this problem. My executable location is "/apps/nonmem/7.4.4/run/nmfe74"

In your case, it looks like your .nonmem_dir is /apps/nonmem/ and the NONMEM subdirectory for the 7.4 installation is 7.4.4. That directory having a period in its name throws off bbi init. The unreleased version of bbi recently got a fix: metrumresearchgroup/bbi#304

(Note: based an an offline troubleshooting with Logan, that period issue was one of the problems he was running into, and that prompted metrumresearchgroup/bbi#304. However, there is also at least one remaining unresolved issue that seems likely to be specific to his setup. If your problem continues even after bbi 304, please open a dedicated issue in the bbi repo with more details.)

from bbr.

OmarAshkar avatar OmarAshkar commented on September 26, 2024

@kyleam I will wait for the next release. Thanks!

from bbr.

OmarAshkar avatar OmarAshkar commented on September 26, 2024

Hi @kyleam. Is there is a way to build the 304 fix? I cannot find any instruction to build it.

from bbr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.