zoeye859 / presto_v3_singularity

How I installed Presto3.0.1 and create a singularity .simg file (download link included) from this installation.
4 stars 3 forks source link

PGPLOT error #1

Closed zoeye859 closed 3 years ago

zoeye859 commented 4 years ago

Well, I found some errors Hooray!

Need to solve this.

Singularity presto_yhy.simg:~/Desktop/test/RFI> DDplan.py -d 1000.0 -f 1374 -b 288 -n 96 -t 0.000125 -r 0.5 -s 32 
WARNING: CacheMissingWarning: Not clearing data cache - cache inaccessible due to error: [Errno 1] Operation not permitted: '/Users/zoeye51/.astropy/cache/download/py3/urlmap' [astropy.utils.data]

Minimum total smearing     : 0.177 ms
--------------------------------------------
Minimum channel smearing   : 0 ms
Minimum smearing across BW : 0.00461 ms
Minimum sample time        : 0.125 ms

Setting the new 'best' resolution to : 0.5 ms
   Note: ok_smearing > dt (i.e. data is higher resolution than needed)
         New dt is 2 x 0.125 ms = 0.25 ms
Best guess for optimal initial dDM is 0.543
PGPLOT /xw: cannot connect to X server [:0]
Traceback (most recent call last):
  File "/usr/local/bin/DDplan.py", line 596, in <module>
    methods = dm_steps(loDM, hiDM, obs, cDM, numsubbands, ok_smearing,
  File "/usr/local/bin/DDplan.py", line 351, in dm_steps
    plotxy(np.log10(tot_smear), DMs, color='orange', logy=1, rangex=[loDM, hiDM],
  File "/usr/local/lib/python3.8/dist-packages/presto/Pgplot.py", line 340, in plotxy
    prepplot(rangex, rangey, title, labx, laby, \
  File "/usr/local/lib/python3.8/dist-packages/presto/Pgplot.py", line 206, in prepplot
    ppgplot.pgopen(device)
SystemError: exception b'_ppgplot.ioerror' not a BaseException subclass
zoeye859 commented 4 years ago

The problem is more about

"how to connect to the X server when running the singularity container"

I don't think reinstall PGPLOT will automatically solve the problem (colleague suggested)

It may be some environmental parameter, my first thoughts.

Especially, when I try

 $ exploredat Lband_topo_DM0.00.dat

It also gives me the error:

PGPLOT /xw: cannot connect to X server [:0]

So I guess, this error only appears when I need to interact with the pop-up image.

Let me investigate further.

zoeye859 commented 4 years ago

OK. (I feel I am quite enjoying this monologue)

So when I ssh my ubuntu VM with '-X':

$ ssh -X xxx.xxx.xxx.xx -p xxx  -l zoeye

Then I run

 singularity exec ../presto_yhy.simg sh test.sh

(the test.sh is the updated .sh file in readme.md)

All pop-up images are fine.

Still, I need to solve the problem, why my mac still cannot find the X server.

zoeye859 commented 4 years ago

I highly suspect it is a problem of X11 forwarding in Mac.

I just submitted an issue to the official singularity GitHub repo (https://github.com/hpcng/singularity/issues/5524)

I hope this problem can be solved.

zoeye859 commented 3 years ago

The problem has been solved. Please see https://github.com/zoeye859/presto_v3_singularity/blob/master/Solution_to_MacXserver_problem.md