Page 1 of 1

compile problems with pgcc

Posted: Tue Sep 15, 2009 3:22 am
by evan
Trying to build neuron on a CentOS 5 Linux cluster.

This is my configure invocation:
./configure --without-iv --with-paranrn --prefix=$HOME/neuron

The build fails immediately with:
mpicc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../.. -I../../src/oc -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/usr/local/openmpi/1.3.3-pgi/include -g -O2 -MT ansi.lo -MD -MP -MF .deps/ansi.Tpo -c ansi.c -fPIC -DPIC -o .libs/ansi.o
pgcc-Error-Unknown switch: -MT
pgcc-Error-Unknown switch: -MP
pgcc-Error-Unknown switch: -MF

Thanks again,
Evan.

Re: compile problems with pgcc

Posted: Tue Sep 15, 2009 11:30 am
by hines
what compiler is being wrapped?
mpicc --version

Re: compile problems with pgcc

Posted: Tue Sep 15, 2009 11:37 am
by hines
nevermind. I see that it is pgcc
Try a quick work around by turning off include dependency tracking. Just remember that
if you change a any *.h file you should do a make clean;make
You can turn off dependency tracking with the configure option
--disable-dependency-tracking

Re: compile problems with pgcc

Posted: Tue Sep 15, 2009 8:42 pm
by evan
That helps. Lots of files compiled albeit with lots of warnings

Eventually the build hits:

make[5]: Entering directory `/nfs/user2/evan/junk/nrn-7.0/src/ivos'
/bin/sh ../../libtool --tag=CXX --mode=compile mpic++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../.. -I../../src/oc -I../../src/oc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I. -I../../src/sundials -I../../src/nrnpython -I/usr/local/openmpi/1.3.3-pgi/include -g -O2 -c -o file.lo file.cpp
mkdir .libs
mpic++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../.. -I../../src/oc -I../../src/oc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I. -I../../src/sundials -I../../src/nrnpython -I/usr/local/openmpi/1.3.3-pgi/include -g -O2 -c file.cpp -fPIC -DPIC -o .libs/file.o
"./ivstrm.h", line 41: catastrophic error: could not open source file
"stream.h"
#include <stream.h>
^

1 catastrophic error detected in the compilation of "file.cpp".
Compilation terminated.

Re: compile problems with pgcc

Posted: Tue Sep 15, 2009 9:58 pm
by evan
I change stream.h to iostream.h in ivstrm.h and map.h and vector.h to map and vector in nrnhash.h and it has compiled.

Evan.

Re: compile problems with pgcc

Posted: Tue Sep 15, 2009 10:38 pm
by evan
The cluster I'm trying to work on is a 64bit AMD opteron cluster. When I run the Traub model the following warnings are issued:
exp(947.808) out of range, returning exp(700)
I'm a bit concerned about this since these numbers are well outside the physiological range...

thanks,
Evan.

Re: compile problems with pgcc

Posted: Wed Sep 16, 2009 7:45 am
by hines
exp(947.808) out of range, returning exp(700)
That can happen (rarely) when one is using the variable step method since a prediction for v can be very much out of
range. It should not occur with the fixed time step.
Can you say what the value of t is when the warning is issued. And how large the model is. Perhaps I can
reproduce it on a 12 core cluster I have available. the warning can be modified to print other things in
nrn/src/math.c line 63
and you would have to add
extern double t;
near the top of the file.
I change stream.h to iostream.h ...
An alternative is to use the most recent alpha version sources at
http://www.neuron.yale.edu/ftp/neuron/versions/alpha/
or get them from the mercurial repository at
http://www.neuron.yale.edu/hg
That might avoid the exp warning as well.

Re: compile problems with pgcc

Posted: Wed Sep 16, 2009 11:15 pm
by evan
Compile problems and exp problems also occur with 7.1

The exp problem occurs with the modified Traub model that you sent me privately for t>1. It occurs running with a single processor on the CentOS5, 64 bit opteron machine compiled with pgcc. It doesn't occur on Xeon machine compiled with an old version of gcc.

I compiled without --with-paranrn and this picks up gcc as the compiler. There is no exp problem in this case. (Although strangely, it wouldn't load the mechanisms file without the -dll option.)

Evan.

Re: compile problems with pgcc

Posted: Fri Sep 18, 2009 12:26 pm
by hines
I installed pgcc 9.0-3 64-bit target on x86-64 Linux and committed the needed changes to
neuron/iv and neuron/nrn repositories at http://www.neuron.yale.edu/hg

I installed InterViews in $HOME/neuron/ivpg with
./configure --prefix=`pwd` CC=pgcc CXX=pgCC
make
make install

Installed mpich2-1.1.1p1 with

'./configure' '--prefix=/home/hines/mpich2pg' '--enable-sharedlibs=gcc' '--with-device=ch3:nemesis' CC=pgcc CXX=pgCC
make
make install

Installed NEURON in $HOME/neuron/nrnpgmpi with

../nrn/configure --prefix=`pwd` --srcdir=../nrn --with-iv=$HOME/neuron/ivpg --with-paranrn --with-nrnpython CC=pgcc CXX=pgCC
make -j 4 install

in the nrntraub directory I

nrnivmodl mod
mpd&
mpiexec -n 4 `which nrniv` -mpi -c mytstop=10 init.hoc

and it ran with no errors or warnings.
After 15 days, I won't be able to use this compiler again for 6 months.

Re: compile problems with pgcc

Posted: Sun Sep 20, 2009 8:44 pm
by evan
It seems without the CC and CXX options to the configure script starts configuring for gcc, but then builds with pgcc, which is the mpicc compiler. When these options are passed I can compile 7.0 without the --disable-dependency-tracking option. I run the 1/10th model for a few ms in serial mode and no errors were issued (7.0 again).

Evan.