• No results found

Intel Xeon Phi

D.4.1 Requirements

MPSS Minimum Version DDT 2.1.4982-15 Offload Support (DDT) 2.1.6720-13 MAP 2.1.6720-19

D.4.2 Installation

To debug or profile programs running on Intel Xeon Phi cards you need two separate Allinea Tools installations: one for the host machine (the machine the Xeon Phi cards are installed in) and one for the Xeon Phi cards themselves.

The Allinea Tools installation for the Xeon Phi card must be accessible from the Xeon Phi card itself, either using NFS (recommended) or a filesystem overlay (not recommended as it reduces the available memory).

To debug heterogeneous (host + Xeon Phi) MPI program you must first create a symbolic link from the host Allinea Tools installation to the Xeon Phi Allinea Tools installation:

ln -s /path/to/allinea-tools-xeon-phi/bin/ddt-debugger \

/path/to/host/allinea-tools-x86_64/bin/ddt-debugger.k1om See also the section E.9.7 MAP harmless error messages in Xeon Phi.

D.4.3 Configuration

DDT MAP

Native Xeon Phi non-MPI Programs remote remote

Native Xeon Phi Intel MPI Programs remote remote

Heterogeneous Intel MPI Programs GUI / offline GUI / offline Heterogeneous Programs (#pragma offload) GUI / offline GUI / offline

Native Xeon Phi non-MPI Programs Debugging

To debug a native Xeon Phi non-MPI program:

1. Create a symbolic link from the host Allinea Tools installation to the Xeon Phi Allinea Tools installation:

ln -s /path/to/allinea-tools-xeon-phi/bin/ddt-debugger \

/path/to/allinea-tools-x86_64/bin/ddt-debugger.k1om 2. Start DDT on the host (using the host installation of DDT).

3. Click the Remote Launch drop-down on the Welcome Page and select Configure... 4. Enter the host name of the Xeon Phi card (e.g. micdev-mic0) in the Host Name box. 5. Select the path to the Xeon Phi installation of DDT in the Installation Directory box. 6. Click Test Remote Launch and ensure the settings are correct.

7. Click Ok.

8. Click Run and Debug a Program on the Welcome Page.

9. Select a native Xeon Phi program in the Application box in the Run window. 10. Click Run.

Profiling

To profile a native Xeon Phi non-MPI program:

1. Create a symbolic link from the host Xeon Phi Allinea Tools installation to the host Allinea Tools installation:

ln -s /path/to/allinea-tools-xeon-phi/bin/ddt-debugger \

/path/to/allinea-tools-x86_64/bin/ddt-debugger.k1om 2. Start MAP on the host (using the host installation of MAP).

3. Click the Remote Launch drop-down on the Welcome Page and select Configure... 4. Enter the host name of the Xeon Phi card (e.g. micdev-mic0) in the Host Name box. 5. Select the path to the Xeon Phi installation of MAP in the Installation Directory box. 6. Click Test Remote Launch and ensure the settings are correct.

7. Click Ok.

8. Click Profile a program on the Welcome Page.

9. Select your native Xeon Phi program in the Application box in the Run window. 10. Click Run.

Native Xeon Phi Intel MPI Programs Debugging

Note: The DDT GUI can not run on the Xeon Phi card directly.

To debug a native Xeon Phi MPI program:

1. Create a symbolic link from the host Allinea Tools installation to the Xeon Phi Allinea Tools installation:

ln -s /path/to/allinea-tools-xeon-phi/bin/ddt-debugger \

/path/to/allinea-tools-x86_64/bin/ddt-debugger.k1om 2. Start DDT on the host (using the host installation of DDT).

4. Enter the host name of the Xeon Phi card (e.g. micdev-mic0) in the Host Name box. 5. Select the path to the Xeon Phi installation of DDT in the Installation Directory box. 6. Click Test Remote Launch and ensure the settings are correct.

7. Click Ok.

8. Click Run and Debug a Program on the Welcome Page.

9. Select a native Xeon Phi MPI program in the Application box in the Run window.

DDT should have detected 'Intel MPI (MPMD)' as the MPI implementation in File → Options (DDT → Preferences on Mac OS X) → System.

10. Click Run. Profiling

To profile a native Xeon Phi Intel MPI program:

1. Create a symbolic link from the host Xeon Phi Allinea Tools installation to the host Allinea Tools installation:

ln -s /path/to/allinea-tools-xeon-phi/bin/ddt-debugger \

/path/to/allinea-tools-x86_64/bin/ddt-debugger.k1om 2. Ensure the Intel Compilers and MPI are in your path.

3. Start MAP on the host (using the host installation of MAP).

4. Click the Remote Launch drop-down on the Welcome Page and select Configure... 5. Enter the host name of the Xeon Phi card (e.g. micdev-mic0) in the Host Name box. 6. Select the path to the Xeon Phi installation of MAP in the Installation Directory box. 7. Click Test Remote Launch and ensure the settings are correct.

8. Click Ok.

9. Click Profile a program on the Welcome Page.

10. Select your native Xeon Phi MPI program in the Application box in the Run window. MAP should have detected 'Intel MPI (MPMD)' as the MPI implementation in File →

Options (MAP → Preferences on Mac OS X) → System.

11. Click Run.

Heterogeneous (host + Xeon Phi) Intel MPI Programs Debugging

To debug a heterogeneous (host + Xeon Phi) Intel MPI program:

1. Create a symbolic link from the host Xeon Phi DDT installation to the host DDT installation:

ln -s /path/to/allinea-tools-xeon-phi/bin/ddt-debugger \

/path/to/host/allinea-tools-x86_64/bin/ddt-debugger.k1om 2. Start DDT on the host (using the host installation of DDT.

3. Open the Options window: File → Options (MAP → Preferences on Mac OS X). 4. Select Intel MPI (MPMD) as the MPI Implementation on the System page. 5. Check the Heterogeneous system support check box on the System page. 6. Click Ok.

7. Click Run and Debug a Program in the Welcome Page.

9. Enter an MPMD style mpiexec command line in the mpiexec Arguments box, e.g.

-np 8 -host micdev /home/user/examples/hello-host : -np 32 -host micdev- mic0 /home/user/examples/hello-mic

10. Set Number of processes to be the total number of processes launched on both the host and Xeon Phi (e.g. 40 for the above mpiexec Arguments line).

11. Add I_MPI_MIC=enable to the Environment Variables box.

12. Click Run. You may need to wait a minute for the Xeon Phi processes to connect. Profiling

To profile a native Xeon Phi Intel MPI program:

1. Create a symbolic link from the host Xeon Phi Allinea Tools installation to the host Allinea Tools installation:

ln -s /path/to/allinea-tools-xeon-phi/bin/ddt-debugger \

/path/to/allinea-tools-x86_64/bin/ddt-debugger.k1om

2. Open the Options window: File → Options (MAP → Preferences on Mac OS X). 3. Select Intel MPI (MPMD) as the MPI Implementation on the System page. 4. Check the Heterogeneous system support check box on the System page. 5. Click Ok.

6. Click Run and Debug a Program in the Welcome Page.

7. Select the path to the host executable in the Application box in the Run window. 8. Enter an MPMD style mpiexec command line in the mpiexec Arguments box, e.g.

-np 8 -host micdev /home/user/examples/wave-host : -np 32 -host micdev- mic0 /home/user/examples/wave-xeon-phi

9. Set Number of processes to be the total number of processes launched on both the host and Xeon Phi (e.g. 40 for the above mpiexec Arguments line).

10. Add I_MPI_MIC=enable to the Environment Variables box.

11. Click Run. You may need to wait a minute for the Xeon Phi processes to connect. Heterogeneous Programs (#pragma offload)

The OFFLOAD_MAIN environment must be unset, or set to on_offload or on_offload_all when debugging offload programs in DDT. If OFFLOAD_MAIN is set to on_start then DDT will not attach to the offloading host processes.

Memory debugging is not supported for programs that use #pragma offload at present. Please contact support if this affects you.

Debugging

When debugging offloaded code (i.e. code offloaded to the Xeon phi using #pragma offload) DDT can automatically attach to the offload process running on the Xeon Phi Card.

To debug a heterogeneous program that uses #pragma offload:

1. Create a symbolic link from the host Xeon Phi DDT installation to the host DDT installation:

ln -s /path/to/allinea-tools-xeon-phi/bin/ddt-debugger \

2. Start DDT on the host (using the host installation of DDT).

3. Open the Options window: File → Options (DDT → Preferences on Mac OS X). 4. Select Intel MPI (MPMD) as the MPI Implementation on the System page. 5. Check the Heterogeneous system support check box on the System page. 6. Click Ok.

7. Ensure Control → Default Breakpoints → Stop on Xeon Phi offload is checked. 8. Click Run and Debug a Program on the Welcome Page.

9. Select a heterogeneous program that uses #pragma offload in the Application box in the 10. Run window.

11. Click Run.

Profiling

MAP does not support profiling of offloaded code (i.e. code offloaded to the Xeon phi using #pragma offload). The host portion of the program may be profiled as normal.

E General Troubleshooting and Known Issues

If you have any problems with DDT or MAP, please take a look at the topics in this section – you might just find the answer you're looking for. Equally, it's worth checking the support pages of www.allinea.com and making sure you have the latest version.