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

"Unknown image format/type" error when trying to boot PSRSOFT_yhy..simg #5

Closed You-Ziyi closed 3 years ago

You-Ziyi commented 4 years ago

Version of Singularity: 2.4-dist operating system: windows10 other software: git for windows, virtual box , Vagrant Manager

Issue: I am trying to boot PSRSOFT_yhy.simg using the singularity command "$ singularity shell presto_yhy.simg", but an error message pops up which can't be solved by myself. The actual behavior is as follows: vagrant@vagrant:~$ singularity shell /vagrant_datat/PSRSOFT_yhy.simg ERROR : Image path doesn't exists ABORT : Retval = 255

vagrant@vagrant:~$ cd/ -bash: cd/: No such file or directory vagrant@vagrant:~$ cd / vagrant@vagrant:/$ ls bin etc lib media proc sbin sys vagrant vmlinuz boot home lib64 mnt root snap tmp vagrant_data dev initrd.img lost+found opt run srv usr var vagrant@vagrant:/$ cd vagrant_data vagrant@vagrant:/vagrant_data$ ls PSRSOFT_yhy.simg vagrant@vagrant:/vagrant_data$ cd /home/vagrant vagrant@vagrant:~$ singularity USAGE: singularity [global options...] [command options...] ...

GLOBAL OPTIONS: -d|--debug Print debugging information -h|--help Display usage summary -s|--silent Only print errors -q|--quiet Suppress all normal output --version Show application version -v|--verbose Increase verbosity +1 -x|--sh-debug Print shell wrapper debugging information

GENERAL COMMANDS: help Show additional help for a command or container selftest Run some self tests for singularity install

CONTAINER USAGE COMMANDS: exec Execute a command within container run Launch a runscript within container shell Run a Bourne shell within container test Launch a testscript within container

CONTAINER MANAGEMENT COMMANDS: apps List available apps within a container bootstrap Deprecated use build instead build Build a new Singularity container check Perform container lint checks inspect Display container's metadata mount Mount a Singularity container image pull Pull a Singularity/Docker container to $PWD

COMMAND GROUPS: image Container image command group instance Persistent instance command group

CONTAINER USAGE OPTIONS: see singularity help

For any additional help or support visit the Singularity website: http://singularity.lbl.gov/

Look forward to your reply as soon as possible, your kind help will be my pleasue. Thinks !

zoeye859 commented 4 years ago

Thank you very much for reporting this. The container can work on Mac and Linux at the moment. I will investigate the Vagrant Manager on Windows10.

I suspect that I need to change the .simg to a different format, but not sure at the moment.

Will get back to you as soon as I can.

Best, Zoe

zoeye859 commented 4 years ago

Thanks to Ziyi, I converted the .simg file into a .img file. Hopefully Vagrant will be happy with it.

Let me know if this .imag file works as expected.

Best. Zoe

yiqishangxuequ commented 4 years ago

Hi!

I guess the version of singularity you are using is old.

The guide in https://singularity.lbl.gov/ is obsolete. If you install singularity based on the guide you will get the version2.4 singularity. Zoe build the presto_yhy.simg by version3.6+ singularity, so the old 2.4version singularity can't recognize the presto_yhy.simg

you can follow the installing guide in https://sylabs.io/guides/3.6/admin-guide/installation.html#installation-on-windows-or-mac, and you will get the singularity of version3.5+ which can recognize the the presto_yhy.simg.

vagrant@vagrant:~$ singularity --version
singularity version 3.5.1
vagrant@vagrant:~$ ls
presto_simg.sh  PSRSOFT_yhy1.1.simg
vagrant@vagrant:~$ sudo singularity shell PSRSOFT_yhy1.1.simg
Singularity> source presto_simg.sh
Singularity> readfile GBT_Lband_PSR.fil
Assuming the data is a SIGPROC filterbank file.

