next up previous
Next: 7 The ADAPTOR Compiler Up: ADAPTOR Installation Guide Previous: 5 The ADAPTOR Source-to-Source

Subsections


6 The ADAPTOR Runtime Systems

6.1 Overview

The Fortran programs generated by the source-to-source translation have to be linked with the ADATPOR HPF or OpenMP runtime system. Therefore, the runtime libraries of LIBADP must be installed on your machine. There will be different libraries available providing HPF and OpenMP runtime support as well as interfaces to wide-spread standards like MPI, PThreads, and PAPI.

The libraries have been implemented in C. Most source files are machine-independent, but there are certain machine and compiler dependencies left. The machine and compiler dependencies are all in the file MACHINE_CONF.m4. This file is generated automatically by the configure script from MACHINE_CONF.m4.in. The Gnu m4 Macro Processor is used to generate correct source files for the LIBADP runtime system.

The ADAPTOR runtime system uses MPI [SOHL$^+$96] for node parallelism and PThreads [NBFF96] for shared memory parallelism. MPI and/or PThreads must be available on the target platform if the corresponding parallelism should be exploited.


6.2 Building the Libraries

For the installation of the LIBADP go into the corresponding subdirectory and just type make. Regarding the Makefile, the C compiler CC and options CFLAGS, the same mechanism is used as for the transformation tool fadapt (see Section 5.2).

After succesful compilation there should be the following libraries in the directory:

The configure script will identify if your system supports MPI and/or PThreads and if PAPI, PCL or VampirTrace available. If there is no support, the corresponding libraries of the runtime system will not be available. Without MPI, you will miss libadp_dm_mpi.a, without PThread support, you will miss libadp_mp_pthreads.a, and so on.


6.3 Configuration of ADAPTOR Runtime System LIBADP

The configuration of the LIBADP is done automatically by the configure script. It genterates the Makefile from Makefile.in by replacing values for all the variables of the kind @NAME@.

...
SM_LIBS   = $(SM_NULL) $(SM_OMP) @DALIB_SM_LIBS@
DM_LIBS   = $(DM_NULL) @DALIB_DM_LIBS@
PM_LIBS  = $(PM_NULL) @DALIB_PM_LIBS@
TRACE_LIBS = $(TRACE_NULL) @DALIB_TRACE_LIBS@
...
CPU      = @CPU@
OS       = @OS@
CC       = @CC@
MPI_INC  = @MPI_INC@
PAPI_INC = @PAPI_INC@
PCL_INC  = @PCL_INC@
VT_INC   = @VT_INC@
INCL     = $(MPI_INC) $(PAPI_INC) $(PCL_INC) $(VT_INC)
COPT     = @CFLAGS@ $(INCL) -D$(OS) -D$(CPU)
RANLIB   = @RANLIB@

Note: The variables CPU and OS identify the processor and operating system on your machine.

The Makefile will only generate those interface libraries for which the configuration has guaranteed to find correct include files and available native libraries (e.g. MPI, pthreads, PAPI, PCL, Perfctr, VampirTrace). If you want to add an additional interface (e.g. after installation of PAPI) you have to change the corresponding entry for the variables defining the interfaces.

SM_LIBS    = $(SM_NULL) $(SM_OMP) $(SM_THR)
DM_LIBS    = $(DM_NULL) $(DM_MPI)
PM_LIBS    = $(PM_NULL)  $(PM_PCL) $(PM_PAPI) $(PM_PERFCTR)
TRACE_LIBS = $(TRACE_NULL) $(TRACE_VT) $(TRACE_VTSP) $(TRACE_VTSAMPLE)

Please check also that you have now the correct include directory specified so that the interface can be compiled correctly.

MPI_INC  = -I...
PAPI_INC = -I...
PCL_INC  = ...

The file MACHINE_CONF.m4 is also generated automatically. It contains information about the C datatypes that correspond to the Fortran datatypes and about how C programs have to be named that they can be called within a Fortran program.


next up previous
Next: 7 The ADAPTOR Compiler Up: ADAPTOR Installation Guide Previous: 5 The ADAPTOR Source-to-Source
Thomas Brandes 2004-03-19