Neuron and Myrinet
Posted: Sun May 28, 2006 6:39 am
Hi all
Did somebody manage to compile Neuron with MPI for Myrinet and/or LAM-MPI?
The following code snippet from src/nrnmpi/nrnmpi.c seems to restrict usage to MPICH and ethernet networks only:
#if !ALWAYS_CALL_MPI_INIT
/* this is not good. depends on mpirun adding at least one
arg that starts with -p4 but that probably is dependent
on mpich and the use of the ch_p4 device. We are trying to
work around the problem that MPI_Init may change the working
directory and so when not invoked under mpirun we would like to
NOT call MPI_Init.
*/
{
int i, b;
b = 0;
for (i=0; i < *pargc; ++i) {
if (strncmp("-p4", (*pargv), 3) == 0) {
b = 1;
break;
}
}
if (!b) {
nrnmpi_use = 0;
return;
}
}
#endif
Does somebody know a workaround?
Thanks
Thomas
PS: Just inactivating the above code is not a workaround; it results in the subsequent errors on my Laptop (used for testing) running Kubuntu and LAM-MPI, with or without iv [doNotify() somehow links to hoc_notify_iv() in src/oc/hoc_init.c so I thought it could be iv]
mpirun -np 2 nrniv test0.hoc
NEURON -- Version 5.8 2005-10-7 13:46:29 Main (85)
by John W. Moore, Michael Hines, and Ted Carnevale
Duke and Yale University -- Copyright 1984-2005
hello from id 1 on beatrix
nrnmpi_init(): numprocs=2 myid=0
NEURON -- Version 5.8 2005-10-7 13:46:29 Main (85)
by John W. Moore, Michael Hines, and Ted Carnevale
Duke and Yale University -- Copyright 1984-2005
hello from id 0 on beatrix
0
oc: Resource temporarily unavailable
0 nrniv: errno set during call of doNotify
0 in test0.hoc near line 9
0 for i=1, 1000000 doNotify()
^
oc: Resource temporarily unavailable
0 nrniv: errno set during call of doNotify
0 in test0.hoc near line 9
0 ^
oc: Resource temporarily unavailable
0 nrniv: errno set during call of doNotify
0 in test0.hoc near line 9
0 ^
oc: Resource temporarily unavailable
0 nrniv: errno set during call of doNotify
0 in test0.hoc near line 9
0 ^
oc: Resource temporarily unavailable
No more errno warnings during this execution
0 nrniv: errno set during call of doNotify
0 in test0.hoc near line 9
0 ^
errno set 6666 times on last execution
bbs_msg_cnt_=1 bbs_poll_cnt_=6667 bbs_poll_=93
0
Same problem appears on Beowulf cluster with MPICH and Myrinet
Neuron version is 5.8 but the newest version on the Neuron-website 5.9.?? contains the same code particle. Didn't try to compile and test yet, but am pretty sure that the same problem would likely occur
Again, thanks for hints!
Best
Thomas
Did somebody manage to compile Neuron with MPI for Myrinet and/or LAM-MPI?
The following code snippet from src/nrnmpi/nrnmpi.c seems to restrict usage to MPICH and ethernet networks only:
#if !ALWAYS_CALL_MPI_INIT
/* this is not good. depends on mpirun adding at least one
arg that starts with -p4 but that probably is dependent
on mpich and the use of the ch_p4 device. We are trying to
work around the problem that MPI_Init may change the working
directory and so when not invoked under mpirun we would like to
NOT call MPI_Init.
*/
{
int i, b;
b = 0;
for (i=0; i < *pargc; ++i) {
if (strncmp("-p4", (*pargv), 3) == 0) {
b = 1;
break;
}
}
if (!b) {
nrnmpi_use = 0;
return;
}
}
#endif
Does somebody know a workaround?
Thanks
Thomas
PS: Just inactivating the above code is not a workaround; it results in the subsequent errors on my Laptop (used for testing) running Kubuntu and LAM-MPI, with or without iv [doNotify() somehow links to hoc_notify_iv() in src/oc/hoc_init.c so I thought it could be iv]
mpirun -np 2 nrniv test0.hoc
NEURON -- Version 5.8 2005-10-7 13:46:29 Main (85)
by John W. Moore, Michael Hines, and Ted Carnevale
Duke and Yale University -- Copyright 1984-2005
hello from id 1 on beatrix
nrnmpi_init(): numprocs=2 myid=0
NEURON -- Version 5.8 2005-10-7 13:46:29 Main (85)
by John W. Moore, Michael Hines, and Ted Carnevale
Duke and Yale University -- Copyright 1984-2005
hello from id 0 on beatrix
0
oc: Resource temporarily unavailable
0 nrniv: errno set during call of doNotify
0 in test0.hoc near line 9
0 for i=1, 1000000 doNotify()
^
oc: Resource temporarily unavailable
0 nrniv: errno set during call of doNotify
0 in test0.hoc near line 9
0 ^
oc: Resource temporarily unavailable
0 nrniv: errno set during call of doNotify
0 in test0.hoc near line 9
0 ^
oc: Resource temporarily unavailable
0 nrniv: errno set during call of doNotify
0 in test0.hoc near line 9
0 ^
oc: Resource temporarily unavailable
No more errno warnings during this execution
0 nrniv: errno set during call of doNotify
0 in test0.hoc near line 9
0 ^
errno set 6666 times on last execution
bbs_msg_cnt_=1 bbs_poll_cnt_=6667 bbs_poll_=93
0
Same problem appears on Beowulf cluster with MPICH and Myrinet
Neuron version is 5.8 but the newest version on the Neuron-website 5.9.?? contains the same code particle. Didn't try to compile and test yet, but am pretty sure that the same problem would likely occur
Again, thanks for hints!
Best
Thomas