Download Allinea DDT and MAP User Guide

Transcript
Allinea DDT/MAP v4.2.2-39977
Compiling the MAP MPI Wrapper Library
First you must compile the MAP MPI wrapper library for your system using the make-map-staticlibraries command:
user@login:˜/myprogram$ make-map-static-libraries
Created the MAP libraries in /users/ddt/allinea
libmap-sampler.a
libmap-sampler-pmpi.a
To instrument a program, add these compiler options:
compilation : -g (and -O3 etc.)
linking : -L/users/ddt/allinea -lmap-sampler-pmpi \
-Wl,--undefined,allinea_init_sampler_now \
-lmap-sampler -lstdc++ -lgcc_eh \
-Wl,--whole-archive -lpthread
-Wl,--no-whole-archive \
-Wl,--eh-frame-hdr
Linking with the MAP MPI Wrapper Library
Then when linking your program you must add the path to the MAP libraries (-L/path/to/map-libraries),
and the libraries themselves (-lmap-sampler-pmpi, -lmap-sampler).
The MAP MPI wrapper library (-lmap-sampler-pmpi) must go:
1. After your program's object (.o) files.
2. After your program's own static libraries (e.g. -lmylibrary).
3. After the path to the MAP libraries (-L/path/to/map-libraries).
4. Before the MPI's Fortran wrapper library (e.g. -lmpichf) (if any).
5. Before the MPI's implementation library (usually -lmpi).
6. Before the MAP sampler library (-lmap-sampler).
The MAP sampler library (-lmap-sampler) must go:
1. After the MAP MPI wrapper library.
2. After your program's object (.o) files.
3. After your program's own static libraries (e.g. -lmylibrary).
4. After -Wl,--undefined,allinea init sampler now.
5. After the path to the MAP libraries (-L/path/to/map-libraries).
6. Before -lstdc++, -lgcc eh, -lrt, -lpthread and -lc.
Example:
mpicc hello.c -o hello -g -L/users/ddt/allinea \
-lmap-sampler-pmpi \
-Wl,--undefined,allinea_init_sampler_now \
-lmap-sampler -lstdc++ -lgcc_eh \
-Wl,--whole-archive -lpthread \
-Wl,--no-whole-archive \
c 2015 Allinea Software Ltd.
125