[Rd] call fortran in R

From: Sébastien Durand <sebastien.durand_at_UMontreal.CA>
Date: Thu 04 Aug 2005 - 15:25:24 GMT


Dear all,

Since the command you ask me to type doesn't show anything Here some more information, on my system and on the foo.so compiled file

I am using g77 version 3.4.4 Configured with: ../gcc/configure -- enable-threads=posix --enable-languages=f77

I am using gcc version 4.0.0 20041026 (Apple Computer, Inc. build 4061)

         Configured with: /private/var/tmp/gcc/gcc-4061.obj~8/src/ configure --disable-checking --prefix=/usr --mandir=/share/man -- enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^ +.-]*$/s/$/-4.0/

         --with-gxx-include-dir=/include/gcc/darwin/4.0/c++ -- build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 -- target=powerpc-apple-darwin8

I don't know if this can be of any help to you but there is again how I compile the foo.f

Double-G5:~ sebas$ R CMD SHLIB ~/Desktop/Fortan_kmeans/kmeans3.f

         g77 -fno-common -g -O2 -c /Users/sebas/Desktop/ Fortan_kmeans/kmeans3.f -o /Users/sebas/Desktop/Fortan_kmeans/kmeans3.o

         gcc-3.3 -bundle -flat_namespace -undefined suppress -L/usr/ local/lib -o /Users/sebas/Desktop/Fortan_kmeans/kmeans3.so /Users/ sebas/Desktop/Fortan_kmeans/kmeans3.o -L/usr/local/lib/gcc/powerpc- apple-darwin6.8/3.4.2 -lg2c -lSystem -framework R

There is all the info about the foo.so file using nm -a option instead of -g:

Double-G5:~ sebas$ nm -a ~/Desktop/Fortan_kmeans/kmeans3.so

00000fe4 - 01 0114 SLINE
00000fb0 - 01 0000    SO
00000fd8 - 01 010d SLINE
00000fdc - 01 010e SLINE
00000fe0 - 01 010f SLINE
00000fec - 01 0116 SLINE
00000fe8 - 01 0115 SLINE
00001000 - 01 0000    SO
00001000 - 01 011b SLINE
00000ffc - 01 011a SLINE
00000ff8 - 01 0119 SLINE
00000fb4 - 01 0104 SLINE
00000fb8 - 01 0105 SLINE
00000fbc - 01 0106 SLINE
00000fc0 - 01 0107 SLINE
00000fc4 - 01 0108 SLINE
00000ff4 - 01 0118 SLINE
00000fc8 - 01 0109 SLINE
00000fcc - 01 010a SLINE
00000fd0 - 01 010b SLINE
00000fd4 - 01 010c SLINE
00000ff0 - 01 0117 SLINE
00000fb0 - 01 0000   SOL /SourceCache/Csu/Csu-57//
00000fb0 - 01 0000   SOL /SourceCache/Csu/Csu-57/bundle1.s
00000fb0 - 01 0000   SOL /SourceCache/Csu/Csu-57/bundle1.s
00000fb0 - 01 0000   SOL /SourceCache/Csu/Csu-57/bundle1.s
00000fb0 - 01 0000    SO /Users/sebas/
00000fb0 - 01 0000    SO /Users/sebas/Desktop/Fortan_kmeans/kmeans3.f
00000fb0 - 01 0000   SOL <built-in>
00000fb0 - 01 0000   SOL <command line>

00000fe0 t __dyld_func_lookup
00000fe0 - 01 0113 FUN __dyld_func_lookup:F3 00000000 - 00 0000 LSYM __g77_f2c_address:t(0,10)=*(0,11)=@s8;r
(0,11);-128;127;
00000000 - 00 0000  LSYM __g77_f2c_complex:t(0,7)=R3;8;0;
00000000 - 00 0000  LSYM __g77_f2c_doublecomplex:t(0,6)=R3;16;0;
00000000 - 00 0000  LSYM __g77_f2c_doublereal:t(0,8)=r(0,0);8;0;
00000000 - 00 0000  LSYM __g77_f2c_flag:t(0,3)=r 

(0,3);-2147483648;2147483647;

00000000 - 00 0000 LSYM __g77_f2c_ftnint:t(0,1)=r
(0,1);-2147483648;2147483647;

00000000 - 00 0000 LSYM __g77_f2c_ftnlen:t(0,2)=r
(0,2);-2147483648;2147483647;

00000000 - 00 0000 LSYM __g77_f2c_integer:t(0,12)=r
(0,12);-2147483648;2147483647;

00000000 - 00 0000 LSYM __g77_f2c_logical:t(0,4)=r
(0,4);-2147483648;2147483647;