1: From the SIGPROC filterbank file 'GBT_Lband_PSR.fil':
                  Telescope = GBT
                Source Name = Mystery_PSR
            Obs Date String = 2004-01-06T11:38:09
             MJD start time = 53010.48482638889254
                   RA J2000 = 16:43:38.1000
             RA J2000 (deg) = 250.90875
                  Dec J2000 = -12:24:58.7000
            Dec J2000 (deg) = -12.4163055555556
                  Tracking? = True
              Azimuth (deg) = 0
           Zenith Ang (deg) = 0
            Number of polns = 2 (summed)
           Sample time (us) = 72
         Central freq (MHz) = 1400
          Low channel (MHz) = 1352.5
         High channel (MHz) = 1447.5
        Channel width (MHz) = 1
         Number of channels = 96
      Total Bandwidth (MHz) = 96
                       Beam = 1 of 1
            Beam FWHM (deg) = 0.147
         Spectra per subint = 2400
           Spectra per file = 531000
      Time per subint (sec) = 0.1728
        Time per file (sec) = 38.232
            bits per sample = 4
          bytes per spectra = 48
        samples per spectra = 96
           bytes per subint = 115200
         samples per subint = 230400
                zero offset = 0
           Invert the band? = False
       bytes in file header = 365

Best, Liu

yiqishangxuequ commented 4 years ago

But when using explorefftorexploredat, the errors below will come up. So it's clear that running singularity in linux is better than windows......

  Singularity> exploredat Lband_topo_DM0.00.dat

      Interactive Data Explorer
         by Scott M. Ransom
            November, 2001

 Button or Key            Effect
 -------------            ------
 Left Mouse or I or A     Zoom in  by a factor of 2
 Right Mouse or O or X    Zoom out by a factor of 2
 <                        Shift left  by a full screen width
 >                        Shift right by a full screen width
 ,                        Shift left  by 1/8 of the screen width
 .                        Shift right by 1/8 of the screen width
 +/_                      Increase/Decrease the top edge
 =/-                      Increase/Decrease the bottom edge
 SPACE                    Toggle statistics and sample plotting on/off
 M                        Toggle between median and average
 S                        Scale the powers automatically
 V                        Print the statistics for the current view
 P                        Print the current plot to a file
 G                        Go to a specified time
 ?                        Show this help screen
 Q                        Quit

Examining Mystery_PSR data from 'Lband_topo_DM0.00.dat'.

PGPLOT /xw: cannot connect to X server []
Singularity> explorefft Lband_topo_DM0.00.fft

      Interactive FFT Explorer
         by Scott M. Ransom
            October, 2001

 Button or Key       Effect
 -------------       ------
 Left Mouse or I     Zoom in  by a factor of 2
 Right Mouse or O    Zoom out by a factor of 2
 Middle Mouse or D   Show details about a selected frequency
 <                   Shift left  by a full screen width
 >                   Shift right by a full screen width
 ,                   Shift left  by 1/8 of the screen width
 .                   Shift right by 1/8 of the screen width
 + or =              Increase the power scale (make them taller)
 - or _              Decrease the power scale (make them shorter)
 S                   Scale the powers automatically
 N                   Re-normalize the nowers by one of several methods
 P                   Print the current plot to a file
 G                   Go to a specified frequency
 L                   Load a zaplist showing potential RFI locations
 Z                   Add a frequency chunk to the RFI zaplist
 H                   Show the harmonics of the center frequency
 ?                   Show this help screen
 Q                   Quit

Examining Mystery_PSR data from 'Lband_topo_DM0.00.fft'.

Memory mapping the input FFT.  This may take a while...
PGPLOT /xw: cannot connect to X server []

Best, Liu

zoeye859 commented 4 years ago

Hi Liu,

Thank you very much for your kind help! Really appreciate that!

If the Xquartz is not properly installed or configured, Mac users would face the same problem (PGPLOT /xw: cannot connect to X server []). I have solved this problem for Mac users, check here: https://github.com/zoeye859/presto_v3_singularity/blob/master/Solution_to_MacXserver_problem.md

I guess the error message you got also resulted from Xquartz installation or configuration. I would suggest you to try step 4 in https://github.com/zoeye859/presto_v3_singularity/blob/master/Solution_to_MacXserver_problem.md, so that you can figure out whether the XQuartz is installed on your Windows or not. What do you think?

Best, Zoe

yiqishangxuequ commented 4 years ago

Hi Zoe,

It's my preasure! And thanks to your ideas very much!

I finally solve the problem, although the answer looks a bit complex.

