# How to write AMR grid in Catalyst-5.6

**URL:** https://discourse.paraview.org/t/how-to-write-amr-grid-in-catalyst-5-6/1807
**Category:** In Situ Support
**Created:** [May 9, 2019, 3:24pm UTC](https://discourse.paraview.org/t/how-to-write-amr-grid-in-catalyst-5-6/1807 "2019-05-09T15:24:47Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![tesari](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/t/e99b99/32.png) [@tesari](https://discourse.paraview.org/u/tesari)
#### Post date: [May 9, 2019, 3:24pm UTC](https://discourse.paraview.org/t/how-to-write-amr-grid-in-catalyst-5-6/1807/1 "2019-05-09T15:24:47Z")

</div>

Hi,

I asked this a week ago, but did not get any feedback. Let me try to clarify my question. I build CatalystExamples. Running “CxxNonOverlappingAMRExample feslicescript.py” works as expected, I get slice\_#.vtm files.

But how to write the grid? Using SampleScripts/gridwriter.py fails with “AttributeError: ‘PVModule’ object has no attribute’‘XMLHierarchicalBoxDataWriter’”. I have the same issue with CxxOverlappingAMRExample, slice works, grid does not.

I work with Catalyst-v5.6.0-Base-Enable-Python-Essentials-Extras-Rendering-Base on Linux x86\_64.

Any help is highly appreciated.

Thanks,  
Ted

./CxxNonOverlappingAMRExample gridwriter.py

Traceback (most recent call last):  
File “”, line 2, in   
File “gridwriter.py”, line 99, in DoCoProcessing  
File “/ascldap/users/tesari/local/catalyst/lib/python2.7/site-packages/paraview/coprocessing.py”, line 212, in UpdateProducers  
self.CreatePipeline(datadescription)  
File “gridwriter.py”, line 55, in CreatePipeline  
File “gridwriter.py”, line 17, in _CreatePipeline  
adaptorinput = coprocessor.CreateProducer( datadescription, “input” )  
File “gridwriter.py”, line 37, in Pipeline  
filename = 'input_%t.vthb’  
AttributeError: ‘PVModule’ object has no attribute ‘XMLHierarchicalBoxDataWriter’  
…

---

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [May 10, 2019, 8:38pm UTC](https://discourse.paraview.org/t/how-to-write-amr-grid-in-catalyst-5-6/1807/2 "2019-05-10T20:38:26Z")

</div>

@Dave_DeMarle @cory.quammen @utkarsh.ayachit This is for a user of mine.

Thanks guys!

---

<div class="post-metadata">

### Author: ![Dave\_DeMarle](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dave_demarle/32/27_2.png) [@Dave\_DeMarle](https://discourse.paraview.org/u/Dave_DeMarle)
#### Post date: [May 10, 2019, 9:43pm UTC](https://discourse.paraview.org/t/how-to-write-amr-grid-in-catalyst-5-6/1807/3 "2019-05-10T21:43:42Z")

</div>

Hi Tim and Alan.

In your copy of gridwriter.py, please try and substitute XMLUniformGridAMRWriter for XMLHierarchicalBoxDataWriter.

@Alan please file a bug report and assign it to me.

---

<div class="post-metadata">

### Author: ![tesari](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/t/e99b99/32.png) [@tesari](https://discourse.paraview.org/u/tesari)
#### Post date: [May 10, 2019, 9:52pm UTC](https://discourse.paraview.org/t/how-to-write-amr-grid-in-catalyst-5-6/1807/4 "2019-05-10T21:52:27Z")

</div>

No difference:

```
  AttributeError: 'PVModule' object has no attribute

```

‘XMLUniformGridAMRWriter’

Thanks,

Ted

```
  [ews00734@CxxOverlappingAMRExample $] ./CxxOverlappingAMRExample

```

gridwriter.py  
adding in script gridwriter.py  
Traceback (most recent call last):  
File “”, line 2, in   
File “gridwriter.py”, line 100, in DoCoProcessing

```
    File

```

“/ascldap/users/tesari/local/catalyst/lib/python2.7/site-packages/paraview/coprocessing.py”,  
line 212, in UpdateProducers  
self.CreatePipeline(datadescription)  
File “gridwriter.py”, line 56, in CreatePipeline

```
    File "gridwriter.py", line 17, in _CreatePipeline
      adaptorinput = coprocessor.CreateProducer( datadescription,

```

“input” )  
File “gridwriter.py”, line 38, in Pipeline  
filename = ‘input\_%t.vthb’  
AttributeError: ‘PVModule’ object has no attribute  
‘XMLUniformGridAMRWriter’  
Traceback (most recent call last):  
File “”, line 2, in   
File “gridwriter.py”, line 100, in DoCoProcessing

```
    File

```

“/ascldap/users/tesari/local/catalyst/lib/python2.7/site-packages/paraview/coprocessing.py”,  
line 212, in UpdateProducers  
self.CreatePipeline(datadescription)  
File “gridwriter.py”, line 56, in CreatePipeline

```
    File "gridwriter.py", line 17, in _CreatePipeline
      adaptorinput = coprocessor.CreateProducer( datadescription,

```

“input” )  
File “gridwriter.py”, line 38, in Pipeline  
filename = ‘input\_%t.vthb’  
AttributeError: ‘PVModule’ object has no attribute  
‘XMLUniformGridAMRWriter’

---

<div class="post-metadata">

