From: dpb on 26 May 2010 16:44 baalzamon.moridin wrote: > Ah in which case I am doomed. Seriously though changed that progress > bar back down to 10%! > I think there are around 8 assign labels, along with the usual side > dishes of GO TO. > On a secondary note, I was informed that if I convert the F77 code > (and from what people > are telling me - also pre F77) to F90 this will make it easier to read > (understand)? Richard addressed the "simply convert this to F90+" question -- I don't think it helps that much either, simply to recast whatcha' got and rewriting the ASSIGNs will be a problem that won't go away w/o, as he says, understanding full well what they're doing. As for the first question of the progress bar, I think you ought to seriously consider the route of testing this code that it does what you think it does (and that's what you need/want) and then if the need is to have the calculation in Matlab, mex it. _THEN_, you've got something going and could decide whether it was actually worth converting to actual Matlab code at a later date. $0.02, etc., etc., etc., of course... --
From: baalzamon.moridin on 26 May 2010 17:38 @ dpb Do you mean testing my converted code or the original? I know the original works fully. As for my attempt at a conversion, well once I have completed the translation I will test it against original. As for this 'mex' approach...I am seriously considering it. But only after I've done the conversion. <I have become rather obsessed with it now> Saying that I think that more than likely I'll end up caling the fortran functions in to MATLAB and working on them from there....
From: baalzamon.moridin on 26 May 2010 17:40 > ...I think you ought to > seriously consider the route of testing this code that it does what you > think it does (and that's what you need/want) P.s. the code does what it is supposed to and what I need it to do.
From: dpb on 27 May 2010 00:00 baalzamon.moridin wrote: > @ dpb .... > ... As for this 'mex' approach...I am seriously considering it. > But only after I've done the conversion. I'm suggesting the other way 'round, particularly if, indeed, the code satisfies in all material respects as it currently is. I don't have a clue how large it is but given the number of uglies you've mentioned, it seems likely the conversion could take a while. So, if you know it works, why not simply add the interface to call it and be done? > <I have become rather obsessed with it now> Saying that I think that > more than likely I'll end up caling the fortran functions in to > MATLAB and working on them from there.... The first part I presume would be making it a mex-function; I don't know what the last phrase means unless you mean to use the results from the Fortran mex-file inside Matlab--if so, that's what I was suggesting. On the question of testing, I hadn't seen the you had an existing executable and therefore wasn't sure other than by reading source you knew the routine(s) actually performed as you expected. Given that, see above... :) --
From: baalzamon.moridin on 27 May 2010 04:16
There are some general shortcomings with the original code; output format etc. Today I shall look into mex stuff. If anything I shall recreate the main program and some of the intial subroutines in matlab and then call some of the horrid code in - like the one with the assigns, as well as the routines such as DAXPY etc. Ultimately, at the moment I use the fortran exe, which generates text files, that I load into matlab for analysis. Some of the results are mathematical realisations that are of no use to me, as such I feel that by having the bulk of the code in matlab, then calling these routines in the manner you have mentioned, I could create arrays of data, that is filtered according to a stle of my choosing. |