Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26736 Discussions

Intel Fortran character pointer corruption when enabling OpenMP

Michel_M_
Beginner
77 Views

I'm working on Intel Fortran compatibility for a fairly large code (weather prediction model). On Intel Fortran (and only Intel Fortran) some character data seems to get scrambled looping through and point character pointers to it. The characters I end up with only contains 0 and 9. The character string c simply has "00:00:00:16 (whitespace padding....)" as its content.

I was able to reproduce the issue to come up whenever I include any (dead) OpenMP code anduse -fopenmp compiler flag. I'm a bit lost at what's going on here. Please see the reproducer attached in this post. 

Expected Output: 

 testprint-2

 00:00:00:16                                                                    

                                                                                

                                                                                

                    

 testprint-3.10

 testprint-3.20

 testprint-3.3:

 testprint-3.46

 

Actual Output:

 testprint-2

 00:00:00:16                                                                    

                                                                                

                                                                                

                    

 testprint-3.10

 testprint-3.20

 testprint-3.30

 testprint-3.40

 

See also:

http://stackoverflow.com/questions/42359258/intel-fortran-character-pointer-corruption-when-enabling...

0 Kudos
1 Reply
Xiaoping_D_Intel
Employee
77 Views

Dear Customer,

 

Thanks for reporting the issue. I have reproduced the error and open a bug report for it. The bug track ID is DPD200418255.

 

Thanks,

Xiaoping Duan

Intel Customer Support

Reply