### Author: ![Dave\_DeMarle](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dave_demarle/32/27_2.png) [@Dave\_DeMarle](https://discourse.paraview.org/u/Dave_DeMarle)
#### Post date: [May 13, 2019, 2:57pm UTC](https://discourse.paraview.org/t/how-to-write-amr-grid-in-catalyst-5-6/1807/5 "2019-05-13T14:57:58Z")

</div>

> [@tesari](#):
>
> Catalyst-v5.6.0-Base-Enable-Python-Essentials-Extras-Rendering-Base

My next idea is that these particular writers are scrubbed away and not available in the catalyst editions. This appears to be done by the files Extras/manifest.json which selects a subset of the readers and writers in the VTK/IO/XML directory to make available.

When I use gridwriter with either overlapping or nonoverlapping example against a full paraview build, gridwriter finds the original XMLHierarchicalBoxDataWriter just fine.

You should either use a full paraview build as the catalyst library to link against, or extend your edition via that manifest file to include the writer.

---

<div class="post-metadata">

### Author: ![tesari](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/t/e99b99/32.png) [@tesari](https://discourse.paraview.org/u/tesari)
#### Post date: [May 13, 2019, 5:12pm UTC](https://discourse.paraview.org/t/how-to-write-amr-grid-in-catalyst-5-6/1807/6 "2019-05-13T17:12:10Z")

</div>

Hi Dave,

```
  I have a clean build of Paraview. When trying to build the

```

examples, I get error (attached): 'Found paraview-config.cmake, but ParaView is considered to  
be NOT FOUND", and ‘Could not find  
vtkPVPythonCatalyst’.

vtkPVPythonCatalyst files are available  
under lib64:

./lib64/python2.7/site-packages/paraview/modules/vtkPVPythonCatalyst.py

./lib64/python2.7/site-packages/paraview/modules/vtkPVPythonCatalystPython.so

```
    ./lib64/vtk/hierarchy/ParaView/vtkPVPythonCatalyst-hierarchy.txt

    ./include/paraview-5.6/vtkPVPythonCatalystModule.h

  I haven't work with the full build of Paraview before. What do I

```

miss?

Thanks,

Ted

[ews00734@build $] ./my\_catalyst\_build  
– Boost version: 1.53.0  
CMake Error at CMakeLists.txt:8 (find\_package):  
Found package configuration file:

/ascldap/users/tesari/local/catalyst/lib64/cmake/paraview-5.6/paraview-config.cmake

```
    but it set ParaView_FOUND to FALSE so package "ParaView" is

```

considered to  
be NOT FOUND. Reason given by package:

```
    Could not find the ParaView package with the following required

```

components:  
vtkPVPythonCatalyst.

[paraview-config.cmake](https://discourse.paraview.org/uploads/default/original/2X/a/a8a486bcbe67596f32f4bd82a933b69476d5a308.cmake) (6.64 KB)

---

<div class="post-metadata">

### Author: ![Dave\_DeMarle](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dave_demarle/32/27_2.png) [@Dave\_DeMarle](https://discourse.paraview.org/u/Dave_DeMarle)
#### Post date: [May 13, 2019, 5:31pm UTC](https://discourse.paraview.org/t/how-to-write-amr-grid-in-catalyst-5-6/1807/7 "2019-05-13T17:31:01Z")

</div>

I set mine to my 5.6.0 build directory.  
ParaView\_DIR:PATH=/home/demarle/Source/PARAVIEW/devel/release\_5.6.0/build  
Where it found the attached paraview-config.cmake.

[ParaViewConfig.cmake](https://discourse.paraview.org/uploads/default/original/2X/f/f652c7692ced216d7c40237c180578459e45dce1.cmake) (5.0 KB)

---

<div class="post-metadata">

### Author: ![tesari](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/t/e99b99/32.png) [@tesari](https://discourse.paraview.org/u/tesari)
#### Post date: [May 19, 2019, 12:46am UTC](https://discourse.paraview.org/t/how-to-write-amr-grid-in-catalyst-5-6/1807/8 "2019-05-19T00:46:44Z")

</div>

Hi Dave,

I set ParaView\_DIR to my build directory, but still get 'Found paraview-config.cmake,  
but ParaView is considered to be NOT FOUND. Next, I did  
a fresh clone from [gitlab.kitware.com/paraview/paraview.git](http://gitlab.kitware.com/paraview/paraview.git)  
(c5c6c48237276), - same error.

In my humble opinion, find\_package(ParaView) fails,  
because it looks for UseParaView.cmake, but there is no file  
matching UseParaView\* in the paraview trunk.

Next, I try to add XMLUniformGridAMRWriter  
in Extras/manifest.json (XMLHierarchicalBoxDataWriter  
is already included). As a first step I made a copy of Base as  
myBase, and run catalyze.py:

```
    [ews00734@Catalyst $] python catalyze.py -r 

```

/ascldap/users/tesari/projects/paraview -i Editions/myBase -o  
~/projects/myBase

```
    Processing Editions/myBase

    patching file ParaViewCore/ClientServerCore/Core/CMakeLists.txt

    Hunk #1 FAILED at 34.

    Hunk #2 FAILED at 48.

    Hunk #3 FAILED at 108.

    3 out of 3 hunks FAILED -- saving rejects to file

```

ParaViewCore/ClientServerCore/Core/CMakeLists.txt.rej

```
    can't find file to patch at input line 33

    Perhaps you used the wrong -p or --strip option?

    The text leading up to this was:
```
