Re: [PATCH] ob-C.el compile-only header argument, was Re: How to use mpirun with C or C++ Org-babel?

2024-01-05 Thread Ihor Radchenko
Leo Butler writes: >> #+begin_src C :compile-only t :file foo :includes "stdio.h" >> printf("This is test"); >> #+end_src > > It should be "yes" not "t". I tested with :compile-only yes, but it did not change the observed issue. >> , executing should yield file link, even though it is not expli

Re: [PATCH] ob-C.el compile-only header argument, was Re: How to use mpirun with C or C++ Org-babel?

2024-01-04 Thread Leo Butler
On Fri, Dec 22 2023, Ihor Radchenko wrote: > Leo Butler writes: > >>> What will happen if we have something like :results value or :results >>> output instead of :results file link? >> >> Originally, I felt that only ":results file" makes sense. I have adopted >> your suggestion, though, and add

Re: [PATCH] ob-C.el compile-only header argument, was Re: How to use mpirun with C or C++ Org-babel?

2023-12-22 Thread Ihor Radchenko
Leo Butler writes: >> What will happen if we have something like :results value or :results >> output instead of :results file link? > > Originally, I felt that only ":results file" makes sense. I have adopted > your suggestion, though, and added test cases so that the compiler > stderr output is

Re: How to use mpirun with C or C++ Org-babel?

2023-12-20 Thread Leo Butler
On Thu, Dec 14 2023, Ihor Radchenko wrote: > Leo Butler writes: > >> From 7d8e406bc4a92e2e2eab772b2671dcd72ca8c202 Mon Sep 17 00:00:00 2001 >> From: Leo Butler >> Date: Tue, 12 Dec 2023 12:32:41 -0600 >> Subject: [PATCH] lisp/ob-C.el: add :compile-only header to compile to a named >> target >

[PATCH] ob-C.el compile-only header argument, was Re: How to use mpirun with C or C++ Org-babel?

2023-12-19 Thread Leo Butler
On Thu, Dec 14 2023, Ihor Radchenko wrote: > Leo Butler writes: > >> From 7d8e406bc4a92e2e2eab772b2671dcd72ca8c202 Mon Sep 17 00:00:00 2001 >> From: Leo Butler >> Date: Tue, 12 Dec 2023 12:32:41 -0600 >> Subject: [PATCH] lisp/ob-C.el: add :compile-only header to compile to a named >> target >

Re: How to use mpirun with C or C++ Org-babel?

2023-12-14 Thread Ihor Radchenko
Leo Butler writes: > From 7d8e406bc4a92e2e2eab772b2671dcd72ca8c202 Mon Sep 17 00:00:00 2001 > From: Leo Butler > Date: Tue, 12 Dec 2023 12:32:41 -0600 > Subject: [PATCH] lisp/ob-C.el: add :compile-only header to compile to a named > target Thanks for the patch! > * lisp/ob-C.el (org-babel-C-e

Re: How to use mpirun with C or C++ Org-babel?

2023-12-13 Thread Leo Butler
On Fri, Dec 08 2023, Ihor Radchenko wrote: > Leo Butler writes: > >> I submitted an imperfect patch some time ago [1] that targeted your use >> case: allow ob-C.el to create a named binary. > Note that I did not oppose the above behaviour when the result of > evaluation is just compiling to :fi

Re: How to use mpirun with C or C++ Org-babel?

2023-12-08 Thread Ihor Radchenko
Leo Butler writes: > I submitted an imperfect patch some time ago [1] that targeted your use > case: allow ob-C.el to create a named binary. Unfortunately, Ihor > dropped the issue due to lack of interest from other users. > > My goal was to enable something like this to work: > > #+begin_src cpp

Re: How to use mpirun with C or C++ Org-babel?

2023-12-08 Thread Leo Butler
On Fri, Dec 08 2023, tbanelwebmin wrote: > Caution: This message was sent from outside the University of Manitoba. > > On 23-12-08 00:10, Edgar Lux wrote: > > Hello, I found [1][2] that it is possible to change the compiler for C > and C++ > source blocks. I would like to know if there i

Re: How to use mpirun with C or C++ Org-babel?

2023-12-08 Thread tbanelwebmin
On 23-12-08 00:10, Edgar Lux wrote: Hello, I found [1][2] that it is possible to change the compiler for C and C++ source blocks. I would like to know if there is a way to add =mpirun -np 2= (where 2 can be any other number) to run the resulting executabl