Silverfrost Forums

Welcome to our forums

Few bugs and suggestions

28 Dec 2016 3:44 #18623

I looked at the 64bit compiler and found that it finally gets closer to the release. The %PL substitute was added, OpenGL works like charm swallowing orders of magnitude more stuff and still being almost instant, no hell with stack, large arrays just work transparently without reminding about past problems. I hope that the SDBG64 (which is still in very bad shape generating not human-readable messages I would never ever wanted to see) also be finished soon.

Here are few found bugs. And few suggestions, which could be already fixed.

  1. If include 'file.for' statement exists in the text, SDBG64 gives wrong line number diagnostics in case of error and shows wrong place in the text when debugger is used adding to the real length the length of the 'file.for'.

  2. %wp backgrounds do not work if added as a RESOURCES at the end of the Fortran source file

  3. same with %ic icon

  4. sound@(ifreq, length) is not found

  5. When error occurs the debugger popup window can not be closed with Esc

  6. 32bit version linker accepted the following commonly accepted syntax SLINK file1.obj file2.obj which generate the file1.exe. New 64bit linker crashes with small cryptic and scary error message which is hard to decipher :

'***Command file terminated unexpectedly - use a file command to save the load.'

I'm sure such messages though they are formally correct make people hate programming. Would be great to start changing the way compiler reports error messages, making messages longer, clarifying what could be potentially wrong, even having links so that user can click and get exactly into the relevant Help topic, etc. Last thing I expected in the example above was that the previous syntax of linker was either removed or new one was introduced: SLINK64 file1.obj file2.obj /file:file3.exe

  1. by some reason INTEGER (kind=7) ihandle i=winio('%hw', ihandle ) does not work

VIII ) %PL by default must generate great looking production quality plot, not the basic poor one with old ugly fonts. May be here we have to setup few great basic designs which will satisfy everyone

28 Dec 2016 7:54 #18624

Dan

Thanks for the feedback. Here is a response to some of these issues.

  1. %wp and %ic work OK for me but RESOURCES only has effect when used with FTN95 command line options /LINK or /LGO. See notes on 64 bit compilation.

  2. sound@ was missing and has now been added.

  3. Works OK if winio@ is used rather than winio.

28 Dec 2016 7:59 #18625

Dan

If you would like to choose a nice font, font size and background colour etc. for %pl then I could add an option to use that style.

28 Dec 2016 9:22 #18629

Quoted from PaulLaidler

  1. %wp and %ic work OK for me but RESOURCES only has effect when used with FTN95 command line options /LINK or /LGO. See notes on 64 bit compilation.
  2. Works OK if winio@ is used rather than winio.
  1. If you would like to choose a nice font, font size and background colour etc. for %pl then I could add an option to use that style.

Paul, Thanks for responds.

  1. RESOURCES statement had effect with 32bits in all cases. That gave us less pain and even less crashes then using separate command with SRC. Why RESOURCES works only for /LINk and /LGO now ?

  2. As to INTEGER (7) for %hw parameter there was no error in my source just the typo in the forum. So the question remains: does this code run OK ? It crashes in my case with error message requiring INTEGER (7) but when i declare it as INTEGER (kind=7) or integer*8 it does not accept it at run time

    integer (7) ihw i=winio@('%ww&') i=winio@('%gr%ff&',200,200) i=winio@('%bt[OK]&') i=winio@('%hw',ihw) end

  3. I suggest exactly reproduce this genial style as a default which looks like ideal to me with its axis size, ticks, fonts, lines and caption sizes, all item positions and proportions. It is done by professional scientific software called OriginLab. This plot is from one of our published works. I know that is not easy even just to copycat things which are great, that may take some serious time. Though fonts is called Arial, it is a bit different from Arial on our PCs and it is own default font there. I call it ideal Arial. Ideally this font has to be supplied with the compiler

https://s23.postimg.org/7lxvwxcfv/Graph_Design1.png

Another ideal font has Apple presentation software, which was very popular in all presentations for 3 decades in all national labs in US. Will try to find an example

30 Dec 2016 8:32 #18635

Dan

Why RESOURCES works only for /LINk and /LGO now ?

SLINK64 is completely new so its user interface is slightly different and it does not yet have all the features of SLINK.

So the question remains: does this code run OK ?

It runs OK for me but I you may need to wait for the next full release for it to work for you.

I can use a default Helvetical font for %pl. Perhaps Verdana or Tahoma depending on their general availability.