We can follow the tutorial How to enable X11 Forwarding in windows 10 on a Vagrant Virtual Box Running Ubuntu, It is simple.

In the tutorial , after I open my /etc/ssh/ssh_config file on your Ubuntu machine and enable Forwardx11, it seems that nothing happens. So I add config.ssh.forward_x11 = true to the Vagrant configuration file Vagrantfile.

When you finish the tutorial, connect the Vagrant box by PuTTY, and issue xclock to test the X11 Forwarding, you may encounter some problems

PuTTY X11 proxy: Unsupported Authorisation Protocol [closed]

or

.Xauthority not writable

or

Error: Can’t open display: localhost:10.0

Then, you can consult the post PuTTY X11 proxy: Unsupported Authorisation Protocol [closed], It can solve the problems above. And I find .Xauthority files is in the /home/vagrant, so we must cp /home/vagrant/.Xauthority to the /root .

Unfortunately, the errors above alse come up when enterring then singularity container in Vagrant box and use the explorefft of exploerdat directly. So you must again cp /home/vagrant/.Xauthority to the /root. And when you again enter the singularity container, you still again cp /home/vagrant/.Xauthority to the /root......If don't cp, you will get the errors below:

Memory mapping the input FFT.  This may take a while...
PuTTY X11 proxy: Authorisation not recognised
PGPLOT /xw: cannot connect to X server [localhost:10.0]

Finishing the steps above, we finally can use explorefft or explorefft or other commands.

To sum up, it may be better to use Windows Subsystem for Linux(WSL) in windows10 rather than Vagrant.

Best, Liu

You-Ziyi commented 4 years ago

Thank you very much. I will try to reinstall the singularity 3.5+. I will reply in detail when I have solved the problem,Thanks again !

