Python Interface Compilation Problems

Thank you for providing this interface and the presentation at the DSFD 2010 in Rome!

Anyway, I have problems compiline the interface following the instructions on the websites. After installing all required modules and compilation of the Palabos core cpp files I get the following errors. I’m using Ubuntu 10.04.
I’m not familiar with sed, so I hope somebody can help me:

Swig-file preparation for module core
sed: -e Ausdruck #1, Zeichen 41: Unbekannte Option für s' sed: -e Ausdruck #1, Zeichen 39: Unbekannte Option fürs’
sed: -e Ausdruck #1, Zeichen 41: Unbekannte Option für s' sed: -e Ausdruck #1, Zeichen 39: Unbekannte Option fürs’
sed: -e Ausdruck #1, Zeichen 41: Unbekannte Option für s' sed: -e Ausdruck #1, Zeichen 39: Unbekannte Option fürs’
sed: -e Ausdruck #1, Zeichen 41: Unbekannte Option für `s’
.
.
.
python /home/jkropf/palabos-v0.7r0/scons/scons.py -f /home/jkropf/palabos-v0.7r0/pythonic/src//SConstruct palabosRoot=/home/jkropf/palabos-v0.7r0 pypalRoot=/home/jkropf/palabos-v0.7r0/pythonic/src/ optimize=true debug=false profile=false MPIparallel=true serialCXX=g++ parallelCXX=mpicxx compileFlags="-Wall" optimFlags="-O3" debugFlags="-g" profileFlags="-pg" includePaths="" 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
No module name specified using %module or -module.
scons: *** [swig/core/pre_processed/core_wrap.cc] Error 1
scons: building terminated because of errors.
make: *** [compilation] Fehler 2

Seems that there is an error with the prepocessing script since the prepossesed *.i files are empty in the pre_processed folder and so no *.cc files are created.

Any hints?

Regards,

Johannes

Hi,

  1. Did you define the environment variable PALABOS_ROOT, as shown in the user’s guide? I have the feeling this is the problem in your case.
  2. Under Ubuntu, it appears you must install the Python-all-dev module for the compilation to work.

Please let us know if this does the trick for you…

Hi!

Thanks for the hint, but it didn’t work. I checked the environment variable and installed the python-all-dev package, but I still get the same error.

:frowning:

Regards,

Johannes

Hi!

After changing the script pythonic/src/preprocess in the following way it worked for me:

  1. surrounding environment variables with double quotes, eg:

  2. changing the delimiter . to # (or @,!,%)

For example:
Changing
sed ‘s.PALABOS_ROOT.’$PALABOS_ROOT’.g’ <$swigFile |
sed ‘s.PYPAL_ROOT.’$PYPAL_ROOT’.g’ > “pre_processed/”$swigFile

to
sed ‘s#PALABOS_ROOT#’"$PALABOS_ROOT"’#g’ <$swigFile |
sed ‘s#PYPAL_ROOT#’"$PYPAL_ROOT"’#g’ > “pre_processed/”$swigFile

The reason for this might be the difference in the sed implementation used.
On my Kubuntu 10.4 system

GNU sed-Version 4.2.1

is installed.

Regards,

Johannes

Hi,

Thank you, this comment is very useful. The hash seems to be working on all systems I tested, so we’ll switch to hash for the next release. This remains however a mystery to me: the systems on which we were successful with the “dot” version also use GNU sed-Version 4.2.1 …

Hi,
I encountered another problem when compiling the python interface plb 0.7r3
mpi compillations seems to run through:

mpicxx -o dummyMain dummyMain.o /home/hansjoerg/Documents/Programming/c++/Palobos/palabos-v0.7r3/lib/libplb_mpi.so
scons: done building targets.

./preprocess shows no errors finishing with

scons: `.’ is up to date.
scons: done building targets.

./postprocess fails with
gcc: /home/hansjoerg/Documents/Programming/c++/Palobos/palabos-v0.7r3//pythonic/src//lib/libplbwrapBlock_int_mpi.so: No such file or directory

the lib directory is empty, and i cannot find the shared libs in the directoy tree
precompile seems to copy the cpp files correctly.

I already applied the above mentioned changes, the machine runs a Ubuntu 10.04 64bit
I don’t know where to start looking for errors.

Thanks a lot
cheers hj