nrn6.0 mpi compiling problem

Post Reply
neurite
Posts: 13
Joined: Fri Jun 22, 2007 2:06 pm
Location: Boston University

nrn6.0 mpi compiling problem

Post by neurite » Tue Jul 03, 2007 11:50 am

I've been trying to compile nrn-6.0 with mpi, and I've read the other thread about the issue. But the problem I encountered is a little different.

Code: Select all

./configure --prefix=`pwd` --with-mpi MPICXX=/usr/bin/mpic++ MPICC=/usr/bin/mpicc
works fine, but when I run make, the following error occurs:

Code: Select all

mkdir .libs
 /usr/bin/mpicc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../.. -I../../src/oc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/ivos -I../../src/sundials -I../../src/nrnpython -I../../src/oc -g -O2 -MT nrnmpi.lo -MD -MP -MF .deps/nrnmpi.Tpo -c nrnmpi.c  -fPIC -DPIC -o .libs/nrnmpi.o
if /bin/sh ../../libtool --mode=compile --tag=CC /usr/bin/mpicc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../.. -I../../src/oc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/ivos -I../../src/sundials -I../../src/nrnpython -I../../src/oc     -g -O2 -MT bbsmpipack.lo -MD -MP -MF ".deps/bbsmpipack.Tpo" -c -o bbsmpipack.lo bbsmpipack.c; \
then mv -f ".deps/bbsmpipack.Tpo" ".deps/bbsmpipack.Plo"; else rm -f ".deps/bbsmpipack.Tpo"; exit 1; fi
 /usr/bin/mpicc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../.. -I../../src/oc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/ivos -I../../src/sundials -I../../src/nrnpython -I../../src/oc -g -O2 -MT bbsmpipack.lo -MD -MP -MF .deps/bbsmpipack.Tpo -c bbsmpipack.c  -fPIC -DPIC -o .libs/bbsmpipack.o
bbsmpipack.c: In function 'unpack':
bbsmpipack.c:39: warning: comparison between pointer and integer
bbsmpipack.c:42: warning: comparison between pointer and integer
bbsmpipack.c: In function 'pack':
bbsmpipack.c:187: warning: assignment makes integer from pointer without a cast
bbsmpipack.c: In function 'nrnmpi_pkstr':
bbsmpipack.c:213: warning: incompatible implicit declaration of built-in function 'strlen'
if /bin/sh ../../libtool --mode=compile --tag=CC /usr/bin/mpicc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../.. -I../../src/oc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/ivos -I../../src/sundials -I../../src/nrnpython -I../../src/oc     -g -O2 -MT mpispike.lo -MD -MP -MF ".deps/mpispike.Tpo" -c -o mpispike.lo mpispike.c; \
then mv -f ".deps/mpispike.Tpo" ".deps/mpispike.Plo"; else rm -f ".deps/mpispike.Tpo"; exit 1; fi
 /usr/bin/mpicc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../.. -I../../src/oc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/ivos -I../../src/sundials -I../../src/nrnpython -I../../src/oc -g -O2 -MT mpispike.lo -MD -MP -MF .deps/mpispike.Tpo -c mpispike.c  -fPIC -DPIC -o .libs/mpispike.o
mpispike.c: In function 'nrnmpi_int_sum_reduce':
mpispike.c:269: warning: passing argument 6 of 'MPI_Allreduce' makes pointer from integer without a cast
mpispike.c: In function 'nrnmpi_assert_opstep':
mpispike.c:279: warning: passing argument 5 of 'MPI_Bcast' makes pointer from integer without a cast
mpispike.c: In function 'nrnmpi_dbl_allmin':
mpispike.c:290: warning: passing argument 6 of 'MPI_Allreduce' makes pointer from integer without a cast
mpispike.c: In function 'nrnmpi_postrecv_doubles':
mpispike.c:305: warning: passing argument 7 of 'MPI_Irecv' from incompatible pointer type
mpispike.c: In function 'nrnmpi_wait':
mpispike.c:310: warning: passing argument 1 of 'MPI_Wait' from incompatible pointer type
mpispike.c: In function 'nrnmpi_dbl_allreduce':
mpispike.c:321: error: incompatible types in assignment
mpispike.c:323: error: incompatible types in assignment
mpispike.c:325: error: incompatible types in assignment
mpispike.c:327: error: incompatible type for argument 5 of mpispike.c:327: error: incompatible type for argument 5 of 'MPI_Allreduce'
/usr/bin/mpicc: No such file or directory
make[3]: *** [mpispike.lo] Error 1
make[3]: Leaving directory `/ad/eng/users/p/a/paladin/research/neuron/nrn/src/nrnmpi'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/ad/eng/users/p/a/paladin/research/neuron/nrn/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/ad/eng/users/p/a/paladin/research/neuron/nrn'
make: *** [all] Error 2


-bash-3.00$ ls -l /usr/bin/mpicc
-rwxr-xr-x  1 root root 36936 Aug  8  2005 /usr/bin/mpicc
why is make saying that the mpicc directory is not present? It clearly is. How do I get make to compile correctly? I'm using mpi v1.2. Any help would be much appreciated.

hines
Site Admin
Posts: 1577
Joined: Wed May 18, 2005 3:32 pm

Post by hines » Thu Jul 05, 2007 2:29 pm

mpispike.c:321: error: incompatible types in assignment
Change mpispike.c according to:

Code: Select all

--- mpispike.c  (revision 1797)
+++ mpispike.c  (working copy)
@@ -315,7 +315,8 @@
 }

 double nrnmpi_dbl_allreduce(double x, int type) {
-       double result, t;
+       double result;
+       MPI_Op t;
        if (nrnmpi_numprocs < 2) { return x; }
        if (type == 1) {
                t = MPI_SUM;
I'll update the distribution at the end of
next week.

neurite
Posts: 13
Joined: Fri Jun 22, 2007 2:06 pm
Location: Boston University

It Works!

Post by neurite » Sat Jul 07, 2007 5:44 pm

Awesome, great work Michael, it compiles fine now.

Post Reply