------------------ 原始邮件 ------------------ 发件人: "zoeye859/presto_v3_singularity" <notifications@github.com>; 发送时间: 2020年9月21日(星期一) 晚上8:15 收件人: "zoeye859/presto_v3_singularity"<presto_v3_singularity@noreply.github.com>; 抄送: "舒心"<357534271@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [zoeye859/presto_v3_singularity] "Unknown image format/type" error when trying to boot PSRSOFT_yhy..simg (#5)

Hi Zoe,

It's my preasure!

I finally solve the problem, although the answer looks a bit complex.

We can follow the tutorial How to enable X11 Forwarding in windows 10 on a Vagrant Virtual Box Running Ubuntu, It is simple.

In the tutorial , after I open my /etc/ssh/ssh_config file on your Ubuntu machine and enable Forwardx11, it seems that nothing happens. So I add config.ssh.forward_x11 = true to the Vagrant configuration file Vagrantfile.

When you finish the tutorial, connect the Vagrant box by PuTTY, and issue xclock to test the X11 Forwarding, you may encounter some problems PuTTY X11 proxy: Unsupported Authorisation Protocol [closed]
or .Xauthority not writable
or Error: Can’t open display: localhost:10.0
Then, you can consult the post PuTTY X11 proxy: Unsupported Authorisation Protocol [closed], It can solve the problems above. And I find .Xauthority files is in the /home/vagrant, so we must cp /home/vagrant/.Xauthority to the /root

Unfortunately, the errors above alse come up when enterring then singularity container in Vagrant box and use the explorefft of exploerdat directly. So you must again cp /home/vagrant/.Xauthority to the /root. And when you again enter the singularity container, you still again cp /home/vagrant/.Xauthority to the /root......

Finishing the steps above, we finally can use explorefft or explorefft or other commands.

To sum up, it may be better to use Windows Subsystem for Linux(WSL) in windows10 rather than Vagrant.

Best, Liu

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

yiqishangxuequ commented 4 years ago

haha

I think it's simple to use Windows Subsystem for Linux(WSL) or ubuntu in VM VirtualBox directly.

It's complicated to use Vagrant.

And if you think it's complicated, you may rely other method to use singularty.

Best, Liu.

yiqishangxuequ commented 4 years ago

Hi,

I find that we can connect X server without PuTTY. And I have finished it in my windows.

The method is easier than using PuTTY and it only uses the Xming Server.

We can consult X-forward to run GUI program in Vagrant box and X session in Git Bash on Windows?

I will write down detailed content when I have some time.

good night!

Best, Liu

zoeye859 commented 3 years ago

Hi,

I find that we can connect X server without PuTTY. And I have finished it in my windows.

The method is easier than using PuTTY and it only uses the Xming Server.

We can consult X-forward to run GUI program in Vagrant box and X session in Git Bash on Windows?

I will write down detailed content when I have some time.

good night!

Best, Liu

Hi Liu,

I think Ziyi faced the X server problem you described, and your experience is very valuable to him! Thank you very much!

Best, Zoe

You-Ziyi commented 3 years ago

Dear zoeye:            Thank you very much for your kind help ! Really appreciate that and I will reply you later when I try it again. Thanks again.

Best wishes

                  Ziyiyou

 

 

------------------ 原始邮件 ------------------ 发件人: "zoeye859/presto_v3_singularity" <notifications@github.com>; 发送时间: 2020年10月20日(星期二) 中午1:13 收件人: "zoeye859/presto_v3_singularity"<presto_v3_singularity@noreply.github.com>; 抄送: "舒心"<357534271@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [zoeye859/presto_v3_singularity] "Unknown image format/type" error when trying to boot PSRSOFT_yhy..simg (#5)

Hi,

I find that we can connect X server without PuTTY. And I have finished it in my windows.

The method is easier than using PuTTY and it only uses the Xming Server.

We can consult X-forward to run GUI program in Vagrant box and X session in Git Bash on Windows?

I will write down detailed content when I have some time.

good night!

Best, Liu

Hi Liu,

I think Ziyi faced the X server problem you described, and your experience is very valuable to him! Thank you very much!

Best, Zoe

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

You-Ziyi commented 3 years ago

Excuse me, zoeye, I have successfully installed singularity 3.5+ in windows, thanks. However, when running the search command, one problem occurs as follows.

Singularity> cd /PSRSOFT/ Singularity> ls bin fftw-3.3.8 packages presto share cfitsio-3.48 fftw-3.3.8.tar.gz pgplot psrcat_pkg.tar sigproc cfitsio-3.48.tar.gz include pgplot5.2.tar.gz psrcat_tar tempo dspsr lib pgplot_source psrchive wget-log Singularity> cd presto Singularity> ls COPYING MANIFEST.in clig include python tests COPYRIGHT README.md docs lib setup.py INSTALL bin examplescripts pyproject.toml src Singularity> cd examplescripts Singularity> ls ACCEL_sift.py ffdot_example.py pdm2raw.py show_zresp.py concatdata.py full_analysis.py ppdot_plane_plot.py testcorr.py dedisp.py jerk_example.py short_analysis_simple.py testz.mak Singularity> cd /yzy Singularity> ls GBT_Lband_PSR.fil Lband_DM62.00.dat Lband_DM40.00.dat Lband_DM62.00.fft Lband_DM40.00.fft Lband_DM62.00.inf Lband_DM40.00.inf Lband_DM62.00_ACCEL_0 Lband_DM40.00_ACCEL_0 Lband_DM62.00_ACCEL_0.cand Lband_DM40.00_ACCEL_0.cand Lband_DM62.00_ACCEL_0.txtcand Lband_DM40.00_ACCEL_0.txtcand Lband_DM64.00.dat Lband_DM42.00.dat Lband_DM64.00.fft Lband_DM42.00.fft Lband_DM64.00.inf Lband_DM42.00.inf Lband_DM64.00_ACCEL_0 Lband_DM42.00_ACCEL_0 Lband_DM64.00_ACCEL_0.cand Lband_DM42.00_ACCEL_0.cand Lband_DM64.00_ACCEL_0.txtcand Lband_DM42.00_ACCEL_0.txtcand Lband_DM66.00.dat Lband_DM44.00.dat Lband_DM66.00.fft Lband_DM44.00.fft Lband_DM66.00.inf Lband_DM44.00.inf Lband_DM66.00_ACCEL_0 Lband_DM44.00_ACCEL_0 Lband_DM66.00_ACCEL_0.cand Lband_DM44.00_ACCEL_0.cand Lband_DM66.00_ACCEL_0.txtcand Lband_DM44.00_ACCEL_0.txtcand Lband_DM68.00.dat Lband_DM46.00.dat Lband_DM68.00.fft Lband_DM46.00.fft Lband_DM68.00.inf Lband_DM46.00.inf Lband_DM68.00_ACCEL_0 Lband_DM46.00_ACCEL_0 Lband_DM68.00_ACCEL_0.cand Lband_DM46.00_ACCEL_0.cand Lband_DM68.00_ACCEL_0.txtcand Lband_DM46.00_ACCEL_0.txtcand Lband_DM70.00.dat Lband_DM48.00.dat Lband_DM70.00.fft Lband_DM48.00.fft Lband_DM70.00.inf Lband_DM48.00.inf Lband_DM70.00_ACCEL_0 Lband_DM48.00_ACCEL_0 Lband_DM70.00_ACCEL_0.cand Lband_DM48.00_ACCEL_0.cand Lband_DM70.00_ACCEL_0.txtcand Lband_DM48.00_ACCEL_0.txtcand Lband_DM72.00.dat Lband_DM50.00.dat Lband_DM72.00.fft Lband_DM50.00.fft Lband_DM72.00.inf Lband_DM50.00.inf Lband_DM72.00_ACCEL_0 Lband_DM50.00_ACCEL_0 Lband_DM72.00_ACCEL_0.cand Lband_DM50.00_ACCEL_0.cand Lband_DM72.00_ACCEL_0.txtcand Lband_DM50.00_ACCEL_0.txtcand Lband_DM74.00.dat Lband_DM52.00.dat Lband_DM74.00.fft Lband_DM52.00.fft Lband_DM74.00.inf Lband_DM52.00.inf Lband_DM74.00_ACCEL_0 Lband_DM52.00_ACCEL_0 Lband_DM74.00_ACCEL_0.cand Lband_DM52.00_ACCEL_0.cand Lband_DM74.00_ACCEL_0.txtcand Lband_DM52.00_ACCEL_0.txtcand Lband_DM76.00.dat Lband_DM54.00.dat Lband_DM76.00.fft Lband_DM54.00.fft Lband_DM76.00.inf Lband_DM54.00.inf Lband_DM76.00_ACCEL_0 Lband_DM54.00_ACCEL_0 Lband_DM76.00_ACCEL_0.cand Lband_DM54.00_ACCEL_0.cand Lband_DM76.00_ACCEL_0.txtcand Lband_DM54.00_ACCEL_0.txtcand Lband_DM78.00.dat Lband_DM56.00.dat Lband_DM78.00.fft Lband_DM56.00.fft Lband_DM78.00.inf Lband_DM56.00.inf Lband_DM78.00_ACCEL_0 Lband_DM56.00_ACCEL_0 Lband_DM78.00_ACCEL_0.cand Lband_DM56.00_ACCEL_0.cand Lband_DM78.00_ACCEL_0.txtcand Lband_DM56.00_ACCEL_0.txtcand Lband_rfifind.bytemask Lband_DM58.00.dat Lband_rfifind.inf Lband_DM58.00.fft Lband_rfifind.mask Lband_DM58.00.inf Lband_rfifind.ps Lband_DM58.00_ACCEL_0 Lband_rfifind.rfi Lband_DM58.00_ACCEL_0.cand Lband_rfifind.stats Lband_DM58.00_ACCEL_0.txtcand Lband_topo_DM0.00.dat Lband_DM60.00.dat Lband_topo_DM0.00.fft Lband_DM60.00.fft Lband_topo_DM0.00.inf Lband_DM60.00.inf Lband_topo_DM0.00_ACCEL_0 Lband_DM60.00_ACCEL_0 Lband_topo_DM0.00_ACCEL_0.cand Lband_DM60.00_ACCEL_0.cand Lband_topo_DM0.00_ACCEL_0.txtcand Lband_DM60.00_ACCEL_0.txtcand cand.txt Singularity> python /PSRSOFT/presto/examplescripts/ACCEL_sift.py>cands.txt bash: python: command not found

What can I do to solve this "python: command not found" problem? Your kind reply will be my pleasure.

zoeye859 commented 3 years ago

Hi Ziyi,

After our communicating, this problem has been solved by replacing 'python' to 'python3'. This issue will be closed.

Have fun!

Best, Zoe