Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't error with zero length elem in add_to_last #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Mar 27, 2017

  1. Don't error with zero length elem in add_to_last

    The following expression from **Rmpi** raises an error due to `breaks_tail` seeing a zero length breaks.
    ```{r}
     function (dellog = TRUE, comm = 1) {
      if (mpi.comm.size(comm) < 2) {
        err <- paste("It seems no slaves running on comm", comm)
        stop(err)
      }
      mpi.bcast.cmd(cmd = break, rank = 0, comm = comm)
      if (.Platform$OS != "windows") {
        if (dellog && mpi.comm.size(0) < mpi.comm.size(comm)) {
          tmp <- paste(Sys.getpid(), "+", comm, sep = "")
          logfile <- paste("*.", tmp, ".*.log", sep = "")
          if (length(system(paste("ls", logfile), TRUE, ignore.stderr = TRUE)) >= 
              1)
            system(paste("rm", logfile))
        }
      }
      if (comm > 0) {
        if (is.loaded("mpi_comm_disconnect")) 
          mpi.comm.disconnect(comm)
        else mpi.comm.free(comm)
      }
    }
    ```
    CSJCampbell committed Mar 27, 2017
    Configuration menu
    Copy the full SHA
    919e6ab View commit details
    Browse the repository at this point in the history