[Rsiena-help] Update failed

George Vega Yon g.vegayon at gmail.com
Fri Oct 14 20:38:16 CEST 2016


Dear Prof. Snijders,

I see the error, -markeForkCluster- is meaningless in windows, that's why
the error. I've change it to -makeCluster- which "is cross platform" so the
error shouldn't show up again. Plus, I've included details in siena07.Rd
(the function manual) about it:

> In the case of using multiple processors, there are two options for
telling siena07 to use them. By specifying the options useCluster,
nbrNodes, clusterString and initC, siena07 will create a cluster object
that will be used by the parallel package. After finishing the estimation
procedure, siena07 will automatically stop the cluster. Alternatively,
instead of having the function to create a cluster, the user may provide
its own by specifying the option cl, similar to what the boot function does
in the boot package. By using the option cl the user may be able to create
more complex clusters (see examples below).

Furthermore, I've included a couple of examples in the manual siena07.Rd:

# Running in multiple processors
-----------------------------------------------
## Not run:

# Using 8 processors
ans2 <- siena07(myalgorithm, data=mydata, effects=myeff, batch=TRUE,
                useCluster=TRUE, nbrNodes=8, initC=TRUE)

# Loading the parallel package and creating a cluster
# with 8 processors (this should be equivalent)

library(parallel)
cl <- makeCluster(8)

ans3 <- siena07(myalgorithm, data=mydata, effects=myeff, batch=TRUE,
                cl = cl)

# Notice that now -siena07- won't stop the cluster for you.
stopCluster(cl)

# You can create even more complex clusters using several computers. In this
# example we are creating a cluster with 3*8 = 24 processors on three
# different machines.
cl <- makePSOCKcluster(
    rep(c('localhost', 'machine2.website.com' , 'machine3.website.com'), 8),
    user='myusername', rshcmd='ssh -p PORTNUMBER')

ans4 <- siena07(myalgorithm, data=mydata, effects=myeff, batch=TRUE,
                cl = cl)
stopCluster(cl)

I've already pushed the new changes and the R CMD check is OK now.

Best,


George G. Vega Yon
+1 (626) 381 8171
http://cana.usc.edu/vegayon

On Fri, Oct 14, 2016 at 12:01 AM, Tom Snijders <
tom.snijders at nuffield.ox.ac.uk> wrote:

> Dear George,
>
>
>
> As you may have seen, your update to RSiena at R-Forge failed. The
> windows-devel toolchain ended with the error:
>
>
>
>   > library(parallel)
>
>   > cl <- makeForkCluster(2)
>
>   Error in makeForkCluster(2) : fork clusters are not supported on Windows
>
>   Execution halted
>
>
>
> What are the platforms for which this makeForkCluster command works? If
> Windows is not included but, e.g., Linux is, then the solution is to drop
> this test from tests/parallel.R, make sure by your own test that it works
> on other platforms, and leave the rest as it is.
>
>
>
> Further, can you please send a longer description to me of how this works,
> understandable for R users whose knowledgeof computer science is limited?
> Then I can see how I incorporate this somewhere in the manual. You can do
> this in an email directly to me; for the current message, I thought it is
> better to report this also to rsiena-help.
>
>
>
> Best wishes,
>
> Tom
>
>
>
>
>
>
>
> ================================================================
>
> Tom A.B. Snijders
>
> Professor of Statistics and Methodology
>
> Dept. of Sociology, University of Groningen
>
> Emeritus Fellow, Nuffield College, University of Oxford
>
> Associate Member, Dept. of Statistics, University of Oxford
>
> http://www.stats.ox.ac.uk/~snijders/
>
>
>
> *From:* rsiena-help-bounces at lists.r-forge.r-project.org [mailto:
> rsiena-help-bounces at lists.r-forge.r-project.org] *On Behalf Of *Tom
> Snijders
> *Sent:* 05 October 2016 13:43
> *To:* rsiena-help at lists.r-forge.r-project.org
> *Subject:* Re: [Rsiena-help] More flexibility on using Clusters
>
>
>
> Dear George,
>
>
>
> That’s wonderful. This will be great for some users! I look forward to see
> these changes.
>
>
>
> I suppose that you are indeed talking about RSiena and not RSienaTest.
>
>
>
> For committing the new version to R-Forge, there is a file
> "\RSienaTest\doc\HowToCommit.pdf" (with the corresponding .tex) that
> gives the brief rules to follow; there is a larger file in the same
> directory called SienaDeveloper. This tells about the versions to use.
> Currently indeed the next version will be 1.1-301; if you happen to wait
> until I’ll have committed my next changes (could be next week), this will
> have changed to 1.1-302. To be safe, I always first do Tortoise-update
> before Tortoise-commit.
>
>
>
> There are no currently active plans to replace siena07 by sienacpp. Some
> options are different between the two. Evidently it is unpleasant to
> maintain two different functions that do almost the same. I copy in Felix
> Schoenenberger who wrote sienacpp and still is working on elaborating the
> GMM estimator.
>
>
>
> Changing the printing of warnings and messages to using R functions would
> be great indeed.
>
>
>
> Best regards,
>
> Tom
>
>
>
>
>
> ================================================================
>
> Tom A.B. Snijders
>
> Professor of Statistics and Methodology
>
> Dept. of Sociology, University of Groningen
>
> Emeritus Fellow, Nuffield College, University of Oxford
>
> Associate Member, Dept. of Statistics, University of Oxford
>
> http://www.stats.ox.ac.uk/~snijders/
>
>
>
> *From:* George Vega Yon [mailto:g.vegayon at gmail.com]
> *Sent:* 04 October 2016 23:58
> *To:* Tom Snijders
> *Cc:* Christian Steglich (c.e.g.steglich at rug.nl) (c.e.g.steglich at rug.nl)
> *Subject:* Re: [Rsiena-help] More flexibility on using Clusters
>
>
>
> Dear Prof. Snijders,
>
>
>
> I've just finished adding the new feature in -siena07- allowing to pass a
> cluster object (cl) directly. I've included a simple example in
> tests/parallel.R and added the new argument in the documentation of
> siena07.r without changing the sienacpp function. Before pushing my
> changes, I wanted to ask you something: In the ChangeLog file, what
> revision number should I include (currently 300)? Should I change the
> version number as well? If so, what versioning system do you use?
>
>
>
> About the sienacpp parallelization method, are you planning to replace
> siena07 with sienacpp? I get that using OpenMP for parallelization might
> better but, as user, I think it is nice to have the option of using
> parallel::makeCluster since it can be useful for some (as myself). Ideally
> one could have both options: Split the work into C computers and latter use
> OpenMP within each computer to speed up things even more.
>
>
>
> Finally, looking around I realized that you have a lot of lines creating
> warnings and printing messages on the screen. While those do the work it
> might be useful to use R's warning() and message() built in functions
> instead since the former allows R keeping track of warnings internally and
> both allow using the functions suppressWarnings() and suppressMessages().
> Perhaps I might be able to change those some time if you are OK with that
> (not a big change but makes it nicer with R... warnings show with different
> color in RStudio for example).
>
>
>
> Best,
>
>
> George G. Vega Yon
> +1 (626) 381 8171
> http://www.its.caltech.edu/~gvegayon/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rsiena-help/attachments/20161014/d551ba28/attachment.html>


More information about the Rsiena-help mailing list