1 (edited by petesun 2012-06-17 20:16:10)

Topic: Compiler options

Hi -

I see in Compiler options the choices -O, -O2, and -O3. There is no choice for -O1, yet the Help document makes reference to such a choice. Also, the GNU online documentation makes a distinction between -O1 and -O0, so it is not clear in SF what "-O" does because the choices for -O1 and -O0 are absent.

Lastly, if I go the SF Help -> Contents -> Compiler Reference and expand, the "Option Index" and "Keyword Index" sections are empty.

Thank you.

Re: Compiler options

In the Compiler Options dialog, you can actually type into that box.  I'll change -O to -O1, however, as that is incorrect.  Feel free to enter any options you wish.

I'll also look into the empty index sections in the help file.

Jeff Armstrong
Approximatrix, LLC

Re: Compiler options

Thank you Jeff.

Re: Compiler options

The most common optimization flags are probably going to be -O0 (or none at all) and -O2.  Since the default behavior is -O0, it isn't included in the drop down.  Should  -O1 be included?  Perhaps...

A better solution might be a dedicated optimization selection box for both compilers (C and Fortran) to remove them from the drop down.  Then a level could simply be selected.

In regards to the help file, I've been negligent in fixing those sections.  The compiler reference is automatically generated, and I just didn't get that fixed.  I'll have a look today.

Jeff Armstrong
Approximatrix, LLC

Re: Compiler options

Hi -

On the -O1, one issue is that the "SF IDE" specifically mentions it ("Compiler Flags"), yet the drop down in the interface does not show such a choice.

Regards

Re: Compiler options

Ah, I see that the documentation does specifically call this out.  It might be a bit misleading because it is not listed in the drop down.  In fact, you could simply type "-O1" into the box if you wish.  The box is editable, so the help file isn't technically wrong, but it is definitely misleading.

Again, none of this would be an issue if there were a way to explicitly set optimization level rather than relying on the global flags drop down.

Jeff Armstrong
Approximatrix, LLC

Re: Compiler options

I agree that the user can type the desired optimization into the box. I eventually figured that out, but as a new user last year, I was a bit confused between what I saw in the interface, and what the SF help showed. Then when I tried the "keywords" and it came up empty, I was even more confused.

8 (edited by lklawrie 2013-05-01 14:09:54)

Re: Compiler options

It would appear that the compiler option box has a limited number of characters -- so is hard to put in a long list when debugging a problem.

-----
Linda

Re: Compiler options

lklawrie wrote:

It would appear that the compiler option box has a limited number of characters -- so is hard to put in a long list when debugging a problem.

I wasn't aware of the limitation.  It's probably related to Windows as Simply Fortran is not explicitly limiting the length to the best of my knowledge.  I'll go see what I can do about this.

Jeff Armstrong
Approximatrix, LLC

Re: Compiler options

lklawrie wrote:

It would appear that the compiler option box has a limited number of characters -- so is hard to put in a long list when debugging a problem.

This bug has been fixed in the development version.

Jeff Armstrong
Approximatrix, LLC

Re: Compiler options

Jeff,

Thanks for the fixes in 1.44 for the compiler option and the Help. Looks nice.

Regards