Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29280 Discussions

Intel Fortran character pointer corruption when enabling OpenMP

Michel_M_
Beginner
575 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-openmp

0 Kudos
1 Reply
Xiaoping_D_Intel
Employee
575 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

0 Kudos
Reply