Am 10.08.2021 um 18:56 schrieb Allin Cottrell:
On Tue, 10 Aug 2021, Sven Schreiber wrote:
> with a fairly recent snapshot (July) I'm noticing that an MPI block is
> failing if I replace a "funcerr" command line (and if-block) with an
> equivalent errorif() call.
It works if you respect the documented stipulation that errorif() can
only be called within a function.
OK, my example was stupid in that respect. (Although interesting that
"funcerr" still worked.)
But in fact, my original problem _did_ occur within a function. Only the
nesting order was reversed: The MPI block itself was inside the
function. Like this:
function ... main...
mpi
errorif(...)
end mpi
end function
So what's the recommended solution? Wrap the errorif call in another
function, like this?:
function ... errorcall...
errorif()
end function
function ... main ...
mpi --send-functions
errorcall()
end mpi
end function
Although obviously, the extra function wrap would defeat the purpose of
the concise errorif() idiom then.
thanks
sven