Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unaligned data warnings with Intel compiler #34

Closed
jacobwilliams opened this issue Jan 8, 2015 · 5 comments
Closed

Unaligned data warnings with Intel compiler #34

jacobwilliams opened this issue Jan 8, 2015 · 5 comments

Comments

@jacobwilliams
Copy link
Owner

Commit 0066f7d (where a SEQUENCE attribute was added to json_value type) is causing unaligned data warnings to be issued by the Intel fortran compiler (v2015). A fix is in the works.

jacobwilliams added a commit that referenced this issue Jan 8, 2015
-fixed issue #34 by rearranging the variable in json_value
-some internal refactoring.
-all changes backward compatible for ifort and gfortran.
@jacobwilliams
Copy link
Owner Author

Should be fixed now.

@szaghi
Copy link

szaghi commented Jan 8, 2015

Hi all,

I am not sure why you used "sequence" attribute (I read your developments,
but I miss this specific issue; maybe "sequence" is necessary for C
interoprrability or other peculiar situations), anyhow I would like to
highligth that declaring sequence attribute for derived type components can
compromise the optimizations of the campiler that is prevented to modify
the memory "shape". In some circumstances, the compiler optimizer greatly
improves the memory handling if it is allowed to modify the derived type
components, but the sequence can prevent this.

This is just a reminder, in many case this is not relevant, but I was not
sure that you have evaluated this aspect and I would like to help you, this
project being beatiful!

See you soon.

Il giorno 03:07 gio 08/gen/2015 Jacob Williams notifications@github.com
ha scritto:

Closed #34 #34.


Reply to this email directly or view it on GitHub
#34 (comment).

@jacobwilliams
Copy link
Owner Author

The SEQUENCE was because I'm using it an argument in a DLL subroutine. See: https://software.intel.com/en-us/forums/topic/538073 . I'll do some speed tests to see if it is causing a significant performance penalty.

@zbeekman
Copy link
Contributor

zbeekman commented Jan 8, 2015

I think that if the memory alignment warnings issued by ifort have been addressed this shouldn't be a big issue.

@szaghi
Copy link

szaghi commented Jan 8, 2015

I am not sure, but I think it is more complicated.

For example there are situations where the components of a derived type should be not aligned for memory optimization, thus the compiler use memory padding to optimize the derived type memory handling (for caching/prefetching and similar obscure nerd-details :-) ). Sequence prevent memory padding...

I think that in this case the use of sequence has not relevant consequences on performances, but if there is the time to check it, this is a plus. This is just a remainder due to my paranoiac nature.

See you soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants