diff --git a/R/makePSOCKcluster.R b/R/makePSOCKcluster.R deleted file mode 100644 index 6d35fd5..0000000 --- a/R/makePSOCKcluster.R +++ /dev/null @@ -1,70 +0,0 @@ -# Functions for makePSOCKcluster, and potential makeSOCKcluster - -insert_instrumentation_on_new_proc <- function() -{ - flag_debug <- FALSE - - func_ptrs <- get_function_list() - num_func_ptrs <- sum(get_num_functions()) - - function_exception_list <- get_function_exception_list() - function_methods_exception_list <- get_function_methods(function_exception_list) - - assign_regionRef_array_client(num_function_ptrs) - open_otf2_regionRef_sockets() - - ## Starting new here - for (func_index in 1:num_func_ptrs){ - - func_ptr <- func_ptrs[[func_index]] - func_name <- names(func_ptrs)[[func_index]] - #package_name <- names(func_ptrs)[[func_index]] - env <- environment(func_ptrs[[func_index]]) - package_name <- environmentName(env) - - ## DEBUGGING - Display current function (before checks) - if (flag_debug) { - # print("#######################################") - # print(paste0("func_index: ", func_index)) - print(func_ptr) - print(func_name) - print(env) - print(paste0("package: ", package_name, ", function: ", func_name)) - } - - flag_user_function=FALSE - if (env==.GlobalEnv){flag_user_function=TRUE} - - #if (env == NULL){ print(paste0("NULL env, func_name: ", func_name)) } - print(paste0("func_name: ", func_name)) - - ## Test if function should be skipped - if ( skip_function(func_ptr, func_name, env, function_exception_list, function_methods_exception_list)) { - print(paste0("Skipping: ", func_name)) - next; # skip to next loop - } - - ## Get otf2 regionRef - regionRef <- get_regionReg_from_array_client(func_index) - if (pkg.env$PRINT_INSTRUMENTS) { - print(paste0("INSTRUMENTING: function `", func_name,"`", - ", regionRef: ", regionRef)) - } - - ## Wrap function with debug info - insert_instrumentation(func_ptr, func_name, func_index, - regionRef, package_name, - env_is_locked=!pkg.env$UNLOCK_ENVS, - flag_user_function=flag_user_function) - - } - close_otf2_regionRef_sockets() -} - - -#if (FALSE){ - - -# ## Label as instrumented in instrumentation dataframe -# pkg.env$PROFILE_INSTRUMENTATION_DF[["function_instrumented"]][func_global_index] <- TRUE -# diff --git a/man/get_env.Rd b/man/get_env.Rd deleted file mode 100644 index f9bc4f8..0000000 --- a/man/get_env.Rd +++ /dev/null @@ -1,14 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/r_utils.R -\name{get_env} -\alias{get_env} -\title{get_env} -\usage{ -get_env() -} -\value{ -Environment -} -\description{ -Get environment object for this package rTrace -} diff --git a/man/get_mpi_rank.Rd b/man/get_mpi_rank.Rd deleted file mode 100644 index 0fef67e..0000000 --- a/man/get_mpi_rank.Rd +++ /dev/null @@ -1,11 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/RcppExports.R -\name{get_mpi_rank} -\alias{get_mpi_rank} -\title{get_mpi_rank} -\usage{ -get_mpi_rank() -} -\description{ -get_mpi_rank -} diff --git a/man/get_mpi_size.Rd b/man/get_mpi_size.Rd deleted file mode 100644 index 4065066..0000000 --- a/man/get_mpi_size.Rd +++ /dev/null @@ -1,11 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/RcppExports.R -\name{get_mpi_size} -\alias{get_mpi_size} -\title{get_mpi_size} -\usage{ -get_mpi_size() -} -\description{ -get_mpi_size -} diff --git a/man/mpi_finalize.Rd b/man/mpi_finalize.Rd deleted file mode 100644 index 9f73f23..0000000 --- a/man/mpi_finalize.Rd +++ /dev/null @@ -1,11 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/RcppExports.R -\name{mpi_finalize} -\alias{mpi_finalize} -\title{mpi_finalize} -\usage{ -mpi_finalize() -} -\description{ -mpi_finalize -} diff --git a/man/mpi_init.Rd b/man/mpi_init.Rd deleted file mode 100644 index e9d1b0e..0000000 --- a/man/mpi_init.Rd +++ /dev/null @@ -1,11 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/RcppExports.R -\name{mpi_init} -\alias{mpi_init} -\title{mpi_init} -\usage{ -mpi_init() -} -\description{ -mpi_init -} diff --git a/man/mpi_is_init.Rd b/man/mpi_is_init.Rd deleted file mode 100644 index e678430..0000000 --- a/man/mpi_is_init.Rd +++ /dev/null @@ -1,11 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/RcppExports.R -\name{mpi_is_init} -\alias{mpi_is_init} -\title{mpi_is_init} -\usage{ -mpi_is_init() -} -\description{ -mpi_is_init -} diff --git a/src/makePSOCKcluster.cpp b/src/makePSOCKcluster.cpp deleted file mode 100644 index 925742c..0000000 --- a/src/makePSOCKcluster.cpp +++ /dev/null @@ -1,38 +0,0 @@ -void *context; -void *regionRef_socket_client; -void *regionRef_socket_server; -int *regionReg_array; - -//int *regionReg_array = malloc(num_func * sizeof(*region_ref_vs_func_index)); -//free(regionReg_array); - -// Confirm num_functions, then send all regionRef in order -void open_otf2_regionRef_sockets_server(){ - context = zmq_ctx_new (); - regionRef_socket_server = zmq_socket (context, ZMQ_PUSH); - int rc = zmq_bind (regionRef_socket_server, "tcp://*:5558"); - - int zmq_ret = zmq_send(regionRef_socket_server, regionReg_array, num_functions*sizeof(*region_ref_vs_func_index)); -} - -RcppExport SEXP open_otf2_regionRef_sockets_clients(){ - context = zmq_ctx_new (); - regionRef_socket_client = zmq_socket (context, ZMQ_PULL); - zmq_bind (regionRef_socket_client, "tcp://localhost:5558"); - - int zmq_ret = zmq_recv(); -} - -RcppExport SEXP assign_regionRef_array_client(int num_function_ptrs){ - regionReg_array = malloc(num_function_ptrs*sizeof(*regionRef_array)); - return(R_NilValue); -} - -RcppExport SEXP get_regionRef_from_array_client(int func_index){ - return(regionRef_array[func_index]); -} - -RcppExport SEXP free_regionRef_array_client(){ - free(regionReg_array); - return(R_NilValue); -} \ No newline at end of file