Skip to content
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

WIP: Registering finalizers through Gc.finalise #13

Draft
wants to merge 1 commit into
base: 6.5.0-dev
Choose a base branch
from

Conversation

catvayor
Copy link

@catvayor catvayor commented Jul 5, 2024

Il y a deux finalizers qui n'existe pas dans ma configuration :

  • finalize_profiler
  • finalize_logger

Je sais pas si on peut faire du préprocessing OCaml comme actuellement fait pour c, mais une opération de se type pourrait être intéressante. Aussi, j'ignore pourquoi mais mon make -C examples perf.opt.log GC_EACH_REP=1 échoue avec l'erreur la fin de log :

../../../examples/utils/perf -m cvsFoodWeb_ASAi_kry.reps 3 ./cvsFoodWeb_ASAi_kry.opt | tee cvsFoodWeb_ASAi_kry.opt.time
# NUM_REPS=2
2.36
2.38
Fatal error: exception Failure("Command NUM_REPS=2 time -f %e -o /run/user/1000/sundials-perf.3a4801.tmp ./cvsFoodWeb_ASAi_kry.opt exited with nonzero status 139")
../../../examples/utils/perf -m cvsFoodWeb_ASAi_kry.reps 3 ./cvsFoodWeb_ASAi_kry.sundials | tee cvsFoodWeb_ASAi_kry.sundials.time
# NUM_REPS=2
1.12
^Cmake[1]: *** Deleting file 'cvsFoodWeb_ASAi_kry.sundials.time'
make[1]: *** [../../examples.mk:480: cvsFoodWeb_ASAi_kry.sundials.time] Interrupt
make: [Makefile:92: cvodes/serial/perf.opt.log] Interrupt (ignored)

Certain tests passe, nottament un qui était bloquant avant

Il faut aussi faire du rangement sur où on déclare les finalizers

@catvayor catvayor marked this pull request as draft July 5, 2024 16:03
@catvayor
Copy link
Author

catvayor commented Jul 8, 2024

Forward integration
==2972528== Invalid read of size 8
==2972528==    at 0x5595F5: do_some_marking (in /home/catvayor/Documents/programme/ens/stage/m2-vacances/sundialsml/examples/cvodes/serial/cvsFoodWeb_ASAi_kry.opt)
==2972528==    by 0x5598BB: mark (in /home/catvayor/Documents/programme/ens/stage/m2-vacances/sundialsml/examples/cvodes/serial/cvsFoodWeb_ASAi_kry.opt)
==2972528==    by 0x559E6E: major_collection_slice (in /home/catvayor/Documents/programme/ens/stage/m2-vacances/sundialsml/examples/cvodes/serial/cvsFoodWeb_ASAi_kry.opt)
==2972528==    by 0x55A87D: caml_major_collection_slice (in /home/catvayor/Documents/programme/ens/stage/m2-vacances/sundialsml/examples/cvodes/serial/cvsFoodWeb_ASAi_kry.opt)
==2972528==    by 0x549BA2: caml_poll_gc_work (in /home/catvayor/Documents/programme/ens/stage/m2-vacances/sundialsml/examples/cvodes/serial/cvsFoodWeb_ASAi_kry.opt)
==2972528==    by 0x561CAF: caml_do_pending_actions_exn (in /home/catvayor/Documents/programme/ens/stage/m2-vacances/sundialsml/examples/cvodes/serial/cvsFoodWeb_ASAi_kry.opt)
==2972528==    by 0x55DD54: caml_alloc_small_dispatch (in /home/catvayor/Documents/programme/ens/stage/m2-vacances/sundialsml/examples/cvodes/serial/cvsFoodWeb_ASAi_kry.opt)
==2972528==    by 0x56861A: caml_call_gc (in /home/catvayor/Documents/programme/ens/stage/m2-vacances/sundialsml/examples/cvodes/serial/cvsFoodWeb_ASAi_kry.opt)
==2972528==    by 0x4E7D3CF: ???
==2972528==    by 0x4E8527F: ???
==2972528==    by 0x1FFEFFB4DF: ???
==2972528==    by 0x3EA4DA67821CFD28: ???
==2972528==  Address 0x15df8d70 is 0 bytes inside a block of size 16 free'd
==2972528==    at 0x48479F4: free (in /nix/store/qmbyky2jry60srsqcs0rw4gynjpi15xw-valgrind-3.23.0/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==2972528==    by 0x538106: sunml_cvodes_adj_bsession_finalize (in /home/catvayor/Documents/programme/ens/stage/m2-vacances/sundialsml/examples/cvodes/serial/cvsFoodWeb_ASAi_kry.opt)
==2972528==    by 0x568746: caml_c_call (in /home/catvayor/Documents/programme/ens/stage/m2-vacances/sundialsml/examples/cvodes/serial/cvsFoodWeb_ASAi_kry.opt)
==2972528==    by 0x4E7D3CF: ???
==2972528==    by 0x4E8530F: ???
==2972528==    by 0x1FFEFFB4DF: ???
==2972528==  Block was alloc'd at
==2972528==    at 0x484477B: malloc (in /nix/store/qmbyky2jry60srsqcs0rw4gynjpi15xw-valgrind-3.23.0/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==2972528==    by 0x501E72: sunml_sundials_malloc_value (in /home/catvayor/Documents/programme/ens/stage/m2-vacances/sundialsml/examples/cvodes/serial/cvsFoodWeb_ASAi_kry.opt)
==2972528==    by 0x534619: sunml_cvodes_adj_init_backward (in /home/catvayor/Documents/programme/ens/stage/m2-vacances/sundialsml/examples/cvodes/serial/cvsFoodWeb_ASAi_kry.opt)
==2972528==    by 0x568746: caml_c_call (in /home/catvayor/Documents/programme/ens/stage/m2-vacances/sundialsml/examples/cvodes/serial/cvsFoodWeb_ASAi_kry.opt)
==2972528==    by 0x4E7D3CF: ???
==2972528==    by 0x4E852D7: ???
==2972528==

@catvayor
Copy link
Author

catvayor commented Jul 8, 2024

sundialsml/examples/idas/serial/idasRoberts_ASAi_klu.opt

a l'air de bien reproduire

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant