pnorbert / adiosvm

Packages and howtos for creating a linux system for ADIOS tutorials
17 stars 25 forks source link

Default plotter is broke: #46

Closed NAThompson closed 4 years ago

NAThompson commented 4 years ago

Building on top of the latest adios2, the python package installed via conda, I successfully ran:

$ ./build/gray-scott simulation/settings-files.json

But when following the instructions to create a plot, I obtain the error:

$ python3 plot/gsplot.py -i gs.bp
Traceback (most recent call last):
  File "plot/gsplot.py", line 105, in <module>
    fr = adios2.open(args.instream, "r", mpi.comm_app,"adios2.xml", "SimulationOutput")
TypeError: open(): incompatible function arguments. The following argument types are supported:
    1. (name: str, mode: str, engine_type: str='BPFile') -> adios2::py11::File
    2. (name: str, mode: str, config_file: str, io_in_config_file: str) -> adios2::py11::File

Invoked with: 'gs.bp', 'r', <mpi4py.MPI.Intracomm object at 0x7f1e9c6a5d30>, 'adios2.xml', 'SimulationOutput'

Other relevant info:

$ python3 --version
Python 3.7.5
$ conda --version
conda 4.7.12
williamfgc commented 4 years ago

@NAThompson can you check if the adios2 library was built with MPI? Look into include/adios2/common/ADIOSConfig.h for ADIOS2_HAVE_MPI . From looking at the signature, the default plotter works with MPI versions only.

NAThompson commented 4 years ago
$ cat /usr/local/include/adios2/common/ADIOSConfig.h | grep -A 1 'MPI'     
/* CMake Option: ADIOS_USE_MPI=OFF */
#define ADIOS2_HAVE_MPI

Here's what it says when I build:

    Build Options:
      Blosc     : OFF
      BZip2     : ON
      ZFP       : ON
      SZ        : OFF
      MGARD     : OFF
      PNG       : ON
      MPI       : ON

I wonder if this is because I installed the non-MPI version of ADIOS for Python, because the following is fine:

 adios2.open("gs.bp", "r", "adios2.xml", "SimulationOutput")
<adios2.file named 'gs.bp' and mode 'r'>
williamfgc commented 4 years ago

@NAThompson seems that's not the adios2 you're trying to link. Is adios2 from conda or from the system? (the one showing is the system installed one).

NAThompson commented 4 years ago

Yeah, I used the system adios2, and then used the Conda Python bindings. Looks like a recipe for chaos.

BTW, changing line 105 of plot/gsplot.py from

fr = adios2.open(args.instream, "r", mpi.comm_app,"adios2.xml", "SimulationOutput")

to

fr = adios2.open(args.instream, "r", "adios2.xml", "SimulationOutput")

fixes the issue. Is there a check that can be done on the adios2 Python package the determines if it has been built with MPI?

NAThompson commented 4 years ago

This is due to me not controlling the chaos in my environment.

williamfgc commented 4 years ago

Is there a check that can be done on the adios2 Python package the determines if it has been built with MPI?

@NAThompson should be a Python utility, but this is typically done from the package manager: e.g. conda search adios2-openmpi --info -c williamfgc or spack info adios2 would list dependencies for that particular build.