Quantcast
Channel: Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1616

Building the Source Code to Run Only on the Host

$
0
0

In this step, you will compile the same source code into an application that runs only on the host.

You can use the information in this step to compile an early version of your source code to ensure that the application runs correctly on just the host. Once you have your application running on just the host, you can compile the same code into an application that runs on both the host and the target, if it meets additional limitations for the code to run on the target.

  1. Run the command make clean to make sure the directory is clean for a fresh build.

  2. Run the command make CFLAGS=-no-offload out/CrossFade to build the application so that it runs only on the host.

  3. Run the CrossFade application, as follows:

    $>out/CrossFade
    Workloads available:
     CrossFade
     CrossFade_ints
    
    This program is built without __INTEL_OFFLOAD,
    so it will execute without offload (on CPU) regardless of other options.
    
    …
    
    passed
    $>

    The following message should appear:

    This program is built without __INTEL_OFFLOAD

    This statement indicates that the sample code was compiled into an application that runs only on the host.

Note the best time per iteration, which is displayed at the end of the output. Compare this time to the best time per iteration of application built to run on the host and the target.

This is the last step in the tutorial.

The next section contains additional projects that you can compile and run to learn more about creating applications that run on both the host and the target.

Open the Building the OpenMP Version topic

Inglés

Viewing all articles
Browse latest Browse all 1616

Trending Articles



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