Quantcast
Channel: Intel® Many Integrated Core Architecture
Viewing all articles
Browse latest Browse all 1347

offload and STL problem

$
0
0

Hi 

The following test returns an undefined reference for the target code

#include <algorithm>

void test()

{

#pragma offload target(mic)

    {

       double a=1.0;

       double b=1.0;

       double c=std::max(a,b);

    }

}

int main()

{

  test();

}

icpc -openmp -offload-option,mic,ld,'-zdefs' micstl.cxx

/tmp/icpcwXQiLo.o: In function `__offload_entry_micstl_cxx_6test_11b7a23007ddafd41960e6289788656dicpc326259940ELibIR':

micstl.cxx:(.text+0x72): undefined reference to `double const& std::max<double>(double const&, double const&)'

icpc --version

icpc (ICC) 14.0.4 20140805

Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.

Do I need to link to a specific library on the mic?

Thanks

Jamil


Viewing all articles
Browse latest Browse all 1347

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>