Use a parallel compiler with NEURON?

General issues of interest both for network and
individual cell parallelization.

Moderator: hines

Post Reply
neuromau
Posts: 97
Joined: Mon Apr 20, 2009 7:02 pm

Use a parallel compiler with NEURON?

Post by neuromau »

Hi,

I'm still trying to set up our cluster and am learning more about different aspects of parallel computing. Our administrator recommends using a special compiler optimized for parallel computing, such as 'pgcc' from the Portland Group, rather than gcc. Is NEURON compatible with this compiler?

Also, in addition to the compiler being more appropriate for the cluster, I thought it would be nice because it apparently allows us to do some profiling, which could help us determine what we really need in a cluster (memory, processing speed, etc) to run our NEURON model. If we should not use a special compiler, do you recommend another way to profile our NEURON code?

Thanks,
Marianne
hines
Site Admin
Posts: 1691
Joined: Wed May 18, 2005 3:32 pm

Re: Use a parallel compiler with NEURON?

Post by hines »

I think it is a good idea to use the compiler recommended by the administrator.
Occasionally some statements alllowed by gcc but which are not ansii standard
creep in and let me know if you see any syntax errors. Most turn out to be
trivial such as using // in c code for a comment or declaring a variable after
an executable statement (allowed in c++ and by gcc but not my some other
c compilers. just move the declaration to the top of the block).
I believe the compiler speed is more a function of the match to cpu architecture
and not to parallel per se since parallelization on a cluster is handled by MPI.
For NEURON source code i recommend using the hg repository or at least
the latest tar.gz found at
http://www.neuron.yale.edu/ftp/neuron/versions/alpha/
calvins
Posts: 6
Joined: Thu Jul 09, 2009 5:44 pm

Re: Use a parallel compiler with NEURON?

Post by calvins »

Hi Michael,
I'm working with Marianne on setting up this cluster with the parallel compiler, and I am receiving the following error during make for the installation of InterViews 17:
/opt/pgi/linux86-64/9.0/bin/pgCC -DHAVE_CONFIG_H -I. -I. -I../include -g -c Unidraw/catalog.cpp -fpic -DPIC -o Unidraw/.libs/catalog.o
"Unidraw/catalog.cpp", line 717: error: identifier "strstream" is undefined
strstream inout;
^

1 error detected in the compilation of "Unidraw/catalog.cpp".
make[2]: *** [Unidraw/catalog.lo] Error 1
I used the following to configure InterViews, which seems to have turned out okay:
CXX=/opt/pgi/linux86-64/9.0/bin/pgCC ./configure --prefix=`pwd`
I can send you the full logs if you need them, but I think the above is the main issue. Any ideas on how to fix this error? Thanks.

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

Re: Use a parallel compiler with NEURON?

Post by hines »

InterViews is typically the first thing thrown out of a NEURON build on a cluster since mpi programs are typically only run in
batch mode and so there is no need for a gui. And a lot of clusters do not have x11 installed.
So the most straightforward work around is to not build InterViews at
all and instead start with nrn and use the configure option --without-x

If you do want to have NEURON with a gui (it is turned off when nrniv is launched with the
-mpi option but available when you run the same executable on a single processor) then, since
this problem is with Unidraw which is a library only used by idraw, iclass, and NOT used by
NEURON then you could modify the iv/src/lib/Makefile.in or Makefile to avoid the entire library.

If you want to build the entire thing as is without errors then it will be necessary to figure out why
strstream is not understood by the various standard include files available with pgCC.
I see in the code for iv/lib/src/Unidraw/catalog.cpp that I added a workaround involving
#if defined(__xlC__) || defined(__GNUG__)
which avoid strstream.
So you might try changing to
#if 1 || defined(__xlC__) || defined(__GNUG__)
and see if pgCC likes the alternative fragment.
I see there are three places where code is conditional on __GNUG__
calvins
Posts: 6
Joined: Thu Jul 09, 2009 5:44 pm

Re: Use a parallel compiler with NEURON?

Post by calvins »

I was able to install NEURON without Interviews with the --without-x option, but in addition to the CXX I needed to specify the CC as well. After some minor troubleshooting issues, everything now works. Thanks!

Calvin
Post Reply