On Sat, 28 Jan 2017, Sven Schreiber wrote:
Am 28.01.2017 um 19:29 schrieb Riccardo (Jack) Lucchetti:
> On Sat, 28 Jan 2017, Allin Cottrell wrote:
>>
>> Slightly less baroque:
>>
>> <hansl>
>> function scalar ompthds(void)
>> scalar ret
>> outfile s --buffer --quiet
>> set omp_num_threads
>> outfile --close
>> sscanf(strstr(s, ",") + 1, "%*s %d", ret)
>> return ret
>> end function
>> </hansl>
>
> Well, I had thought of something like that too, but couldn't be bothered
> to check all the po files if that would be robust to translations, so I
> just assumed the number would come last.
>
Why not have a $set accessor bundle with all the current settings?
Yes, that would be the "right" way. In fact we could revitalise the
$sysinfo bundle to that purpose. Now that I check, there is a much saner
way to do what Marcin needs:
<hansl>
scalar n = $sysinfo.omp_num_threads
</hansl>
:)
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------