<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Roy,
<div class=""><br class="">
</div>
<div class="">what about specifying </div>
<div class=""><br class="">
</div>
<div class="">global ft_default</div>
<div class="">ft_default.trackusage = ’no’; </div>
<div class=""><br class="">
</div>
<div class="">prior to calling ft_defaults?</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">JM</div>
<div class=""><br class="">
</div>
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 27 Mar 2023, at 14:59, Roy Cox <<a href="mailto:roycox.roycox@gmail.com" class="">roycox.roycox@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">hi Jan-Mathijs,
<div class=""><br class="">
</div>
<div class="">I'm not entirely sure if this is the only culprit, but I did identify one likely cause for slow performance on our computing server:</div>
<div class=""><br class="">
</div>
<div class=""><i class="">Warning: could not send tracker information for "startup"
<br class="">
In ft_trackusage at line 155<br class="">
In ft_defaults at line 340</i><br class="">
</div>
<div class=""><i class=""><br class="">
</i></div>
<div class="">In particular, it appears that line 152 is where the code often lingers for a long time (tens of seconds, perhaps minutes), before ultimately returning status=false:</div>
<div class=""><br class="">
</div>
<i class="">[output, status] = ft_urlread(event_http);<br class="">
</i><br class="">
Now, I suppose it <i class="">could </i>be that this is something related to our server's configuration, but we don't really have the expertise to figure that out (plus general internet connectivity appears to be fine).
<div class=""><br class="">
</div>
<div class="">I'm still hoping there's a way to disable these (or similar) calls from FieldTrip?
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class="">Roy</div>
</div>
</div>
<br class="">
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Mar 10, 2023 at 11:47 AM Roy Cox <<a href="mailto:roycox.roycox@gmail.com" target="_blank" class="">roycox.roycox@gmail.com</a>> wrote:<br class="">
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr" class="">hi Jan-Mathijs,
<div class=""><br class="">
</div>
<div class="">Yes, we're using Matlab's parallel computing toolbox, and our computing server provides regular gui-based interactive Matlab (no job scheduling etc). I've generally set up code such that a recording is processed by a "recording-level" function,
taking a custom cfg as input that specifies all kinds of things that happen inside the function (e.g., filepaths, channels to read, flags for rereferencing and filtering, and so on). Then there's a "group-level" script that either uses a regular for loop across
recordings (allowing breakpoints), or a parfor loop with each of however many workers you have taking care of one recording (at the expense of no/few debugging options). As I'm sure you know, there's some tinkering required with declaring variables to accommodate
correct parfor behavior, but once set up it's relatively easy to switch from serial to parallel and back if e.g. recording 37 randomly fails and you need to step through the code.</div>
<div class=""><br class="">
</div>
<div class="">Anyway, I had hoped to avoid the profiling route, also because parallel profiling is yet another thing (mpiprofile), but I can look into it. Are you sure there's no crude way to turn off all FT communication? If that would work, at least I'd know
that my issue is in fact related to FT (and not something more general with Matlab and/or the server configuration).</div>
<div class=""><br class="">
</div>
<div class="">Side note: I'm mostly using SleepTrip, but I see the same behavior when using a recent version of FT.</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class="">Roy</div>
</div>
<br class="">
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Mar 10, 2023 at 8:56 AM Schoffelen, J.M. (Jan Mathijs) via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" target="_blank" class="">fieldtrip@science.ru.nl</a>> wrote:<br class="">
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="">Hoi Roy,
<div class=""><br class="">
</div>
<div class="">The compute server sounds like an interesting use case. Are you using mathworks’ parallel server functionality for this? We have recently started exploring and documenting a bit the possibilities for using matlab’s parallel processing tools in
FieldTrip, in collaboration with Mathworks and <a href="https://urldefense.com/v3/__https://www.vortech.nl__;!!HJOPV4FYYWzcc1jazlU!-ld--Q_DRiwfhl22L94A2cbFEL4iDJa8LCyV2Ls36yIpVS1PQUwCeJr2qhHPVca3kmUF9i5SbYThi2-qSoZrd5IhA5p_cPqJGO001A$" target="_blank" class="">Vortech</a> .
Please see <a href="https://urldefense.com/v3/__https://www.fieldtriptoolbox.org/tutorial/distributedcomputing_parfor/__;!!HJOPV4FYYWzcc1jazlU!-ld--Q_DRiwfhl22L94A2cbFEL4iDJa8LCyV2Ls36yIpVS1PQUwCeJr2qhHPVca3kmUF9i5SbYThi2-qSoZrd5IhA5p_cPp0n-bR4w$" target="_blank" class="">https://www.fieldtriptoolbox.org/tutorial/distributedcomputing_parfor/</a> for
some initial documentation. We would be very happy to receive insights/use cases/best practices/tips ’n tricks from the FieldTrip users, to be documented on the website as well.</div>
<div class=""><br class="">
</div>
<div class="">Now, regarding to your question, I don’t have a pasklaar answer, but I would start with profiling the execution of the slow functions: this will give you an indication which lines take most time to execute, so that you can tweak (if possible)
the ‘overhead’-options. Typing ‘help profile’ and ‘help profview’ should get you started.</div>
<div class=""><br class="">
</div>
<div class="">Met groet,</div>
<div class="">Jan-Mathijs</div>
<div class=""> <br class="">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On 9 Mar 2023, at 15:07, Roy Cox via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" target="_blank" class="">fieldtrip@science.ru.nl</a>> wrote:</div>
<br class="">
<div class="">
<div dir="ltr" class="">hello all,
<div class=""><br class="">
</div>
<div class="">We recently started batching EEG analyses, involving FieldTrip code, on a computing server (essentially a big Windows workstation).</div>
<div class=""><br class="">
</div>
<div class="">Mostly great, but I've noticed that there are sometimes lengthy delays (tens of seconds) when executing a FieldTrip command.</div>
<div class=""><br class="">
</div>
<div class="">Possibly related, I sometimes see warnings like these:<br class="">
<br class="">
<i class="">Warning: could not send tracker information for "startup"</i><br class="">
</div>
<div class=""><i class=""><br class="">
</i></div>
<div class="">It's all very poorly reproducible: the exact same script operating on the same recording sometimes runs fast and sometimes takes forever.</div>
<div class=""><br class="">
</div>
<div class="">One reason I can think of is that this has something to do with FieldTrip trying to send some information to its developers for tracking purposes, but perhaps this isn't suitable for a computing server running many jobs in parallel.</div>
<div class=""><br class="">
</div>
<div class="">Supposing that's indeed the issue: is there a way to disable any and all communication attempts by FieldTrip to the outside world? I looked at ft_defaults but not sure which options to choose.</div>
<div class=""><br class="">
</div>
<div class="">And any other suggestions as to what might be going on are welcome of course.</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class="">Roy</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
<a href="https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!64qKXsw6Gxwuj46geg5MTQV45TvFoLrpT77shzu8cOjjweyBCX-RYZ8FTM2DU9huMl1gG6E2Qmgp8XH-87zpgqpQhd8kZWkKZJBnNw$" target="_blank" class="">https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!64qKXsw6Gxwuj46geg5MTQV45TvFoLrpT77shzu8cOjjweyBCX-RYZ8FTM2DU9huMl1gG6E2Qmgp8XH-87zpgqpQhd8kZWkKZJBnNw$</a>
<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
<a href="https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!7BfUJYzStpbxt3DmAwGTeNIqOfsgHyc0ut2EzQqRHpFC3reTB8CzqHsVFN4Xtrkl97KLaKD5WIezSpA-R0Z5tUWjhJJrpLLqny_4kg$" rel="noreferrer" target="_blank" class="">https://doi.org/10.1371/journal.pcbi.1002202</a><br class="">
</blockquote>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>