From mwkimpel at gmail.com  Tue Jan 22 04:25:47 2008
From: mwkimpel at gmail.com (Mark W Kimpel)
Date: Mon, 21 Jan 2008 22:25:47 -0500
Subject: [Rd] calling MPI parallel C code from R
Message-ID: <4795623B.5040103@gmail.com>

R developers:

I have some parallel C code, written with the MPI library, that I would 
like to call from R, but I get the error message below. 
cocite.mat.true.parallel.so compiles without complaint and I have MPI in 
my path, but R isn't recognizing one of the MPI symbols.

I have a feeling that this is going to be tricky, but I need to get this 
to work. Helpful suggestions? I'd be happy to share more of my R and C 
code if that is helpful, but I wanted to avoid a very long post at this 
point.

Thanks,
Mark

 > dyn.load(x = c.code, local = TRUE, now = TRUE)
Error in dyn.load(x = c.code, local = TRUE, now = TRUE) :
   unable to load shared library 
'/N/u/mkimpel/BigRed/my_C/R.shared.so/cocite.mat.true.parallel.so':
   /N/u/mkimpel/BigRed/my_C/R.shared.so/cocite.mat.true.parallel.so: 
undefined symbol: ompi_mpi_comm_world

 > sessionInfo()
R version 2.7.0 Under development (unstable) (2008-01-05 r43880)
powerpc64-unknown-linux-gnu

locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base
 >
-- 

Mark W. Kimpel MD  ** Neuroinformatics ** Dept. of Psychiatry
Indiana University School of Medicine

15032 Hunter Court, Westfield, IN  46074

(317) 490-5129 Work, & Mobile & VoiceMail
(317) 204-4202 Home (no voice mail please)

mwkimpel<at>gmail<dot>com



[Rd] calling MPI parallel C code from R
Mark W Kimpel