Global default 8 byte integers and reals kills OpenMP

Global default 8 byte integers and reals kills OpenMP


We have an application that has global default 8-byte integers and reals and we want to introduce some parallelism. We have discovered, unfortunately, using a little demo program, that the 8 byte numbers disables OpenMP. All the other parallelism settings seem to be correct because the demo works. When we turn on global default 8 byte numbers ONLY, then the demo loses parallel operation.

My guess is that behind the scenes, OpenMP uses 4 byte numbers that do not respond well to being 8 bytes. Is there any way we can get OpenMP to work with the global default 8 byte numbers? (Changing the application would be a huge task that would probably not be contemplated!)

Regards, Geoff

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

A pure Fortran application built entirely with ifort should work with any of the autodouble options applied consistently, with or without Intel OpenMP. Many customers rely on it. As you are being vague about "global default 8-byte integers" I don't know if you mean that.
The 64-bit integer default requires an explicit change of MKL libraries to ilp64, which isn't available in the 32-bit implementation.
I don't know of any such option for C/C++.
Requests have been filed for 64-bit Intel MPI support of 64-bit integers, but that doesn't exist. It means all the MPI calls need explicit copying of 64- to 32-bit for the call.

Thanks for your reply Tim.
I'm pretty sure we're talking about the same thing - in VS2010, setting the Fortran / Data / Integer and Real items to 8 (default is 4).
I've being using both MPI and OpenMP satisfactorily, but I had the option of using 32-bit numbers. My colleague is working with software that has 64-bit numbers (integers and reals [not using double precision]) as default and is only using OpenMP - except it's not working, the "threads" are not running in parallel. As I said, I could duplicate his observed behaviour in a small demo using his VS settings and when I replaced the 64-bit integer and real definitions with 32-bit ones, OpenMP/parallelism worked. Note, this demo did not involve either MKL or MPI.
Knowing that it "should work" is somewhat comforting, but I'd be even more comforted knowing that you have a demo or some other evidence that it actually does work ;-)
Thanks & cheers, Geoff

I have what I think is a bug. I have a very simple OpenMP program with two threads. When compiled with integer(4) real(4) the print statements shows that the parallelness is working (the "parallel variables" are defined). When compiled with integer(8) real(8) the parallelness doesn't work. I have a VS2010 project zipped up and ready to send (809 kb) but it's not clear to me how I should do this ("Add Files" doesn't appear to do it). The project is currently set to int8/rl8 to show the "not working" state. If you change project properties / Fortran / Data / Default Integer KIND and Default Real KIND back to 4, it works.

Would someone please like to have a look at this and tell me how to upload it?

Cheers, Geoff

If you want a Windows Fortran OpenMP question looked at on the forum, the Windows Fortran forum is the place. There you will see more advice about how to get the file attachment working, including links to the advice in Steve Lionel's posts.

Ok, thanks TIM.

Leave a Comment

Please sign in to add a comment. Not a member? Join today