[R-sig-hpc] Rmpi in "Depends"

Hao Yu hyu at stats.uwo.ca
Fri Jul 17 17:02:18 CEST 2009


lamboot is launched in zzz.R at:
    if (.Platform$OS=="unix"){
        if(.Call("mpidist",PACKAGE="Rmpi") == 2){
            if (length(system("lamnodes",TRUE,ignore.stderr = TRUE)) == 0){
                #cat("\n\tLAM/MPI runtime environment is not operating.\n")
                #cat("\tStarting LAM/MPI runtime environment.\n")
                system("lamboot -H",ignore.stderr = TRUE)
            }
        }
    }

One way is to temporally stop lamboot. Another way is to check if user is
superuser or not. If there is no significant delay during loading, I will
try to implement the second approach.

Hao


Ramon Diaz-Uriarte wrote:
> Dear Brian,
>
> Thanks. Yes, listing as "Suggests" is one approach (what I am doing
> now, and what some of my other packages in CRAN that use Rmpi do), but
> it seems somewhat like cheating (the fact is that the package does
> depend on Rmpi) and not very elegant (I'd rather have the failure at
> install time than at run time). So something like having the
> dependency check without actually starting the LAM/MPI universe.
>
> Best,
>
> R.
>
>
>
>
>
> On Thu, Jul 16, 2009 at 3:29 PM, Brian G. Peterson<brian at braverock.com>
> wrote:
>> Ramon Diaz-Uriarte wrote:
>>>
>>> Dear All,
>>>
>>> I have one package where I listed Rmpi in the "Depends" line in the
>>> DESCRIPTION file. But this leads to unwanted behavior: installing the
>>> package will try to start the lam universe (I am using LAM/MPI here).
>>> This will not work if done as root, and is annoying when done as a
>>> regular user.
>>>
>>> I just checked, and no package in CRAN is listed that has a reverse
>>> Depends on Rmpi. I've googled around, but haven't been able to locate
>>> anything, though I think I remember this issue has appeared in the
>>> past in some list.
>>>
>>> Any ideas of the best way to proceed?
>>>
>>> Thanks,
>>>
>>> R.
>>>
>>>
>>
>> Sure, list it as "Suggests" in the package DESCRIPTION.
>> Inside your code, check to see if it is installed, and throw a warning
>> or
>> stop() error if the package is not available without starting up the lam
>> universe.  Make clear in your documentation why you've done this.
>>
>> Regards,
>>
>>  - Brian
>>
>> --
>> Brian G. Peterson
>> http://braverock.com/brian/
>> Ph: 773-459-4973
>> IM: bgpbraverock
>>
>>
>
>
>
> --
> Ramon Diaz-Uriarte
> Structural Biology and Biocomputing Programme
> Spanish National Cancer Centre (CNIO)
> http://ligarto.org/rdiaz
> Phone: +34-91-732-8000 ext. 3019
>
> _______________________________________________
> R-sig-hpc mailing list
> R-sig-hpc at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-hpc
>


-- 
Department of Statistics & Actuarial Sciences
Fax Phone#:(519)-661-3813
The University of Western Ontario
Office Phone#:(519)-661-3622
London, Ontario N6A 5B7
http://www.stats.uwo.ca/faculty/yu



More information about the R-sig-hpc mailing list