Page 1 of 1

Building nrn-7.5-master1572 with Intel compilers, IntelMPI

Posted: Thu May 11, 2017 12:47 pm
by pmoolcha
Hi,
We are trying to build neuron from source, to be imported in Python, using the Intel compilers 2017, and Intel MPI, on the Stampede KNL (TACC) system that has a Haswell login.

Our steps are 1. configure, 2. make, 3. make install

Code: Select all

./configure --prefix=$IDIR/nrn75 --without-iv --without-nrniv --without-nrnoc-x11 --without-x -with-paranrn CC=icc CXX=icpc CPP='icc -E' CXXCPP='icpc -E' CFLAGS='-xCORE-AVX2 -axMIC-AVX512' LDFLAGS='-xCORE-AVX2 -axMIC-AVX512' CXXFLAGS='-xCORE-AVX2 -axMIC-AVX512' MPICC=mpiicc MPICXX=mpiicpc LD=xild AR=xiar --with-nrnpython=python3.6
'configure' and 'make' gave no errors, but 'make install' gives:
mpiicpc -shared -ipo -Xlinker -export-dynamic build/temp.linux-x86_64-3.6/ctng.o -L/opt/apps/intel17/python3/3.6.0/lib -lpython3.6m -o /work/04119/pmoolcha/Build/nrn-7.5/share/lib/python/neuron/rxd/geometry3d/ctng.cpython-36m-x86_64-linux-gnu.so

": internal error: 010101_(5000 + 54)

icpc: error #10014: problem during multi-file optimization compilation (code 4)
We also used the '-no-ipo', '-O0' flags separately and together, but we got the same errors.

1. Ideally, we would like to have the code compiled with the Intel compilers and Intel MPI whilst allowing any potential optimization to proceed.
2. In case that is not possible, please let us know how to turn off the optimization for that particular step since it ignores both flags and yields the error.

Thanks.

Re: Building nrn-7.5-master1572 with Intel compilers, IntelM

Posted: Thu May 11, 2017 6:06 pm
by hines
Several aspects of the configure command seem to me to be not what you really want. In particular --without-nrniv removes almost every aspect of NEURON that is meaningful. I don't remember ever using that
option and I should probably remove it. The actual error involving ctng.o seems to suggest a cython problem in dealing with share/lib/python/neuron/rxd/geometry3d/ctng.pyx and I would recommend seeing if you
can successfully build without the rx3d module. I.e add --disable-rx3d to the configure line. Also, on that machine, if you have trouble executing the setup.py portion of the install, I would also add the
option --disable-pysetup

NEURON has been built on that machine. I will ask the person who developed the working configure command if he has any further advice.

Re: Building nrn-7.5-master1572 with Intel compilers, IntelM

Posted: Fri May 12, 2017 11:52 am
by pmoolcha
Several aspects of the configure command seem to me to be not what you really want.
Could you kindly elaborate on which ones?

I get the point about --without-nrniv.
Initially I did not put this option, but tried it as I was getting undefined reference to 'PyInt_AS_LONG'. Specifying LD=xild, AR=xiar did not help.
libtool: link: mpiicpc -xCORE-AVX2 -axMIC-AVX512 -xCORE-AVX2 -axMIC-AVX512 -o .libs/nrniv nvkludge.o ../ivoc/nrnmain.o ../ivoc/ivocmain.o ../oc/modlreg.o ../oc/ockludge.o ../nrnoc/.libs/libnrnoc.so ./.libs/libnrniv.so ../ivoc/.libs/libivoc.so ../oc/.libs/liboc.so ../nrnmpi/.libs/libnrnmpi.so ../gnu/.libs/libneuron_gnu.so ../scopmath/.libs/libscopmath.so ../sparse13/.libs/libsparse13.so ../sundials/.libs/libsundials.so ../memacs/.libs/libmemacs.so ../mesch/.libs/libmeschach.so ../ivos/.libs/libivos.so ../nrnpython/.libs/libnrnpython.so -L/opt/apps/intel17/python3/3.6.0/lib -lpython3.6m -lpthread -limf -lirc -lutil -lreadline -lncurses -lm -ldl -Wl,-rpath -Wl,/work/04119/pmoolcha/Compiled/nrn-7.5/x86_64/lib -Wl,-rpath -Wl,/opt/apps/intel17/python3/3.6.0/lib
../nrnpython/.libs/libnrnpython.so: undefined reference to `PyInt_AS_LONG'
make[3]: *** [nrniv] Error 1
make[3]: Leaving directory `/work/04119/pmoolcha/Build/nrn-7.5/src/nrniv'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/work/04119/pmoolcha/Build/nrn-7.5/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/work/04119/pmoolcha/Build/nrn-7.5'
make: *** [all] Error 2
I do not use Interviews or any associated X system, hence, --without-iv --without-nrnoc-x11 --without-x.
And everything else is to ensure that I am using the Intel compilers and IntelMPI. And the flags are the ones suggested by the Stampede KNL guide.

