rich-iannone / splitr

Use the HYSPLIT model from inside R and do more with it
Other
141 stars 60 forks source link

SplitR on UNIX Cluster #5

Closed jdossgollin closed 8 years ago

jdossgollin commented 8 years ago

Hi @rich-iannone,

I'm trying to run on a cluster because I have a fairly large number of trajectories I want to run. If I run a simple script,

library(SplitR)
hysplit_trajectory()

I see that the .gbl files download without trouble, but then I get an error message

sh: {MYPATH}/rpackages/SplitR/osx/hyts_std: cannot execute binary file

Clearly the cluster is having trouble executing the HYSPLIT binaries in the Splitr/osx folder. This may be an issue on my end and I can talk to the server people about it but I wanted to ask if you had seen something like this before.

jdossgollin commented 8 years ago

fwiw the MYPATH isn't in the output, I just didn't want to post the whole file path

rich-iannone commented 8 years ago

James,

The cluster is probably using Redhat Linux, so the Mac OS X binaries won’t work. Do you have access to Linux-compiled binaries of HYSPLIT? If so, I could include those in SplitR. Then your runs would likely work!

Best, Rich

On Mar 24, 2016, at 8:33 AM, James Doss-Gollin notifications@github.com wrote:

Hi @rich-iannone https://github.com/rich-iannone,

I'm trying to run on a cluster because I have a fairly large number of trajectories I want to run. If I run a simple script,

library(SplitR) hysplit_trajectory() I see that the .gbl files download without trouble, but then I get an error message

sh: /vega/eeeng/users/jwd2136/rpackages/SplitR/osx/hyts_std: cannot execute binary file Clearly the cluster is having trouble executing the HYSPLIT binaries in the Splitr/osx folder. This may be an issue on my end and I can talk to the server people about it but I wanted to ask if you had seen something like this before.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/rich-iannone/SplitR/issues/5

jdossgollin commented 8 years ago

Sure, makes sense -- I see in the hysplit_trajectory that all UNIX systems use the OSX binaries. The Red Hat guess is spot on as well. From a coding perspective, is it better to include compiled binaries in the SplitR package or to compile them locally?

rich-iannone commented 8 years ago

It would probably be easier for the end-user if the binaries were to be included in the package. It's easy enough to detect that R is running in Linux and then use the correct binaries. I'll take a look at compiling some HYSPLIT from source for x86 Linux.

jdossgollin commented 8 years ago

OK, I just reached out to the guy that the HYSPLIT web site says is in charge of distributing linux binaries

jdossgollin commented 8 years ago

@rich-iannone thanks for addressing this -- saw you updated.

If I run

with_libpaths(new = "/********/rpackages", install_github('SplitR'))
library(SplitR)
hysplit_trajectory()

I'm still getting the

/hmt/*********/R/x86_64-redhat-linux-gnu-library/3.2/SplitR/osx/hyts_std: cannot execute binary file

do I need to change something so it's not looking for the binaries in the osx folder?

rich-iannone commented 8 years ago

While the linux binaries are indeed available in the package itself, I do have to build in the detection of the OS. I will do that v. soon. (Then I'll have to test this on a Linux partition to make sure it works!)

jdossgollin commented 8 years ago

Jumped the gun! Don't rush for my sake, I have a rough week ahead anyways :)

rich-iannone commented 8 years ago

It's okay! But I'll totally get back to it because I'm keen to have the trajectory models working on three platforms.

rich-iannone commented 8 years ago

Alright @jdossgollin , there is now support for Linux in SplitR. However, take note of the argument names: I've just made them shorter so you'll have to modify calls to hysplit_trajectory with a lot of find and replace.

jdossgollin commented 8 years ago

Cool!