Skip to content

Phylanx Issues and Answers

Parsa Amini edited this page May 7, 2021 · 5 revisions

Phylanx Crashes Python

Issue: When a Phylanx-annotated code is run, Python crashes with an error about tcmalloc or a freed pointer. What should I do?

Answer: Try prefacing your python command with LD_PRELOAD referencing tcmalloc. As an example, let's say you installed tcmalloc system-wide into /usr/lib/libtcmalloc.so. Try the following command: LD_PRELOAD=/usr/lib/libtcmalloc.so python <phylanx-annotated python script>

Phylanx can't find a primitive

Issue: When Phylanx executes, it crashes with an error on a primitive it should be able to find. Update LD_LIBRARY_PATH to point to both the system-wide (or local) installation of STE||AR-HPX and Phylanx. Look at your /usr/lib and /usr/lib64; there should be a directory for phylanx and hpx. Update the LD_LIBRARY_PATH to point to the proper lib directory and lib subdirectory for HPX and Phylanx (example export LD_LIBRARY_PATH=/usr/lib:/usr/lib/phylanx:/usr/lib/hpx:$LD_LIBRARY_PATH).

Phylanx seminar questions:

  1. Where are the calculations happening in Blaze?
  2. When are we allocating memory? How do we know when we are? Having
    blaze::DynamicTensor<T> result(2,3,4);
    for (std::size_t i = 0; i != 3; ++i)
    {
        auto slice = blaze::rowslice(result, i);
        // some use of slice
    }

Why does slice not allocate memory?

  1. How do we write a view?
  2. Where to introduce the available ReturnTypes?