Installing from the source distribution

  1. Downloaded the source distribution from http://www.igi.tugraz.at/pcsim or directly from the project site at sourceforge.
    wget 'http://downloads.sourceforge.net/pcsim/pypcsim-0.5.0.tar.gz'
    

  2. Unpack the downloaded compress archive file. E.g.
    tar xvzf pypcsim-0.5.5.tar.gz
    

  3. Change to the newly created directory. We will refer to this as ${PCSIM_ROOT_DIR} in the following.
    cd pypcsim-0.5.5
    

  4. Run the python setup script in the PCSIM-root directory:
    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:

    Additionaly, the following files are copied to the chosen installation locations: To do a local installation and skip the copying of the libraries to the install directories, execute:
    python setup.py install -l
    
    In this case one has to set the path environment variables to the localy created library files, as explained in step 6.

  5. Run the tests
    python setup.py test
    

  6. For the installation to work one has to make sure that the environment variables 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:
    For bash:
    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.

  7. If you also want to install the python packages accompanying PCSIM (currently only pypcsimplus):
    python setup_pkg.py install
    
    For 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.
    For bash:
    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.

  8. If your reached this point with all tests passed, you made it!

( usage: pcsim_test <AutoBuild|Nightly> or mpirun -np 4 pcsim_test <AutoBuild|Nightly> )