@@ -175,47 +175,6 @@ run.ClusterFuture <- function(future, ...) {
175175 )
176176 }
177177
178- # # (iii) Export globals
179- globals <- globals(future )
180- if (length(globals ) > 0 ) {
181- t_start <- Sys.time()
182- if (debug ) {
183- total_size <- asIEC(objectSize(globals ))
184- mdebugf(" Exporting %d global objects (%s) to cluster node #%d ..." , length(globals ), total_size , node_idx )
185- }
186- for (name in names(globals )) {
187- # # For instance sendData.SOCKnode(...) may generate warnings
188- # # on packages not being available after serialization, e.g.
189- # # In serialize(data, node$con) :
190- # # package:future' may not be available when loading
191- # # Here we'll suppress any such warnings.
192- value <- globals [[name ]]
193- if (debug ) {
194- size <- asIEC(objectSize(value ))
195- mdebugf(" Exporting %s (%s) to cluster node #%d ..." , sQuote(name ), size , node_idx )
196- }
197- suppressWarnings({
198- cluster_call(cl , fun = gassign , name , value , future = future , when = " call gassign() on" )
199- })
200- if (debug ) mdebugf(" Exporting %s (%s) to cluster node #%d ... DONE" , sQuote(name ), size , node_idx )
201- value <- NULL
202- }
203- if (debug ) mdebugf(" Exporting %d global objects (%s) to cluster node #%d ... DONE" , length(globals ), total_size , node_idx )
204-
205- if (inherits(future $ .journal , " FutureJournal" )) {
206- appendToFutureJournal(future ,
207- event = " exportGlobals" ,
208- category = " overhead" ,
209- parent = " launch" ,
210- start = t_start ,
211- stop = Sys.time()
212- )
213- }
214- }
215- # # Not needed anymore
216- globals <- NULL
217-
218-
219178 # # Add to registry
220179 FutureRegistry(reg , action = " add" , future = future , earlySignal = FALSE )
221180
0 commit comments