I am trying to run gpt on a linux snap installation just to recalculate indices on S2 bands. Band calculated are null
Output logs below.
WARNING: org.esa.s2tbx.dataio.s2.Sentinel2ProductReader: Could not retrieve tile layout for file /g/data/…_B11.jp2 error returned: Command [/home/554/mm2899/.snap/auxdata/openjpeg/6.0.3/openjpeg-2.1.0-linux64/bin/opj_dump -i /…/.jp2 ] failed with error code , stdoutput [[ERROR] Unknown input file format: /tmp/…B11.jp2 Known file formats are *.j2k, *.jp2, *.jpc or *.jpt] and stderror 
Then I ran
/…/opj_dump -i T5,.jp2 …/tst.png
[ERROR] Unknown input file format: T55JFH_20181015T001109_B07.jp2
Known file formats are *.j2k, *.jp2, *.jpc or *.jpt
Can anybody suggest a solution?
Thanks in advance
Did you resample your granular beforehand to the desirable resolution? might be it affects the calculation,
How did you call the gpt?
Did you check up your *xml file?
Bands used in calculations are all in same resolution
In windows gpt -e ./s2nwdi.xml -Pinf=IFN -Poutf=OFN is working fine.
In unix gpt -e ./s2nwdi.xml -Pinf=$IFN -Poutf=$OFN runs and produce errors Unknown input file format: /tmp/…B11.jp2 and produce output with null values.
Unknown input file format: /tmp/…B11.jp2
I see that you are using Linux, with SNAP 6.0.3 from your log messages.
We simply tested the opj_dump (causing issues for you) on Ubuntu and CentOS, and the only way to reproduce your error was when we renamed the .jp2 file with upper-case extension (.JP2) on the file system. Like this we obtained exactly your error.
So please check if your files (on the file system) have a .jp2 or .JP2 extension. (Windows is not case sensitive, this could be the reason it worked on Windows)
Input file is standard Sentinel-2 zip file downloaded and saved in Linuix file system. Zip file has each band with smaller case .jp2 extensions. There is some clue on your answer but still couldn’t figure out reason.