• Very interesting project !! Could you post some minimal example mex file that you succeded to compile all the way. I tried "xtimesy.f" file posted somewhere, but I got stuck !?

  • Hm.. thx. it was kind of annoying that it's a pretty simple problem and the only discussion of it was almost 10 years old and nobody solved it :) it's not tested on many projets... let's do it this way, easier to follow progress: https://gitlab.com/tesch1/mkoctfort

    I googled xtimesy.f, not sure what that is, could you attach it, or another file that shows the problem, to a bug report on the above project? (assuming it's not proprietary?)

  • http://matlab.izmiran.ru/help/techdoc/matlab_external/ch06eng9.html#25475

    (I was able to deal with dual declarations and logic syntax....)

    Thanks for the quick response !! I will indeed follow mkoctfort :)

  • ew, that's a yucky file, has this .ru no respect for IP rights? Or maybe they have a license to post it.. I closed my eyes immediately, just in case. Could you copy/paste the error you're getting?

    This guy suggests an implementation for fintrf.h: https://lists.gnu.org/archive/html/octave-maintainers/2007-01/msg00052.html but it probably depends on your fortran compiler. also, I noticed that with gfortran, #defines do not cross fortran include boundaries. I guess mkoctfort should have an option to adjust the size of the integers and pointers accordingly... right now it's just hard-coded in lines 56-58

  • If you did not like this one then any example based on any simple function would be useful. I wrote mexfiles for matlab 20 years ago but have now forgotten most of it. It would thus be very nice if I could find a sequence of tools doing the job for me. The first step could be an automatic mex file generator like:

    https://www.cri.ensmp.fr/~tadonki/automatic_mexfile_matlab.htm

  • ah, yeh, that's pretty far out of scope for this little script... this just provides the linkage functions (a thin shim) to translate fortran function calls into c calls, tested on the octave octfile interface. in principle it could be used to generate a shim for any set of c functions you want to call from (g)fortran, there's nothing really that specific here, i just happened to need it specifically for octave.

    you might want a fortran tutorial?

  • My goal is just to be able to speed up octave on win10 (using gfortran as shipped with octave) by writing simple fortran 77 functions as I did with matlab in the past (via matlab mex). How I get there is not so important and your script appear to solve some problem that I can not put my finger on. Here is yet another example from prehistoric time ... a function extraction fatigue cycles from a stress signal. If I could make this run on Octave-win10, then I could probably start from there.

    UBsignal2rfc.zip

  • Let's move this discussion here: https://gitlab.com/tesch1/mkoctfort/issues/1

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment