[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bgl-discuss] A working BGL Makefile for C code



I'm using mpicc which is located at /bgl/BlueLight/ppcfloor/bglsys/bin/.
It's a shell script to provide necessary options for compiler.

>Could somebody post or mail me the relevant parts of a Makefile that
>successfully compiles C code with MPI on BGL using XLC (or GCC, if it
>still works)? Thanks.
>
>I tried following the earlier discussion about xlc, but I've had no luck
>using it. I also tried using what I found on the BGL Wiki
>(http://www.bgl.mcs.anl.gov/wiki/index.php/ApplicationWorkshop), but I
>can't seem to link with MPI. I'm trying to use blrts_xlc from the $PATH
>(which is /opt/ibmcmp/vac/7.0/bin/blrts_xlc), and everything else from
>/bgl/BlueLight/ppcfloor. Is this correct? Could there be something missing
>in my environment (since I'm using bash instead of csh)?
>
>chad@login2:~/src/vol> make
>blrts_xlc -g -O -qarch=440 -qmaxmem=64000
>-I/bgl/BlueLight/ppcfloor/bglsys/include -L.
>-L/bgl/BlueLight/ppcfloor/bglsys/lib -lmpich.rts -lmsglayer.rts -lrts.rts
>-ldevices.rts  -c vol.c
>
>[ similarly for util.c, vector.c, file.c, and render.c ]
>
>blrts_xlc -L/bgl/BlueLight/ppcfloor/bglsys/lib -lmpich.rts -lmsglayer.rts
>-lrts.rts -ldevices.rts  vol.o util.o vector.o file.o render.o -o vol
>vol.o: In function `main':
>/bgl/home1/chad/src/vol/vol.c:573: undefined reference to `MPI_Init'
>vol.o: In function `finalize':
>/bgl/home1/chad/src/vol/vol.c:526: undefined reference to `MPI_Finalize'
>vol.o: In function `init':
>/bgl/home1/chad/src/vol/vol.c:63: undefined reference to `MPI_Comm_size'
>/bgl/home1/chad/src/vol/vol.c:66: undefined reference to `MPI_Comm_rank'
>/bgl/home1/chad/src/vol/vol.c:102: undefined reference to
>`MPI_Cart_create'
>/bgl/home1/chad/src/vol/vol.c:105: undefined reference to `MPI_Comm_rank'
>/bgl/home1/chad/src/vol/vol.c:106: undefined reference to
>`MPI_Cart_coords'
>
>[ et cetera ]
>
>Thanks,
>ccg
>
>- --------------------------------------------------------------------
>To add or remove yourself from this mailing list, use the 'notifyme'
>command on any BGL machine. To remove: notifyme -n, to add: notifyme -y.
>
>  
>

- --------------------------------------------------------------------
To add or remove yourself from this mailing list, use the 'notifyme'
command on any BGL machine. To remove: notifyme -n, to add: notifyme -y.