1 Jan 2017 3:28 #18642
  1. Then if %hw does not work I am surprised how people used Clearwin+ so far...Only for simple uses probably

  2. As to the fonts i'd strongly suggest to find exact font I mentioned as the one called Arial in out PCs looks ugly. Other fonts? Well...depends. Sometimes it is useful but I find other fonts are closer to the OriginLab ideal Arial but they periodically disappear in new releases of Windows. Latha for example was in Windows 7 and is not here in Windows 10

  3. Also, when I made some my native %pl work in the code which has probably 100 of them I was surprised that the graphics screen was not inside the window created previously but popped out as a separate graphics screen. Can several %pl plots be made on the surface of one common window?

  4. And here are few low level diagnostics messages from supposedly high level language. I am stuck with adopting new %pl, things instead of being a snap go hell slow.

Right now i am guessing what the hell are these cryptic diagnostics as if developers are competing if they will fit their diagnostics message into 72 characters (and the messages stop not a novice but the person with almost 20 years of experience in Clearwin and who has the 32bit version of exactly the same code with the exactly the same data working OK):

'Invalid scale value in %PL specification at address 1c007f89'

What is scale? Which scale? Why not tell more verbose on the possible reason and place? I have a half a dozen of Y arrays to plot curves when calling this %pl. Which one causing problem? May be X ? And these 1c007f89.... as i wrote many times there must be an option to suppress any traces of mentioning binary addresses like '...at address 1c007f89'. Diagnostics must be human-oriented not zombies-oriented. Now instead of completely solving the problem by itself COMPUTER MAKES US PROBLEMS PUSHING US DECIPHERING BINARY MESSAGES. So last century...

For those who like binary addresses should be some switch allowing it. Same in Debugger - must be no binary junk and assembler commands, only at special request by the programmer. I suggest do not throw it away though, in 100 years from now when our brain will be substituted by silicone this might be useful 😃