This is the latest configure I ran:

Code: Select all

../configure --prefix=$IDIR --without-iv --without-nrnoc-x11 --without-x -with-paranrn --disable-rx3d --disable-pysetup --with-nrnpython=python3.6 CC=icc CXX=icpc CPP='icc -E' CXXCPP='icpc -E' LD=xild AR=xiar MPICC=mpiicc MPICXX=mpiicpc CFLAGS='-xCORE-AVX2 -axMIC-AVX512' LDFLAGS='-xCORE-AVX2 -axMIC-AVX512' CXXFLAGS='-xCORE-AVX2 -axMIC-AVX512'
make fails with the same 'PyInt_AS_LONG' error.

Re: Building nrn-7.5-master1572 with Intel compilers, IntelM

Posted: Fri May 12, 2017 4:05 pm
by pkumbhar
Hello @pmoolcha,

I am building NEURON on Stampede KNL system (login-knl1.stampede). I haven't tried all your options but this is how I typically build:

Install script using python 2.7 :

Code: Select all

#!/bin/bash
set -e

export BASE_DIR=`pwd`/NEURON_HOME_PYTHON_27
export INSTALL_DIR=$BASE_DIR/install
export SOURCE_DIR=$BASE_DIR/sources

module load python/2.7.13
module load intel/17.0.0

FLAGS="-xCORE-AVX2 -axMIC-AVX512"

mkdir -p $SOURCE_DIR $INSTALL_DIR

cd $SOURCE_DIR

if [ ! -d neuron ]; then
    git clone https://github.com/nrnhines/nrn.git neuron
    cd neuron
    ./build.sh
    cd ..
fi

mkdir -p nrnmpi
cd nrnmpi
`pwd -P`/../neuron/configure --prefix=$INSTALL_DIR --srcdir=`pwd -P`/../neuron --without-iv --with-paranrn --with-nrnpython --disable-rx3d CFLAGS="$FLAGS" CXXFLAGS="$FLAGS" MPICC=mpiicc MPICXX=mpiicpc CC=icc CXX=icpc
make -j8 VERBOSE=1
make install
And minor changes for python 3.6 :

Code: Select all

#!/bin/bash
set -e

export BASE_DIR=`pwd`/NEURON_HOME_PYTHON_36
export INSTALL_DIR=$BASE_DIR/install
export SOURCE_DIR=$BASE_DIR/sources

module load python3/3.6.0
module load intel/17.0.0

FLAGS="-xCORE-AVX2 -axMIC-AVX512"

mkdir -p $SOURCE_DIR $INSTALL_DIR

cd $SOURCE_DIR

if [ ! -d neuron ]; then
    git clone https://github.com/nrnhines/nrn.git neuron
    cd neuron
    ./build.sh
    cd ..
fi

mkdir -p nrnmpi
cd nrnmpi
`pwd -P`/../neuron/configure --prefix=$INSTALL_DIR --srcdir=`pwd -P`/../neuron --without-iv --with-paranrn --with-nrnpython=python3.6 --disable-rx3d CFLAGS="$FLAGS" CXXFLAGS="$FLAGS" MPICC=mpiicc MPICXX=mpiicpc CC=icc CXX=icpc
make -j8 VERBOSE=1
make install
Could you check if this works for you?

Re: Building nrn-7.5-master1572 with Intel compilers, IntelM

Posted: Mon May 15, 2017 4:26 pm
by pmoolcha
Hello @pkumbhar,

I downloaded the git version, ran /build.sh
with the same configure options as before, and I managed to compile without errors.

Thanks for the tips.