Skip to content

Commit

Permalink
Merge pull request #72 from snoweye/master
Browse files Browse the repository at this point in the history
0.3-8 on CRAN
  • Loading branch information
snoweye authored Aug 12, 2018
2 parents fbaf3ee + e527dbb commit 64704d6
Show file tree
Hide file tree
Showing 13 changed files with 536 additions and 93 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
^\.travis\.yml$
appveyor.yml
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2018-08-03: Ver. 0.3-8
* Fedora28 use "module load mpi/openmpi-x86_64" to obtain mpiexec.
* Roll back partially to Ver. 0.3-6 because pkg-config may give linking order
differently that may triggle some dynamic loading problems.

2018-07-29: Ver. 0.3-7
* Add "pkg-config" to "configure.ac".
* Check "OpenMPI" and "MPICH2" with "pkg-config".

2018-05-18: Ver. 0.3-6
* Move "rlecuyer" to Imports.

Expand Down
15 changes: 13 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: pbdMPI
Version: 0.3-6
Date: 2018-04-30
Version: 0.3-8
Date: 2018-08-04
Title: Programming with Big Data -- Interface to MPI
Authors@R: c(person("Wei-Chen", "Chen", role = c("aut", "cre"), email =
"[email protected]"),
Expand Down Expand Up @@ -33,3 +33,14 @@ MailingList: Please send questions and comments regarding pbdR to
[email protected]
NeedsCompilation: yes
Maintainer: Wei-Chen Chen <[email protected]>
Packaged: 2018-07-30 01:19:36 UTC; snoweye
Author: Wei-Chen Chen [aut, cre],
George Ostrouchov [aut],
Drew Schmidt [aut],
Pragneshkumar Patel [aut],
Hao Yu [aut],
Christian Heckendorf [ctb] (FreeBSD),
Brian Ripley [ctb] (Windows HPC Pack 2012),
R Core team [ctb] (some functions are modified from the base packages)
Repository: CRAN
Date/Publication: 2018-08-01 15:20:14 UTC
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export(

### "R/util_*.r"
"execmpi",
"runmpi",

### "R/000_pbd_opt.r"
"pbd_opt" #,
Expand Down
9 changes: 7 additions & 2 deletions R/get_conf.r
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@
### "pbd*/src/Makevars.in" and "pbd*/src/Makevar.win"
### to find the default configurations from
### "pbd*/etc${R_ARCH}/Makconf".
get.conf <- function(arg, arch = '', package = "pbdMPI"){
get.conf <- function(arg, arch = '', package = "pbdMPI", return = FALSE){
file.name <- paste("./etc", arch, "/Makeconf", sep = "")
file.path <- tools::file_path_as_absolute(
system.file(file.name, package = package))
ret <- scan(file.path, what = character(), sep = "\n", quiet = TRUE)

id <- grep(paste("^", arg, " = ", sep = ""), ret)
if(length(id) > 0){
cat(gsub(paste("^", arg, " = (.*)", sep = ""), "\\1", ret[id[1]]))
ret <- gsub(paste("^", arg, " = (.*)", sep = ""), "\\1", ret[id[1]])
if(!return){
cat(ret)
} else{
return(invisible(ret))
}
} else{
stop("The arg is not found.")
}
Expand Down
2 changes: 2 additions & 0 deletions R/spmd_communicator.r
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ spmd.comm.set.errhandler <- function(comm = .pbd_env$SPMD.CT$comm){
invisible(ret)
} # End of spmd.comm.set.errhandler().

comm.set.errhandler <- spmd.comm.set.errhandler

spmd.comm.is.null <- function(comm = .pbd_env$SPMD.CT$comm){
.Call("spmd_comm_is_null", as.integer(comm), PACKAGE = "pbdMPI")
} # End of spmd.comm.is.null().
Expand Down
16 changes: 10 additions & 6 deletions R/util_execmpi.r
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,20 @@ execmpi <- function(spmd.code = NULL, spmd.file = NULL,
mpicmd <- "mpiexec"
}
} else{
mpicmd <- system("which mpiexec", intern = TRUE)
mpicmd <- suppressWarnings(system("which mpiexec",
ignore.stderr = TRUE, intern = TRUE))
if(! is.null(attr(mpicmd, "status"))){
mpicmd <- system("which mpirun", intern = TRUE)
mpicmd <- suppressWarnings(system("which mpirun",
ignore.stderr = TRUE, intern = TRUE))
if(! is.null(attr(mpicmd, "status"))){
mpicmd <- system("which orterun", intern = TRUE)
mpicmd <- suppressWarnings(system("which orterun",
ignore.stderr = TRUE, intern = TRUE))
if(! is.null(attr(mpicmd, "status"))){
mpicmd <- get.conf("MPIEXEC")
mpicmd <- get.conf("MPIEXEC", return = TRUE)
if(mpicmd == ""){
mpicmd <- get.conf("MPIRUN")
mpicmd <- get.conf("MPIRUN", return = TRUE)
if(mpicmd == ""){
mpicmd <- get.conf("ORTERUN")
mpicmd <- get.conf("ORTERUN", return = TRUE)
if(mpicmd == ""){
warning("No MPI executable can be found.")
return(invisible(NULL))
Expand Down Expand Up @@ -128,3 +131,4 @@ execmpi <- function(spmd.code = NULL, spmd.file = NULL,
invisible(ret)
} # End of execmpi().

runmpi <- execmpi
Loading

0 comments on commit 64704d6

Please sign in to comment.