nanhung / pksensi

An R package for applying global sensitivity analysis in physiologically based kinetic modeling
https://nanhung.github.io/pksensi/
GNU Lesser General Public License v3.0
5 stars 3 forks source link

mcsim installation issue #9

Closed nreid closed 1 year ago

nreid commented 2 years ago

Hello,

I was trying to install this software for a user of a computer cluster, and users don't have access to the usual install directories. I have a couple of comments:

1) it would be nice if you could just tell pksensi where to keep the compiled mcsim software and to look for it there, rather than actually require it to be installed. It seems I can get around this by just setting the PATH variable within R to include the mcsim directory, but this also requires me to manually edit the mcsim code and compile it to reflect the mxstep parameter you recommend, rather than using the mcsim_install() function you provide.

2) Perhaps more importantly, I think it's inappropriate to ask users for their password and then use it to run sudo inside a function. I don't think your software is doing anything malicious, but this kind of system modification from within an R package is a security issue and generally not good practice.

nanhung commented 2 years ago

Hello,

Many thanks for the recommendation. Sorry for the late reply, I just fixed the issue in mcsim_install() and compile_model(). In the latest version, the user will not be asked to install MCSim with administrative privilege. The assignment directory is the location that will be used to keep compiled MCSim software (bin, lib, include, and share folder). These files are kept in the folder named "mcsim" (without the version number). You can set the PATH after install mcsim at your prefer location. For example, the default location is home. You can use the following script to set the PATH.

export PATH=$PATH:$HOME/mcsim/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/mcsim/lib

I will do additional testing to make sure everything can run well. Thanks again!