I've a subroutine that's written in C. My main program and everything else are in fortran 90. I have a global data module which consist of some variables and it can be assessed globally ie
real :: dd(10)
end module global_data
I would like to pass the values of a variable (e.g. dd) to a C subroutine, do some calculation, and out comes the result of the variable.
How can I do this? Is there a sample code somewhere? I tried to find some info on the net but they seem quite complicated...
Btw, my environment is linux and it's using ifort and icc ver 9.1
Thanks in advance!