FieldConvert: confusing help parameters, unexpected runtime behaviour
The FieldConvert
tool provides misleading usage information. In particular, when working with checkpoint files, it is unclear from the help output that the original mesh also needs to be provided as a parameter.
When running with incorrect inputs, the tool either doesn't display any error (4.4.1) or it provides error output that could be improved to better explain the problem (master).
Usage
The usage output shows:
Usage: FieldConvert [options] inputfile.ext1 outputfile.ext2
Nowhere in the list of Available options: is the required mesh file input mentioned. However, in the Example usage section of the output, it shows:
FieldConvert file.xml file_vort.fld file_vort.dat
(process file_vort.fld and make a tecplot output file_vort.dat)
In this text, it's not clear, if you're unfamiliar with the tool, what file.xml
is.
Running FieldConvert
Taking as an example trying to convert a checkpoint from a run of the IncNavierStokesSolver
using the solvers/IncNavierStokesSolver/Examples/Cyl.xml
example as input, we have a checkpoint file, e.g. Cyl_2.chk
as output.
If we wish to convert this checkpoint file to VTK format (.vtu), the following appears to fit the provided usage information:
FieldConvert Cyl_2.chk Cyl_2.vtu
Running this with the current release and the -v
flag gives the following output:
Processing input fld file
InputFld CPU Time: 0.0252183s
OutputVtk CPU Time: 2.789e-06s
Total CPU Time: 0.267088s
This looks to have been updated in master since we now get the following:
Execution sequence:
InputFld -> ProcessCreateExp -> OutputVtk
InputFld: Processing input fld file
InputFld CPU Time: 0.0242754s
ProcessCreateExp: Creating m_exp if needed
ProcessCreateExp CPU Time: 6.841e-06s
OutputVtk: Writing file
Fatal : Level 0 assertion violation
OutputVtk can't write using only FieldData.
libc++abi.dylib: terminating with uncaught exception of type Nektar::ErrorUtil::NekError: Level 0 assertion violation
OutputVtk can't write using only FieldData.
...followed by a stack trace.