00000000 - 00 0000 LSYM __g77_f2c_longint:t(0,5)=@s64;r(0,5);
001000000000000000000000;000777777777777777777777;
00000000 - 00 0000 LSYM __g77_f2c_real:t(0,9)=r(0,0);4;0; 00000000 t __mh_bundle_header
00000000 - 00 0000  LSYM byte:t(0,26)=@s8;r(0,26);-128;127;
00000000 - 00 0000  LSYM char:t(0,46)=@s8;r(0,46);0;255;
00000000 - 00 0000  LSYM char:t2=r2;0;127;
00000000 - 00 0000  LSYM complex double:t(0,31)=R3;16;0;
00000000 - 00 0000  LSYM complex float:t(0,32)=R3;8;0;
00000000 - 00 0000  LSYM complex int:t(0,33)=s8real:(0,34)=r 

(0,34);-2147483648;2147483647;,0,32;imag:(0,34),32,32;;
00000000 - 00 0000  LSYM complex long double:t(0,30)=R3;16;0;
00000000 - 00 0000  LSYM complex:t(0,14)=R3;8;0;
00000000 - 00 0000  LSYM double complex:t(0,13)=R3;16;0;
00000000 - 00 0000  LSYM double precision:t(0,15)=r(0,0);8;0;
00000000 - 00 0000  LSYM double:t(0,36)=r(0,34);8;0;
00001000 d dyld__mh_bundle_header
00001008 s dyld_func_lookup_pointer

00001004 s dyld_lazy_symbol_binding_entry_point 00000fb0 t dyld_stub_binding_helper
00000fb0 - 01 0103   FUN dyld_stub_binding_helper:F3
00000000 - 00 0000  LSYM float:t(0,37)=r(0,34);4;0;
00000000 - 00 0000   OPT gcc2_compiled.
00000000 - 00 0000  LSYM int:t(0,34)
00000000 - 00 0000  LSYM int:t1=r1;-2147483648;2147483647;
00000000 - 00 0000  LSYM integer4:t(0,22)=@s64;r(0,22); 
001000000000000000000000;000777777777777777777777;
00000000 - 00 0000  LSYM integer:t(0,28)=r(0,28);-2147483648;2147483647;
00000000 - 00 0000  LSYM logical2:t(0,19)=@s8;r(0,19);-128;127;
00000000 - 00 0000 LSYM logical3:t(0,18)=@s16;r(0,18);-32768;32767; 00000000 - 00 0000 LSYM logical4:t(0,17)=@s64;r(0,17);
001000000000000000000000;000777777777777777777777;
00000000 - 00 0000  LSYM logical:t(0,20)=r(0,20);-2147483648;2147483647;
00000000 - 00 0000 LSYM long double:t(0,35)=r(0,34);8;0; 00000000 - 00 0000 LSYM long int:t(0,45)=r
(0,45);-2147483648;2147483647;

00000000 - 00 0000 LSYM long long int:t(0,42)=@s64;r(0,42);
001000000000000000000000;000777777777777777777777;
00000000 - 00 0000 LSYM long long unsigned int:t(0,41)=@s64;r(0,41);
000000000000000000000000;001777777777777777777777;
00000000 - 00 0000 LSYM long unsigned int:t(0,43)=r(0,43);
000000000000000000000000;000000000000037777777777;
00000000 - 00 0000  LSYM real:t(0,16)=r(0,0);4;0;
00000000 - 00 0000 LSYM short int:t(0,40)=@s16;r(0,40);-32768;32767; 00000000 - 00 0000 LSYM short unsigned int:t(0,39)=@s16;r(0,39); 0;65535;
00000000 - 00 0000  LSYM signed char:t(0,11)
00000000 - 00 0000  LSYM unsigned byte:t(0,25)=@s8;r(0,25);0;255;
00000000 - 00 0000  LSYM unsigned char:t(0,38)=@s8;r(0,38);0;255;
00000000 - 00 0000  LSYM unsigned int:t(0,44)=r(0,44); 
000000000000000000000000;000000000000037777777777;
00000000 - 00 0000 LSYM unsigned word:t(0,23)=@s16;r(0,23);0;65535; 00000000 - 00 0000 LSYM unsigned4:t(0,21)=@s64;r(0,21);
000000000000000000000000;001777777777777777777777;
00000000 - 00 0000 LSYM unsigned:t(0,27)=r(0,27);
000000000000000000000000;000000000000037777777777;
00000000 - 00 0000  LSYM void:t(0,29)=(0,29)
00000000 - 00 0000  LSYM void:t3=3

00000000 - 00 0000 LSYM word:t(0,24)=@s16;r(0,24);-32768;32767; 00000fb0 - 01 0000 SO {standard input} Double-G5:~ sebas$

S.



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri Aug 05 01:25:44 2005

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:16 GMT