What is the best and most efficient method to pass large amount of data (double numbers) from a FORTRAN program to a C++ program? right now I am using binary file but it is not fast enough!
I tried pipe. I followed http://msdn.microsoft.com/en-us/library/ms682499(VS.85).aspx for the C++ part. But for the FORTRAN part (which is the child processor) I do not know how to properly write data. Do I have to write on the console like WRITE(*,*) AllTheNumbers
? because writing on the console takes a lot of time!
My FORTRAN code to write data:
DO 281 I=1,NDOF
DO 280 J=1,UBW
IF (S(I,J).NE.0) THEN
WRITE (*, 2770) I,(J+I-1)
WRITE (*,2760) (S(I,J))
ENDIF
280 CONTINUE
281 CONTINUE