[R-sig-hpc] snowfall and calling C++ code with .C
Vinh Nguyen
vqnguyen at uci.edu
Fri Apr 23 16:13:42 CEST 2010
> Dear R-sig-hpc,
>
> I am having trouble using sfSapply on a function that calls a C function
> through the .C interface. When executing in serial I have no errors, but in
> parallel I have the error that each node cannot find the function called by
> .C
>
> i.e. if I have
>
> myfn <- function(){ .C("myfunction") }
>
> I get the error
> C symbol name "myfunction" not in load table
>
>
>
> I use sfExportAll() and sfLibrary(mylibrary) before calling the parallel
> code. Thanks so much for your help!
>
> Sincerely,
> Carl
You will also need to do:
sfClusterEval(.dynload("file.so"))
to load the shared object in each node.
Vinh
More information about the R-sig-hpc
mailing list