Internal Error: Bad Pointer

Internal Error: Bad Pointer

I'm attempting to compile the attached file with icpc -mmic -openmp offload.cpp. Unfortunately, I get the following error:

offload.cpp(9): internal error: bad pointer
    #pragma omp target map(inarray[0:SIZE]) map(sum)
    ^

Help much appreciated! FYI, I'm using 2013.4 toolset on Linux.

AttachmentSize
Download offload.cpp523 bytes
4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I reproduced the error with the earlier 2013.4 release you used and confirmed it is fixed in the latest Composer XE 2013 SP1 Update 2 release (See below).

$ icpc -V -mmic -openmp tt.cpp
Intel(R) C++ Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.2.144 Build 20140120
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.

Edison Design Group C/C++ Front End, version 4.6 (Jan 20 2014 22:19:47)
Copyright 1988-2013 Edison Design Group, Inc.

tt.cpp(5): warning #3180: unrecognized OpenMP #pragma
  #pragma omp declare target
          ^

tt.cpp(9): warning #3180: unrecognized OpenMP #pragma
    #pragma omp target map(inarray[0:SIZE]) map(sum)
            ^

GNU ld (GNU Binutils) 2.22.52.20120302

 

The OpenMP 4.0 target directives are not intended for use with the -mmic option. You compile this program without that option.

$ icpc -V -openmp tt.cpp
Intel(R) C++ Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.2.144 Build 20140120
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.

Edison Design Group C/C++ Front End, version 4.6 (Jan 20 2014 19:26:22)
Copyright 1988-2013 Edison Design Group, Inc.

Edison Design Group C/C++ Front End, version 4.6 (Jan 20 2014 22:19:47)
Copyright 1988-2013 Edison Design Group, Inc.

GNU ld (GNU Binutils) 2.22.52.20120302

GNU ld version 2.20.51.0.2-5.36.el6 20100205

$ ./a.out
Reduced sum 499500, expected 499500

 

Thanks, simply removing the -mmic flag helped me compile and run the program.

Glad to hear that.

I perhaps should have been clearer in my earlier reply that while the OpenMP 4.0 target directives produce warnings when compiling with -mmic, those do not preclude building and running the small program natively on the coprocessor if desired. The target directives support offloading code to attached devices and thus are not applicable in native mode so those are ignored and produce the warnings shown; however, the code can still be compiled and run natively.

Login to leave a comment.