astamm / nloptr

nloptr provides an R interface to NLopt, a free/open-source library for nonlinear optimization providing a common interface to a number of different optimization routines which can handle nonlinear constraints and lower and upper bounds for the controls.
https://astamm.github.io/nloptr/
Other
106 stars 34 forks source link

Installing nloptr on clusters using SLURM #118

Closed lsaverbio closed 2 years ago

lsaverbio commented 2 years ago

I am a graduate student in genetics and doing my best to understand understand R, not along having to deal with understanding how to deal with this package. I have a large data set so I use Crane through my institution and then go into a R module. From the threads, I am suppose to install cmake? Is this while in the R module or outside? There are certain permissions I may or may not have to even do this. I have spent days trying to install nloptr and really need help.

lsaverbio commented 2 years ago

So I figured out that I an use loptr on my R studio desktop but just not on the terminal. I do not have permission through my university to use 'sudo'. I've contacted the computing center here about this issue. Maybe they can help with the cmake issue..

lsaverbio commented 2 years ago

Update: spoke to the computing center here and they created a module for Cmake. Just simply have to load the module before going into the R environment. Just leaving this here in case anyone else runs into this type of issue.

eddelbuettel commented 2 years ago

Can you please edit your posts and subject to show correct terminology so that we are all on the same page

Thanks.

astamm commented 2 years ago

@lsaverbio Please implement what @eddelbuettel suggests. I will close this issue by the end of the week.

eddelbuettel commented 2 years ago

Thanks @astamm. I don't think I can edit here. Can you maybe at least fix the Subject: of the thread?

astamm commented 2 years ago

Should be better now. I cannot edit the content though.

astamm commented 2 years ago

I could edit his post in fact. But that would require a fair amount of rewriting and I am not sure this issue will be helpful for others.

lsaverbio commented 2 years ago

Crane is correct. The cluster at UNL is called crane. Should I just delete this if so unhelpful? -Sarah

On Sat, May 21, 2022, 4:56 PM Dirk Eddelbuettel @.***> wrote:

Thanks @astamm https://github.com/astamm. I don't think I can edit here. Can you maybe at least fix the Subject: of the thread?

— Reply to this email directly, view it on GitHub https://github.com/astamm/nloptr/issues/118#issuecomment-1133774090, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZE745BXEX45UXNYHOLW6JTVLFLZJANCNFSM5WFXKCIQ . You are receiving this because you were mentioned.Message ID: @.***>

astamm commented 2 years ago

Glad to finally hear from you. I sense I might have offended you, and, if it is the case, I apologise. An issue is helpful to people if

  1. it is clearly stated; and,
  2. it is not single user specific.

In this case, both seem not to be fulfilled but we lack information to judge the second point given that the first point is still unmet.

The issue seems at best useful for people using your Crane cluster but Crane/UNL are very specific to you as a student there.

The relevant part I think is how to install nloptr on a cluster that uses slurm with resources installed as slurm modules. In particular,

astamm commented 2 years ago

Let me know if I correctly understood your problem and stated the issue well.

astamm commented 2 years ago

Note that in the case you load cmake, the version should be at least 3.15.

lsaverbio commented 2 years ago

To how relevent: anyone using a cluster/super computer to process their data.

Yes, the code that you listed would work by loading the most current cmake and R modules and then downloading the nloptr package. Only difference for how I downloaded nloptr is that I installed while in the R module and simply did install.packages(..path to file).

Thanks, Sarah

On Sun, May 22, 2022, 4:01 AM Aymeric Stamm @.***> wrote:

Glad to finally hear from you. I sense I might have offended you, and, if it is the case, I apologise. An issue is helpful to people if

  1. it is clearer stated; and,
  2. it is not single user specific.

In this case, both seem not to be fulfilled but we lack information to judge the second point given that the first point is still unmet.

The issue seems at best useful for people using your Crane cluster but Crane/UNL are very specific to you as a student there.

The relevant part I think is how to install nloptr on a cluster that uses slurm with resources installed as slurm modules. In particular,

  • either the nlopt library is already installed with version >= 2.7.0 in which case you should do

module load nlopt module load R R CMD INSTALL nloptr_2.0.2.tar.gz

  • or it is not or too old in which case you should do

module load cmake module load R R CMD INSTALL nloptr_2.0.2.tar.gz

— Reply to this email directly, view it on GitHub https://github.com/astamm/nloptr/issues/118#issuecomment-1133850854, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZE745FRBYK4FVHPLOVDSSLVLHZWPANCNFSM5WFXKCIQ . You are receiving this because you were mentioned.Message ID: @.***>

astamm commented 2 years ago

To how relevent: anyone using a cluster/super computer to process their data.

Yes, we ended up understanding that but that was not written like that in the issue title and first post. Anyway, thanks for reporting that. It seems it boils down to knowing how to use a cluster with slurm modules. Not really an nloptr issue then.