-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make new dmtcp hets-hollight-tools images for utopic #1402
Comments
I was not able yet to get this hol-light working using ocaml version 4.01.0 |
The version of hol-light we are currently using does not work with the newer ocaml version. We will probably have to move to a newer version of hol-light. |
Test wrt. hets-lib/HolLight/example_binom.hol :
On Solaris 11 I use 2.20+, i.e. https://github.com/jrh13/hol-light from 20151025 aka latest
|
At first glance it seems to be the same hol-light version we have used previously (the source file hol.ml states ´let hol_version = "2.20++";´" which is the same as in http://www.cl.cam.ac.uk/~jrh13/hol-light/hol_light_100110.tgz Before digging deeper I will however try if can get the old build process (https://github.com/spechub/Hets/blob/master/HolLight/OcamlTools/Makefile) to work on a recent version of Ubuntu. |
Ok - So the problem is not with binom.ml but with the way hol-light was called. Instead of passing binom.ml as an argument the following needs to be entered at the prompt which appears a while after calling
which yields
I'll try to update the build-process to use the installed hol-light and a packaged version of dmtcp. |
Branch 1402_hol_light_package should fix this issue. Package has been successfully built on trusty and wily (I'll upload the package for utopic and vivid in a couple minutes) and tested on trusty with the ppa build of Hets. Update: No package for utopic since this version of Ubuntu 'obsolete' and is thus rejected by Launchpad. |
I've just tried it under vivid and got:
and a "mtcp_restart crash with SIGSEGV" Ubuntu splash screen. |
Weird. I'll have to investigate that ...
|
64bit |
Hmmm, I don't know dmtcp very well/how good it is, but I think it is pretty dangerous, to save the process image on one machine and execute it on another, which is possibly wrt. HW/exec env. not the same (e.g. instruction set differs even between x86 based CPUs, 32 vs. 64bit, etc.). IMHO the only safe way would be, that hets runs at least once the full thing and optionally stores it (if dmtcp is available), and next time if it finds its "precompiled version" (which matches the running hets version) it may use it, otherwise business as usually, i.e. full compilation+run. Another advantage: the repo doesn't get bloated with 32+MB each time when new images are not created in advance ;-) |
While we haven't had any such issues yet this might be due to a lack of use. While reading through the documentation I came up with the following info: http://dmtcp.sourceforge.net/FAQ.html#migrate - So basically libraries / binaries not compiled in a way such that they can be executed on the target machine are likely to cause problems. We however only use binaries / libraries distributed with Ubuntu so I see no obvious issues here. Looking at https://realworldocaml.org/v1/en/html/the-compiler-backend-byte-code-and-native-code.html it seems that ocamlrun only generates intermediary code to be executed by a virtual machine so the underlying use of ocaml does not raise any obvious flags either. I'll get myself setup with a vivid VM and will check if I encounter the same issue (and try to figure out why worked on trusty as opposed to vivid). As another solution I am open to building the Image on demand. This takes however a significant amount of time so we'd have to figure out at what point in the install-process this should happen. |
As said, not sure about libraries/binaries, but i think that ocaml "compiles" stuff as well, and thus may use e.g. avx registers because they are available on this machine, but can't use it on another, because it doesn't have avx ... Anyway, dmtcp may take care of it ... AFAIU byte-code vs. native code isn't the point here. dmtcp takes a "RAM-copy" of the running ocaml interpreter (the executable in RAM) including its current state (i.e. stacks and bound libs, and a whole bunch of other stuff). Perhaps swapping it out to disk might be something, which comes close to this ... But yes, perhaps pasting 'needs ...;;' at the end of a hol.ml copy, compile and running the produced exe might still be faster than echo 'needs "...";;' | hol-light Image on demand: not during install, I meant lazy instantiation, i.e. create it at runtime when it is needed (similar like you would use a cache - which would be here a folder on the disk). |
Yes - But stack is just a convention so if libs don't change it should be ok. And it seems ocamlrun does not compile. Nonetheless I will investigate if I encounter the same issue. For some reason my download of Ubuntu is unbearably slow so I'll like test it tomorrow |
But if you want we can move to lazy instantiation. |
I have encountered the same behaviour as @cmaeder so it is probably a general problem. I'll try to figure out what is wrong. |
On Wily I encountered the same problem. Comparing the dmtcp version it seems the package made a large jump from trusty (1.2.5) to vivid (2.3.1). Weirdly building locally using the makefile results in a usable image so the tool-chain seems to be ok. I still think it would be worthwile to test if the older dmtcp fixes this issue. |
the new https://launchpad.net/~hets/+archive/ubuntu/hets/+files/hets-hollight-tools_20131026-2ubuntu2%7Evivid_amd64.deb still fails with the same message (but without Ubuntu SIGSEGV) |
Yepp, so lazy inst. is probably the safe way to go for now. However, IMHO a SW designer/admin would still put this on the "solving the wrong problem" list. Usually an application knows its state/what has been calculated/results and thus should be able to serialize this data to a persistent store and just read it, when needed... This would be IMHO much much more efficient, reliable and possibly x-platform compatible than bothering with "RAM-snapshots". Unfortunately ocaml seems not to provide any serialization support out of the box, so probably too much work ??? :( |
True. That would be the best approach (and the one I would have chosen had I designed HOLLight). I only used dmtcp because it was suggested as a way to speed up HOLLight. The "official" way is to let hol recalculate all the basic proofs all the time which is very slow. I do not know enough about HOL / Ocaml to be sure how much effort such a fundamental change would take. |
To implement the lazy approach we'd have to coordinate the change with a new hets release since the use of dmtcp is hardwired in hets. @cmaeder |
it used to work in the past when the snapshot image was made with the same version of dmtcp that later runs it. |
Just talked with Till. Since I also don't know Ocaml/HOL good enough to implement serialization, he agrees, that we should go for lazy inst.. IMHO it is the best to decouple it from hets by just invoking a script with corresponding params, which in turn does all the magic needed, so one is able to change it (e.g. if other options pop up) without the need to re-compile hets (also testing might be easier). However, doing it completely within hets is also an alternative/shouldn't be a big problem (but unfortunately my haskell-fu is very limited, so can't help much in this case than). |
It will be easiest to stick with the current makefile. I'll implement the On 11 December 2015 at 16:27, jelmd notifications@github.com wrote:
|
No description provided.
The text was updated successfully, but these errors were encountered: