emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Ihor Radchenko
Subject: Re: How to use mpirun with C or C++ Org-babel?
Date: Fri, 08 Dec 2023 22:24:45 +0000

Leo Butler <Leo.Butler@umanitoba.ca> 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 :includes <iostream> :results none :file ./hello-world
> std::cout << "Hello World!\n";
> #+end_src
>
> #+begin_src bash :async t
> mpirun -np 4 ./hello-world
> #+end_src
>
> As I said, the patch I wrote was not perfect, but I am happy to re-visit
> the issue. The ability to create named binaries would significantly
> increase the usability of ob-C for projects where you want to compile
> the source once and run the binary repeatedly for potentially long
> periods of time.

Note that I did not oppose the above behaviour when the result of
evaluation is just compiling to :file. The problem was with compiling to
a :file and _also_ executing it.

If you want to propose a patch that will allow compile-only, I see no
problem at all.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]