[R] first steps to build a FORTRAN DLL used by R
MAURICE Jean - externe
jean-externe.maurice at edf.fr
Wed Feb 24 10:41:07 CET 2016
Hi,
I am a fortran developper, freelance, hired by a huge company to transform R calculations to FORTRAN. I am discovering R.
Few years ago someone built FORTRAN dll using Lahey Fortran (perhaps only to test his programs) and gfortran. I found two .bat files, one for Lahey :
ECHO compilation fortran LAHEY regression\regr.f
lf95 -dll -ml msvc regr.f >regr.txt
type regr.txt
and one for gfortran :
ECHO creation DLL FORTRAN par R regression\regr.f
C:\utilitaires\R\R-3.1.0\bin\i386\rcmd SHLIB regr.f >creationdllr.txt
TYPE creationdllr.txt
Creationdllr.txt being :
gfortran -m32 -O3 -mtune=core2 -c regr.f -o regr.o
gcc -m32 -shared -s -static-libgcc -o regr.dll tmp.def regr.o -Ld:/RCompile/CRANpkg/extralibs64/local/lib/i386 -Ld:/RCompile/CRANpkg/extralibs64/local/lib -lgfortran -LC:/utilitaires/R/R-3.1.0/bin/i386 -lR
Nowadays, the company uses Intel's FORTRAN. I could build a dll with it but R doesn't want to load it ! parameters are : 'keep fortran 77 compatibility' and 'console mode'.
What I would like to know are 'the first steps' or 'building FORTRAN dll's for beginners (dummy ?)' :
1) Can we use Intel's Fortran or must we use gfortran
2) If we must use gfortran is it given with R ?
3) If we can use Intel's Fortran, what are the parameters to use and has someone recommandations to give ?
Thanks in advance for your help
Jean MAURICE in France
-------------- next part --------------
Ce message et toutes les pi?ces jointes (ci-apr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message.
Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus.
____________________________________________________
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.
E-mail communication cannot be guaranteed to be timely secure, error or virus-free.
More information about the R-help
mailing list