Running a sample program
Notes
(extract from IBM RedbookThe IBM XL compilers are available for applications written in FORTRAN, C, and C++. Most of the XL compiler options on Blue Gene/L are the same as options on other IBM platforms.
The XL compilers for Blue Gene/L have been customized for the runtime environment of the compute nodes. These customized versions are available on the JUBL login node and are named blrts_xxx.
Sample Program
A sample program written in C is available on the JUBL system under-
/bgl/local/samples/helloworld/helloworld.c
-
/bgl/local/samples/helloworld/Makefile
#####################################################################
# #
# (c) COPYRIGHT IBM CORP. 2001, 2005 ALL RIGHTS RESERVED. #
# #
# LICENSED MATERIALS-PROPERTY OF IBM. #
# #
#####################################################################
BGLSYS = /bgl/BlueLight/ppcfloor/bglsys
CC = /usr/bin/blrts_xlc
CPPC = /usr/bin/blrts_xlc
FC = /usr/bin/blrts_xlf90
# try -qarch=440 first, then use -qarch=440d for 2nd FPU later on
# (SIMDization requires at least -O3)
# use -qlist -qsource with 440d and look for Parallel ASM instructions.
#
CFLAGS= -O3 -g -I$(BGLSYS)/include -L$(BGLSYS)/lib -qarch=440 -qtune=440
FFLAGS= -O3 -g -I$(BGLSYS)/include -L$(BGLSYS)/lib -qarch=440 -qtune=440
#
LIBS_MPI = -lmpich.rts -lmsglayer.rts -lrts.rts -ldevices.rts
LIBSF_MPI = -lmpich.rts -lfmpich.rts -lmsglayer.rts -lrts.rts -ldevices.rts
default: helloworld.rts
helloworld.rts: helloworld.o
$(CC) $(CFLAGS) -o helloworld.rts helloworld.o $(LIBS_MPI)
helloworld.o: helloworld.c Makefile
clean::
rm -rf *.o *~ *core*
rm -rf *.rts
The program can be started with:
-
llrun -np 32 -verbose 1 -exe `/bin/pwd`/helloworld.rts -cwd `/bin/pwd`
-
llrun -h
-
/bgl/local/samples/helloworld/mpirun-help.txt
last change 18.06.2007 |
