python compilation error

Dear Palabos experts,

I tried to compile pythonic/src under OpenSUSE 12.1 64 bits OS and got errors (attached below). But, I have no problem “make” the the tutorials in the tutorial_1 directoy. I can even run the tutorial_1 files in parallel using openmpi. Any suggestion on the phthonic/src error? Do I really need to compile the python library?

Thanks!

Pei-Ying

cd compilePalabos; make
make[1]: Entering directory /home/phsieh/palabos/palabos-v1.0r1/pythonic/src/compilePalabos' python /home/phsieh/palabos/palabos-v1.0r1/pythonic/src/compilePalabos/../../..//scons/scons.py -j 4 -f /home/phsieh/palabos/palabos-v1.0r1/pythonic/src/compilePalabos/../../..//SConstruct palabosRoot=/home/phsieh/palabos/palabos-v1.0r1/pythonic/src/compilePalabos/../../../ projectFiles="dummyMain.cpp" precompiled=true optimize=true debug=false profile=false MPIparallel=true SMPparallel=false usePOSIX=true serialCXX=g++ parallelCXX=mpicxx dynamicLibrary=true compileFlags="" linkFlags="" optimFlags="-O3" debugFlags="-g" profileFlags="-pg" libraryPaths="" includePaths="" libraries="" scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... scons:.’ is up to date.
scons: done building targets.
make[1]: Leaving directory `/home/phsieh/palabos/palabos-v1.0r1/pythonic/src/compilePalabos’
bash ./preprocess
~/palabos/palabos-v1.0r1/pythonic/src/swig ~/palabos/palabos-v1.0r1/pythonic/src
Swig-file preparation for module core
Swig-file specialization for module int_block
Swig-file specialization for module double_block
Swig-file specialization for module float_block
Swig-file specialization for module double_d2q9
Swig-file specialization for module float_d2q9
Swig-file specialization for module double_d3q19
Swig-file specialization for module float_d3q19
~/palabos/palabos-v1.0r1/pythonic/src
python /home/phsieh/palabos/palabos-v1.0r1/./scons/scons.py -j 4 -f /home/phsieh/palabos/palabos-v1.0r1/./pythonic/src//SConstruct palabosRoot=/home/phsieh/palabos/palabos-v1.0r1/. pypalRoot=/home/phsieh/palabos/palabos-v1.0r1/./pythonic/src/ optimize=true debug=true profile=false MPIparallel=true serialCXX=g++ parallelCXX=mpicxx compileFlags="" optimFlags="-O3" debugFlags="-g" profileFlags="-pg" includePaths="/usr/lib64/python2.4/site-packages/numpy/core/include/" linkFlags=""
scons: Reading SConscript files …
scons: done reading SConscript files.
scons: Building targets …
swig -o swig/core/pre_processed/core_wrap.cc -classic -python -c++ swig/core/pre_processed/core.i
swig -o swig/block/double/block_wrap.cc -classic -python -c++ swig/block/double/block.i
swig -o swig/blockLattice2d/double_d2q9/blockLattice2d_wrap.cc -classic -python -c++ swig/blockLattice2d/double_d2q9/blockLattice2d.i
swig -o swig/blockLattice3d/double_d3q19/blockLattice3d_wrap.cc -classic -python -c++ swig/blockLattice3d/double_d3q19/blockLattice3d.i
swig/core/pre_processed/plbInit.i:19: Warning 324: Named nested template instantiations not supported. Processing as if no name was given to %template().
swig/core/pre_processed/plbInit.i:20: Warning 324: Named nested template instantiations not supported. Processing as if no name was given to %template().
swig/core/pre_processed/plbInit.i:21: Warning 324: Named nested template instantiations not supported. Processing as if no name was given to %template().
mpicxx -o swig/blockLattice2d/double_d2q9/blockLattice2d_wrap.os -c -O3 -g -DPLB_DEBUG -DPLB_MPI_PARALLEL -fPIC -I/usr/include/python2.7 -I/home/phsieh/palabos/palabos-v1.0r1/src -I/home/phsieh/palabos/palabos-v1.0r1/externalLibraries -I. -I/usr/lib64/python2.4/site-packages/numpy/core/include swig/blockLattice2d/double_d2q9/blockLattice2d_wrap.cc
mpicxx -o swig/blockLattice3d/double_d3q19/blockLattice3d_wrap.os -c -O3 -g -DPLB_DEBUG -DPLB_MPI_PARALLEL -fPIC -I/usr/include/python2.7 -I/home/phsieh/palabos/palabos-v1.0r1/src -I/home/phsieh/palabos/palabos-v1.0r1/externalLibraries -I. -I/usr/lib64/python2.4/site-packages/numpy/core/include swig/blockLattice3d/double_d3q19/blockLattice3d_wrap.cc
swig/blockLattice2d/double_d2q9/blockLattice2d_wrap.cc:3066:31: fatal error: numpy/arrayobject.h: No such file or directory
compilation terminated.
scons: *** [swig/blockLattice2d/double_d2q9/blockLattice2d_wrap.os] Error 1
swig/blockLattice3d/double_d3q19/blockLattice3d_wrap.cc:3066:31: fatal error: numpy/arrayobject.h: No such file or directory
compilation terminated.
scons: *** [swig/blockLattice3d/double_d3q19/blockLattice3d_wrap.os] Error 1
swig/core/pre_processed/plbInit.i:19: Warning 519: %template() contains no name. Template method ignored: plb::global::MainArgv::read< int >(int &)
swig/core/pre_processed/plbInit.i:20: Warning 519: %template() contains no name. Template method ignored: plb::global::MainArgv::read< double >(double &)
swig/core/pre_processed/plbInit.i:21: Warning 519: %template() contains no name. Template method ignored: plb::global::MainArgv::ad< std::string >(std::string &)
scons: building terminated because of errors.
make: *** [compilation] Error 2

Do I really need to compile the python library?

No there is no need to. The python library is a wrapper for Palabos written in Python. If you use directly Palabos in C++ there is no need to use that.

Anyway, if you are still interested in using the Python interface, it seems that you are missing numpy and swig.
For more details have a look a the Python interface userguide

Hi,

Thanks for the reply!

But, I did have swig and numpy installed. Could it be possible that the compiler cannot find the correct install location? I am using OpenSUSE 12.1 64 bit OS.

Pei-Ying

Dear Pei-Ying,

It seems that OpenSUSE 12 use Swig version 2.xx. For the moment we have just tested the wrapper with Swig version up to 1.3.40 which is the latest in the 1.3 branch.

Maybe the version 1.3.x is available as well?