wget 'http://downloads.sourceforge.net/pcsim/pypcsim-0.5.0.tar.gz'
tar xvzf pypcsim-0.5.5.tar.gz
${PCSIM_ROOT_DIR}
in the following.
cd pypcsim-0.5.5
python setup.py install --prefix=<pcsim install dir>Without the prefix, PCSIM is installed in the standard install location (usually /usr) which depends on your python installation, i.e. a global installtion is done and you need the neccessary write permissions. For other available options and commands of the setup script run python setup.py -help.
The command python setup.py install invokes several cmake instances which generate the python interface wrapper code, compile the C++ code, create the binaries and install them. The installation creates the following files locally in the PCSIM-root directory:
${PCSIM_ROOT_DIR}/bin/pcsim_test
Executable which runs all PCSIM unit tests
${PCSIM_ROOT_DIR}/lib/libpcsim.so
PCSIM shared library object. A dynamic library wich contains the core functionality of PCSIM .
${PCSIM_ROOT_DIR}/lib/pypcsim.so
PyPCSIM python extension module. A dynamic library which contains the python interface to PCSIM an can be loaded via the python import command import pypcsim.
libpcsim.so
PCSIM shared library object (copied to <prefix-dir>/lib/libpcsim.so
)
pypcsim.so
PyPCSIM python extension module (copied to <prefix-dir>/lib/python2.x/site-packages/pypcsim.so
)
python setup.py install -lIn this case one has to set the path environment variables to the localy created library files, as explained in step 6.
python setup.py test
LD_LIBRARY_PATH
and PYTHONPATH
contain the installation location you have choosen during installation. For a global installtion this should be the case anyway.
However, for a local installation it is likely that you have to add the paths to
libpcsim.so
and pypcsim.so
to the LD_LIBRARY_PATH
and PYTHONPATH
environment variables manually:
export LD_LIBRARY_PATH ${PCSIM_ROOT_DIR}/lib:${LD_LIBRARY_PATH} export PYTHONPATH ${PCSIM_ROOT_DIR}/lib:${PYTHONPATH}For csh/tcsh:
setenv LD_LIBRARY_PATH ${PCSIM_ROOT_DIR}/lib:${LD_LIBRARY_PATH} setenv PYTHONPATH=${PCSIM_ROOT_DIR}/lib:${PYTHONPATH}Put the previous lines in your
.profile
or .tcshrc
depending on the shell you are using.
pypcsimplus
):
python setup_pkg.py installFor other available options and commands of the setup script run
python setup_pkg.py --help
.
Additionally you need to add ${PCSIM_ROOT_DIR}
to PYTHONPATH
.
export PYTHONPATH=${PCSIM_ROOT_DIR}:${PYTHONPATH}For csh/tcsh:
setenv PYTHONPATH ${PCSIM_ROOT_DIR}:${PYTHONPATH}Put the previous line in your
.profile
or .tcshrc
depending on the shell you are using.
( usage: pcsim_test <AutoBuild|Nightly>
or mpirun -np 4 pcsim_test <AutoBuild|Nightly>
)