Here is my Bmake.inc diff:
- Code: Select all
$ diff Bmake.inc BMAKES/Bmake.MPI-LINUX
16c16
< BTOPdir = /tmp/openmpi-1.1
---
> BTOPdir = $(HOME)/BLACS
50,54c50,53
< MPIdir = /usr/share/openmpi
< MPILIBdir =
< MPIINCdir = /usr/include/openmpi
< # MPILIB = -L/usr/lib64/openmpi
< MPILIB =
---
> MPIdir = /usr/local/mpich
> MPILIBdir = $(MPIdir)/lib/
> MPIINCdir = $(MPIdir)/include
> MPILIB = $(MPILIBdir)/libmpich.a
59c58
< BTLIBS = $(BLACSCINIT) $(BLACSFINIT) $(MPILIB)
---
> BTLIBS = $(BLACSFINIT) $(BLACSLIB) $(BLACSFINIT) $(MPILIB)
90c89
< SYSINC =
---
> SYSINC = -I$(MPIINCdir)
97,98c96
< # INTFACE = -Df77IsF2C
< INTFACE = -DAdd_
---
> INTFACE = -Df77IsF2C
145,146c143
< # TRANSCOMM = -DCSameF77
< TRANSCOMM = -DUseMpi2
---
> TRANSCOMM = -DCSameF77
201c198
< F77 = mpif77
---
> F77 = g77
206c203
< CC = mpicc
---
> CC = gcc
I compiled and ran: xcmpi_sane xfmpi_sane xintface xsize xsyserrors xtc_CsameF77 in INSTALL and everything seems to complete successfully:
- Code: Select all
$ EXE/xsize
ISIZE=4
SSIZE=4
DSIZE=8
CSIZE=8
ZSIZE=16
$ EXE/xintface
For this platform, set INTFACE = -DAdd_
$ mpirun -np 4 -machinefile /tmp/machines EXE/xcmpi_sane
1: C MPI sanity test passed
3: C MPI sanity test passed
2: C MPI sanity test passed
0: C MPI sanity test passed
$ mpirun -np 4 -machinefile /tmp/machines EXE/xfmpi_sane
1 F77 MPI sanity test passed.
3 F77 MPI sanity test passed.
2 F77 MPI sanity test passed.
0 F77 MPI sanity test passed.
$ mpirun -np 2 -machinefile /tmp/machines EXE/xtc_CsameF77
If this routine does not complete successfully,
Do _NOT_ set TRANSCOMM = -DCSameF77
Do _NOT_ set TRANSCOMM = -DCSameF77
$
Then when I got to compile the tester I get a bunch of "undefined reference" errors:
- Code: Select all
$ make
mpif77 -c blacstest.f
make mpif.h
make[1]: Entering directory `/home/sbeards/BLACS/TESTING'
rm -f mpif.h
ln -s /usr/include/openmpi/mpif.h mpif.h
make[1]: Leaving directory `/home/sbeards/BLACS/TESTING'
mpif77 -c -O btprim_MPI.f
mpif77 -c tools.f
mpif77 -o /home/sbeards/BLACS/TESTING/EXE/xFbtest_MPI-LINUX-0 blacstest.o btprim_MPI.o tools.o /home/sbeards/BLACS/LIB/blacsCinit_MPI-LINUX-0.a /home/sbeards/BLACS/LIB/blacsF77init_MPI-LINUX-0.a
blacstest.o(.text+0x6e): In function `MAIN__':
: undefined reference to `blacs_get_'
blacstest.o(.text+0x8b): In function `MAIN__':
: undefined reference to `blacs_gridinit_'
...
blacstest.o(.text+0x6762c): In function `zchkamn_':
: undefined reference to `blacs_gridinfo_'
/home/sbeards/BLACS/LIB/blacsCinit_MPI-LINUX-0.a(blacs_pinfo_.o)(.text+0x11): In function `blacs_pinfo_':
: undefined reference to `BI_F77_MPI_COMM_WORLD'
/home/sbeards/BLACS/LIB/blacsCinit_MPI-LINUX-0.a(blacs_pinfo_.o)(.text+0x20): In function `blacs_pinfo_':
: undefined reference to `BI_Iam'
/home/sbeards/BLACS/LIB/blacsCinit_MPI-LINUX-0.a(blacs_pinfo_.o)(.text+0x29): In function `blacs_pinfo_':
: undefined reference to `BI_Np'
/home/sbeards/BLACS/LIB/blacsCinit_MPI-LINUX-0.a(blacs_pinfo_.o)(.text+0x66): In function `blacs_pinfo_':
: undefined reference to `BI_F77_MPI_COMM_WORLD'
/home/sbeards/BLACS/LIB/blacsCinit_MPI-LINUX-0.a(blacs_pinfo_.o)(.text+0x75): In function `blacs_pinfo_':
: undefined reference to `bi_f77_get_constants_'
/home/sbeards/BLACS/LIB/blacsCinit_MPI-LINUX-0.a(blacs_pinfo_.o)(.text+0x7a): In function `blacs_pinfo_':
: undefined reference to `BI_Np'
/home/sbeards/BLACS/LIB/blacsCinit_MPI-LINUX-0.a(blacs_pinfo_.o)(.text+0x89): In function `blacs_pinfo_':
: undefined reference to `BI_Iam'
/home/sbeards/BLACS/LIB/blacsCinit_MPI-LINUX-0.a(blacs_pinfo_.o)(.text+0x9d): In function `blacs_pinfo_':
: undefined reference to `BI_Iam'
/home/sbeards/BLACS/LIB/blacsCinit_MPI-LINUX-0.a(blacs_pinfo_.o)(.text+0xaa): In function `blacs_pinfo_':
: undefined reference to `BI_Np'
/home/sbeards/BLACS/LIB/blacsCinit_MPI-LINUX-0.a(blacs_pinfo_.o)(.text+0xd3): In function `blacs_pinfo_':
: undefined reference to `BI_BlacsErr'
collect2: ld returned 1 exit status
make: *** [/home/sbeards/BLACS/TESTING/EXE/xFbtest_MPI-LINUX-0] Error 1
Even though it appears to be in the archive:
- Code: Select all
$ nm ../LIB/blacs_MPI-LINUX-0.a |grep blacs_get_
blacs_get_.o:
0000000000000000 T blacs_get_
blacs_get_.oo:
$
I'm lost... any ideas?

