Giter Club home page Giter Club logo

Comments (7)

Arthfael avatar Arthfael commented on May 27, 2024

Hi. This issues did not seem to get addressed, yet I am encountering it too about 1 year after the original post. I am happy to provide more information on demand.

from ssh.

jeroen avatar jeroen commented on May 27, 2024

What does module load R do ? That is not a shell command?

from ssh.

Arthfael avatar Arthfael commented on May 27, 2024

First, I wanted to thank you for this package, which has been very invaluable for me as I am really only familiar with R, and so having it has made my life much easier.

Here's the information I could find on module:
http://modules.sourceforge.net/
https://modules.readthedocs.io/en/stable/module.html
On my cluster I would be loading some modules as part of my SLURM script. I am using a custom R script to generate a SLURM script and a parameter files for a job on the cluster, and want to detect versions available for my favourite module. But while running module commands directly in PuTTY works for me, doing it through ssh_exec_wait fails.

from ssh.

jeroen avatar jeroen commented on May 27, 2024

Maybe you're using a different shell in putty? Does it work if you explicitly start bash? According to the docs you sent you might first have to run this?

. /usr/share/Modules/init/sh

I don't know what a slurm script is.

from ssh.

Arthfael avatar Arthfael commented on May 27, 2024

Ha, no problem. SLURM is a way to create queue jobs for a linux cluster.
I tried you suggestion already, and get:

ssh_exec_wait(sshsess, ". /usr/share/Modules/init/sh")
bash: /usr/share/Modules/init/sh: No such file or directory
[1] 1

from ssh.

CCheCastaldo avatar CCheCastaldo commented on May 27, 2024

has this been fixed? I am running into the same issue. Again it would be very useful to load modules prior to submitting a cluster job directly from R.

from ssh.

olivier6088 avatar olivier6088 commented on May 27, 2024

Hello,

I've tried the module init and it is working for me.

session <- ssh::ssh_connect(host = "[email protected]", passwd = "test", verbose = FALSE)

out <- ssh::ssh_exec_internal(session, command = c(
  '. /usr/share/Modules/init/sh', # init module on shell
  'module list'
))

cat(rawToChar(out$stdout))
cat(rawToChar(out$stderr))

from ssh.

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.