From a0b5a519dcf5b89193f7e0733358c442d54e8792 Mon Sep 17 00:00:00 2001 From: Ivan Raikov Date: Sat, 29 Aug 2015 11:34:13 -0700 Subject: [PATCH] updated use for C_values and C_do_apply for compatibility with Chicken argvector (4.10.1+) --- collcomm.scm | 2 +- comm.scm | 2 +- group.scm | 2 +- init.scm | 7 ++++++- mpi.release-info | 1 + mpi.scm | 2 +- mpi.setup | 2 +- msgs.scm | 9 +++++++-- tests/mandel.scm | 2 +- tests/mpitest.scm | 2 +- 10 files changed, 21 insertions(+), 10 deletions(-) diff --git a/collcomm.scm b/collcomm.scm index 943a3cc..ebb498e 100644 --- a/collcomm.scm +++ b/collcomm.scm @@ -3,7 +3,7 @@ ;; Chicken MPI interface. Based on the Caml/MPI interface by Xavier ;; Leroy. ;; -;; Copyright 2007-2012 Ivan Raikov and the Okinawa Institute of Science and Technology +;; Copyright 2007-2015 Ivan Raikov. ;; ;; This program is free software: you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as diff --git a/comm.scm b/comm.scm index 783b6dc..85befaf 100644 --- a/comm.scm +++ b/comm.scm @@ -3,7 +3,7 @@ ;; Chicken MPI interface. Based on the Caml/MPI interface by Xavier ;; Leroy. ;; -;; Copyright 2007-2012 Ivan Raikov and the Okinawa Institute of Science and Technology +;; Copyright 2007-2015 Ivan Raikov. ;; ;; This program is free software: you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as diff --git a/group.scm b/group.scm index 1de5fa2..c015927 100644 --- a/group.scm +++ b/group.scm @@ -3,7 +3,7 @@ ;; Chicken MPI interface. Based on the Caml/MPI interface by Xavier ;; Leroy. ;; -;; Copyright 2007-2012 Ivan Raikov and the Okinawa Institute of Science and Technology +;; Copyright 2007-2015 Ivan Raikov. ;; ;; This program is free software: you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as diff --git a/init.scm b/init.scm index 245f55b..f87289c 100644 --- a/init.scm +++ b/init.scm @@ -2,7 +2,7 @@ ;; Chicken MPI interface. Based on the Caml/MPI interface by Xavier ;; Leroy. ;; -;; Copyright 2007-2012 Ivan Raikov and the Okinawa Institute of Science and Technology +;; Copyright 2007-2015 Ivan Raikov. ;; ;; This program is free software: you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as @@ -44,8 +44,13 @@ static void chicken_ThrowException(C_word value) if (C_immediatep(abort)) Chicken_Panic(C_text("`##sys#abort' is not defined")); +#if defined(C_BINARY_VERSION) && (C_BINARY_VERSION >= 8) + C_word rval[3] = { abort, C_SCHEME_UNDEFINED, value }; + C_do_apply(3, rval); +#else C_save(value); C_do_apply(1, abort, C_SCHEME_UNDEFINED); +#endif } void chicken_MPI_exception (int code, int msglen, const char *msg) diff --git a/mpi.release-info b/mpi.release-info index b3400dd..f535eea 100644 --- a/mpi.release-info +++ b/mpi.release-info @@ -3,5 +3,6 @@ (uri targz "https://github.com/iraikov/chicken-mpi/tarball/{egg-release}") (uri files-list "http://code.call-cc.org/files-list?egg={egg-name};release={egg-release}" old-uri) +(release "1.16") (release "1.15" old-uri) diff --git a/mpi.scm b/mpi.scm index 8f44fe6..f3872dc 100644 --- a/mpi.scm +++ b/mpi.scm @@ -4,7 +4,7 @@ ;; Leroy. ;; ;; -;; Copyright 2007-2012 Ivan Raikov and the Okinawa Institute of Science and Technology. +;; Copyright 2007-2015 Ivan Raikov. ;; ;; This program is free software: you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as diff --git a/mpi.setup b/mpi.setup index 715ee70..eb18c99 100644 --- a/mpi.setup +++ b/mpi.setup @@ -47,6 +47,6 @@ `(,(dynld-name "mpi") ,(dynld-name "mpi.import") ) ; Assoc list with properties for your extension: - `((version 1.15) + `((version 1.16) )) diff --git a/msgs.scm b/msgs.scm index 70d1112..e2e380f 100644 --- a/msgs.scm +++ b/msgs.scm @@ -3,7 +3,7 @@ ;; Chicken MPI interface. Based on the Caml/MPI interface by Xavier ;; Leroy. ;; -;; Copyright 2007-2012 Ivan Raikov and the Okinawa Institute of Science and Technology +;; Copyright 2007-2015 Ivan Raikov. ;; ;; This program is free software: you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as @@ -301,7 +301,12 @@ C_word MPI_send_bytevector (C_word data, C_word dest, C_word tag, C_word comm) ptr = C_alloc (C_SIZEOF_FLONUM); status_tag = C_int_to_num (&ptr, status.MPI_TAG); - C_values(5, C_SCHEME_UNDEFINED, C_k, status_count, status_source, status_tag); +#if defined(C_BINARY_VERSION) && (C_BINARY_VERSION >= 8) + C_word rval[5] = { C_SCHEME_UNDEFINED, C_k, status_count, status_source, status_tag }; + C_values(5, rval); +#else + C_values(5, C_SCHEME_UNDEFINED, C_k, status_count, status_source, status_tag ); +#endif EOF )) diff --git a/tests/mandel.scm b/tests/mandel.scm index 466c7c2..a7844b1 100644 --- a/tests/mandel.scm +++ b/tests/mandel.scm @@ -4,7 +4,7 @@ ;; ;; Based on the Caml/MPI interface by Xavier Leroy. ;; -;; Copyright 2007 Ivan Raikov and the Okinawa Institute of Science and Technology +;; Copyright 2007 Ivan Raikov ;; ;; This program is free software: you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as diff --git a/tests/mpitest.scm b/tests/mpitest.scm index 494713a..d774b70 100644 --- a/tests/mpitest.scm +++ b/tests/mpitest.scm @@ -4,7 +4,7 @@ ;; ;; Based on the Caml/MPI interface by Xavier Leroy. ;; -;; Copyright 2007-2012 Ivan Raikov and the Okinawa Institute of Science and Technology +;; Copyright 2007-2015 Ivan Raikov. ;; ;; This program is free software: you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as