szaghi / FLAP

Fortran command Line Arguments Parser for poor people
151 stars 34 forks source link

Some minor fixes after to compile with IBM XL Fortran for Linux, V14.1 #50

Closed victorsndvg closed 9 years ago

victorsndvg commented 9 years ago
Deleted "elemental" in fuction Upper_Case due to the following XLF
following compiler error:

"1513-209 (S) The result of an elemental function must be a
 nonpointer, nonallocatable scalar, and its type parameters must
 be constant expressions."

After changing this line it compiles with XLF v14.1.

This behaviour also occurs in Lib_VTK_IO:

https://github.com/victorsndvg/Lib_VTK_IO/commit/226c38e3e52051371e540b5fde66bcde16f5648f#diff-6952d71b75ad07086220a941f2a61ba7L538

codecov-io commented 9 years ago

Current coverage is 65.26%

Merging #50 into master will increase coverage by +0.02% as of 9ae7606

@@            master     #50   diff @@
======================================
  Files            5       5       
  Stmts         2172    2173     +1
  Branches         0       0       
  Methods          0       0       
======================================
+ Hit           1417    1418     +1
  Partial          0       0       
  Missed         755     755       

Review entire Coverage Diff as of 9ae7606

Powered by Codecov. Updated on successful CI builds.

szaghi commented 9 years ago

Mmm, this is quite strange because that function should respect all the requisities the only doubt is on the length of characters result, but both intel and gfortran does not complain about it. Before accept the PR I would like investigate further.

victorsndvg commented 9 years ago

@szaghi

yes, I'm agree with you, but I need it working ... If will tell you if I discover anything ;)

victorsndvg commented 9 years ago

@szaghi I've pushed new changes into my FLAP fork. You can see the commit: https://github.com/victorsndvg/FLAP/commit/a1b75df026d476c5422fda5896525129d2589bc6

It seems to be a compiler error (Inter Fortran 15.0.2), but I cannot understand what's happening... Maybe some problems with assignment overloading?

The new lines are a non-elegant way to fix the problem, but it works now.

szaghi commented 9 years ago

@victorsndvg do not worry of "elegance", the first aim is that it works! I just keeping some times to check it. At least, pure attribute (in place of elemental) is accepted?

Also the issue with intel 15.02 is strange... the previous 14.x version works right...

victorsndvg commented 9 years ago

Hi @szaghi , yes it seems that pure in function Upper_Case is accepted

szaghi commented 9 years ago

Merged manually.