openworm/OpenWorm

Make stack easily usable in Windows

slarson opened this issue · 11 comments

Make the docker container run on Windows.

Currently seeing this error:

Python >>  Initialised C302NRNSimulation of length 100 ms and dt = 0.005 ms...
Python muscle signal generator class: C302NRNSimulation loaded!
Configuration was loaded
 CL_PLATFORM_VERSION [0]:       OpenCL 2.1 LINUX
 CL_PLATFORM_VERSION [1]:       OpenCL 1.2
Unfortunately OpenCL couldn't find device GPU
OpenCL try to init existing device
Sib_c302  >>>
Sib_c302  >>> ************************************************************************
Sib_c302  >>> *
Sib_c302  >>> *  Generating images for neuronal activity...
Sib_c302  >>> *
Sib_c302  >>> ************************************************************************
pyNeuroML >>> Reloading data specified in LEMS file: simulations/C2_FW_2018-02-10_17-42-33/LEMS_c302.xml, base_dir: simulations/C2_FW_2018-02-10_17-42-33
Traceback (most recent call last):
  File "sibernetic_c302.py", line 357, in <module>
    main()
  File "sibernetic_c302.py", line 111, in main
    run(a=args)
  File "sibernetic_c302.py", line 319, in run
    verbose=True)
  File "/usr/local/lib/python2.7/dist-packages/pyNeuroML-0.3.2-py2.7.egg/pyneuroml/pynml.py", line 781, in reload_saved_data
    'file %s' % file_name))
OSError: Could not find simulation output file /home/ow/sibernetic/NeuroML2/results/c302_C2_FW.dat
[debug] pName = "main_sim"
[debug] PyPath = ":/home/ow/CElegansNeuroML/CElegans/pythonScripts/c302:/home/ow/sibernetic:/usr/lib/python2.7/:/usr/lib/python2.7/plat-x86_64-linux-gnu:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload"
Python muscle signal generator class: MuscleSimulation loaded!
Killing SignalSimulator!
Python >>  MuscleSimulation does NOT save results
Simulation has reached end of file
Traceback (most recent call last):
  File "master_openworm.py", line 201, in <module>
    outstr = check_output(command, shell=True)
  File "/usr/lib/python2.7/subprocess.py", line 574, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command 'ffmpeg -i /home/ow/shared/output/C2_FW_2018-02-10_17-42-33/C2_FW_2018-02-10_17-42-33.mp4 -vf blackdetect=d=0:pic_th=0.70:pix_th=0.10 -an -f null - 2>&1 | grep blackdetect' returned non-zero exit status 1

@lungd Any ideas? I'm trying to understand why the path to the c302_C2_FW.dat would be any different in this setup versus the linux case...
@balicea are you seeing something different?

I just followed your guide for the windows branch and get the same error, of course as well as OpenGL not recognizing my GPU

@clausagerskov OK at least that is a match. I'm looking into it right now.

As for the GPU, right now OpenCL is not going to work with the GPU; that is a known issue we would like to improve (see here: #262 )

@lungd OK I'm pretty sure that Sibernetic is just crashing, therefore it isn't generating output, therefore it isn't being found:

ow@576343d398e7:~/sibernetic$ ./Release/Sibernetic -f worm -no_g device=CPU
[debug] pName = "main_sim"
[debug] PyPath = ":/home/ow/CElegansNeuroML/CElegans/pythonScripts/c302:/home/ow/sibernetic:/usr/lib/python2.7/:/usr/lib/python2.7/plat-x86_64-linux-gnu:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload"
Python muscle signal generator class: MuscleSimulation loaded!
Configuration was loaded
 CL_PLATFORM_VERSION [0]:       OpenCL 2.1 LINUX
 CL_PLATFORM_VERSION [1]:       OpenCL 1.2
Segmentation fault

Now the question is what to do about it. I love debugging seg faults...

yea i also had some segmentation fault when trying to compile a 64 bit exe for windows.

@skhayrulin @a-palyanov Any idea what we might do here? We are running Sibernetic inside a linux container but on Windows and seeing this. Same linux container on mac / linux runs fine. I've tried rebuilding Sibernetic via make clean; make all but it seems to compile fine and makes no difference to the seg fault :(

@lungd do you know of a low-level opencl test that could be easily installed in the container to check out how opencl is seeing the system?

I've retested the recently added build.cmd and run.cmd in the development branch (https://github.com/openworm/OpenWorm/tree/development) and these work fine for running the simulation & generating the movie. Can some others test?

Works for me on Windows 10 pro! (Using Linux docker containers)

Thanks for testing @clausagerskov