'Missing '[' after format code %pv in call to WINOPTS@ at address 1c007f89'

What is [ ? $pv does not have any [. What WINOPTS@ - we have WINOP@? And again binary address...

Wondering is this how C programmers work and even such cryptic messages are literally opulence for them?

2 Jan 2017 8:10 #18643

Dan

  1. The short answer is that I don't know why it is not working for you.

  2. I am not happy with the idea of shipping a special font with ClearWin+. Verdana is a nice font and apparently has been shipped with Windows operating systems since 1996. Failing that, ClearWin+ will use its Windows default font.

  3. %pl behaves as previously, appearing within the current parent window. You can draw up to 10 different graphs in one %pl.

  4. the %pl option 'scale' can be [scale=linear], [scale=linear_log], [scale=log_linear] or [scale=log_log]. Anything else will fail. The default is 'linear'. I don't know about the missing '[' without seeing your code.

3 Jan 2017 4:06 (Edited: 6 Jan 2017 3:56) #18646

I still did not resolve any of my previous issues in previous post, that may take time, these were pretty complex cases. meantime I played more with new %PL on much simpler variants.

  1. Here is how looks new %pl using mentioned fonts. Text of Fortran source is attached. I can post data too but better just send me personal message and I will email it https://s24.postimg.org/4ymmngzo5/New_PL_20170102.jpg

    USE clrwin integer, parameter :: n_dim = 1153 real*8 xstart, X(n_dim), Y(n_dim)

    OPEN (UNIT=275,FILE='A.dat',STATUS='old',err=990) do i=1,10000 if(i.gt.n_dim) goto 100 read(275,*,err=995,end=100) X(i), Y(i) enddo 100 close(275) n_points=i-1 xstart=0 ! X(1)

       i=winio@('%ww[no_border]%es%ca[Default Plot]%pv&') 
    

    ! i=winio@('%fn[Verdana]&') i=winio@('%fn[Tahoma]&') i=winio@('%ts&', 3.1d0) i=winio@('%tc&',rgb@(0,0,0)) i=winio@('%bf&') i=winio@('%`bg&',rgb@(250,255,255)) ! CALL winop@('%pl[SCALE=LINEAR]') ! *** DOES NOT WORK *** CALL winop@('%pl[n_graphs=1]')
    CALL winop@('%pl[title='Sample plot']') CALL winop@('%pl[x_axis=Wavelength A]') CALL winop@('%pl[y_axis=Intensity]') CALL winop@('%pl[width=3]') CALL winop@('%pl[smoothing=4]') ! anti-aliasing CALL winop@('%pl[colour=black,style=0,pen_style=0]')
    i=winio@('%pl',1502,880,n_points,xstart, x,y)

    goto 10000

    !................. errors ...................... 990 Print*, 'Error opening file A.dat for read' goto 10000 995 Print*, 'Error reading file A.dat' goto 10000

    10000 continue end

Plotting utility works perfect, antialiasing will probably do the job too (I did not check). Some differences you can notice in fine details of the curve are due to digitizer problem as I can not find the original data and sniffed it from the plot.

But there are still a lot of problems

  1. The original X data is from 12 to 22 but by some unknown reason %pl shows absolutely wrong X numbering
  2. Bold Face font %bf does not work on numbering, only on title
  3. Axis width is 1 pixel and not changeable
  4. Tics are too small and also 1 pix width
  5. Top X and right Y axis are not available as an option
  6. X axis caption at the right instead of center
  7. tic marks numbering needs further adjustments

This plot above was done after additional beautification efforts. It is not a default plot with minimal efforts and zero additional settings. Minimal one plots everything very ugly (lines are 1 pixel size, fonts are unreadably small etc) like the original Simpleplot have done before.

  1. If add Y_Max=200

    CALL winop@('%pl[Y_max=200.]')

the Y axis looks better, still not as good as original Ideal Sample I was trying to reproduce. The Y axis tics numbering looks correct in this case. Good would be the option to set the step of tic marks, they are placed way too often. On Y axis mote then 5-6 for linear plot is rarely needed. LOG plot is different story. X axis is longer and may have more tick numbers

https://s24.postimg.org/edxwn7uyt/New_PL_20170102_ymax.jpg

  1. Commented line in source text causes run-time error
  2. Axis line width is 1 pixel and does not change with line width settings or plot size. Ideally is to make curves and axis lines settings different. And settings when all sizes change depending on whole plot size Ideally to make
  3. X axis is crowdy and numbering is odd
3 Jan 2017 9:03 #18647

Dan, to avoid the %hw error, you can use the newdlls4. With my programs, only the newdlls11 and higher produces the %hw error. Or you wait for the next release. Chemie

3 Jan 2017 9:12 #18648

Quoted from PaulLaidler

  1. %pl behaves as previously, appearing within the current parent window. You can draw up to 10 different graphs in one %pl.

Paul,

I was asking more about these types of multiplots when one %ww window has numerous %pl : https://s24.postimg.org/a8u9byjf9/Sample2.jpg

https://s28.postimg.org/mlps7gjd9/Best_Designs2.jpg

Last pair by the way look to me as an example of Ideal Plot #2 (excluding its dumb Y axis numbering).

As to 10 plots restrictions, the plot like the last one in my case may have 100 curves. or 300.

With this here is another question/suggestion: would be handy to have simplest version of %pl capable of 'native, independent' multi-curve plotting by this simple way

      i=winio@('%pl', x_size, y_size, n_points, x, y) 

where X and Y are both arrays X(n_curves), Y(n_curves)

Doable?

3 Jan 2017 4:55 #18649

multi-curve plotting by this simple way

X and Y are already arrays for each graph so they would have to have two-dimensions. Then they would be ragged unless they all had the same number of points.

At the moment I am not planning any significant extensions to %PL. The initial aim was to try to get existing %PL code to work with the exception of [user_drawn].

3 Jan 2017 11:37 #18650

Paul, So far I converted only one simple %pl case to 64bits, others are more complex and literally kill me with errors which is often hard to comprehend. Can you please fix ASAP the SDBG64 not correctly showing the debugged place if 'include file.for' is used in the source text? It is impossible to use debugger at all currently. Or introduce appropriate option. Now if you click on Options the debugger self-aborts without the trace.

4 Jan 2017 3:10 #18652

SDBG64 is a work in progress and my understanding is that the next release will show significant improvements. After that we should be in a position to be able to deal with specific issues.

5 Jan 2017 4:48 #18660

I was probably not clear. This is not something extra, this is major general defect of SDBG64 or compiler. The code crash reports the error in line 19169 for example but in reality the error is in the line 9266 which is 9903 lines off !!!

I see last build is dated June 2016, 6 months ago. Would be great to have so called 'night builds' of the compiler, or at least some stable monthly builds.

5 Jan 2017 8:05 #18664

I understand that this is not a minor issue. At the moment the line numbers and hence to break point is not always correct. Also that include files cause major problems. We are aware of these issues and aim to have a fix as soon as possible.

We are working towards providing more intermediate releases of separate components. To some extent we can do this for the DLLs and maybe for SLINK etc. but at this stage the development of the 64 bit debugger is linked to changes in the compiler. Only in exceptional cases (e.g. immediately after a full release) can we consider intermediate releases of the compiler.

6 Jan 2017 6:28 #18667

Things are that earlier adopters feel the largest pain so the updates for new features must be more frequent.

Also, I urge users do not hesitate and more often write here about any problems as well as your suggestions for improvements, do not hesitate, you are anonymous anyway.

I think Silverfrost also has to make incentives for those who wants this compiler to be better. How about making Salford city or FTN95 mugs for example, or something else, you decide, to those who found most bugs, one most amazing bug, made most of useful suggestions, or some noticeable improvement during calendar year ? I am ready to contribute some little funds, say $50-100 for the appreciation prizes, that would be enough for next few years. Or someone can contribute more or even much more if he feels that his large fortune was made partially by this great compiler. This year appreciation prize would probably go to mecej4 or John Campbell or someone else i miss as i was too busy to follow all the posts 😃.

Please login to reply.