<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 15:59:02 JST 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>PFS-JIRA</title>
    <link>https://pfspipe.ipmu.jp/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.3.4</version>
        <build-number>803005</build-number>
        <build-date>13-09-2019</build-date>
    </build-info>


<item>
            <title>[PIPE2D-862] Make pipeline compatible with MKL libraries </title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-862</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;The 2d psf generating code is considerable slower when running under LSST imports, when compared to when being run with same libraries outside LSST environment. Testing reveals that to generate a 20x20 images in focus,&#160; same code under LSST env takes around 1.3 seconds, and around 0.85 seconds outside LSST enviroment.&lt;/p&gt;

&lt;p&gt;Profliing is in support of my suspicion and previous result that the main slowdown is due to slower FFT calculations. Profiling results are attached as ``LSST_package&apos;&apos; and ``my_package&apos;&apos;. They are complex to read, but careful comparison shows that that FFT calculations take larger fraction of time under LSST enviroment. This is almost certainly due to the fact that LSST env does not support MKL. During Monday meeting, it has benn clarified that this is due to legacy support which is not needed any more, and it should be relatively easy and painfree to turn MKL support back on.&lt;/p&gt;</description>
                <environment></environment>
        <key id="16903">PIPE2D-862</key>
            <summary>Make pipeline compatible with MKL libraries </summary>
                <type id="3" iconUrl="https://pfspipe.ipmu.jp/jira/secure/viewavatar?size=xsmall&amp;avatarId=10518&amp;avatarType=issuetype">Task</type>
                                            <priority id="10000" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/priorities/medium.svg">Normal</priority>
                        <status id="10002" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/statuses/generic.png" description="The issue is resolved, reviewed, and merged">Done</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="price">price</assignee>
                                    <reporter username="ncaplar">ncaplar</reporter>
                        <labels>
                    </labels>
                <created>Tue, 22 Jun 2021 18:23:47 +0000</created>
                <updated>Fri, 28 Jan 2022 17:16:27 +0000</updated>
                            <resolved>Tue, 29 Jun 2021 19:47:26 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                <comments>
                            <comment id="21555" author="rhl" created="Tue, 22 Jun 2021 19:15:11 +0000"  >&lt;p&gt;&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=price&quot; class=&quot;user-hover&quot; rel=&quot;price&quot;&gt;price&lt;/a&gt; when you get back next week, what would it take to provide a version of numpy with MKL if we ignore the sincPhotometry problems?   I bet we could fix that if needs be, but I don&apos;t expect to need to run that algorithm in PFS.&lt;/p&gt;</comment>
                            <comment id="21577" author="price" created="Mon, 28 Jun 2021 17:09:12 +0000"  >&lt;p&gt;&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=ncaplar&quot; class=&quot;user-hover&quot; rel=&quot;ncaplar&quot;&gt;ncaplar&lt;/a&gt;, could you please provide a test script that I can run that will time the operations you&apos;re interested in? Then I can run that script with and without the changes I&apos;m thinking of to see if they are effective.&lt;/p&gt;</comment>
                            <comment id="21578" author="ncaplar" created="Mon, 28 Jun 2021 17:11:25 +0000"  >&lt;p&gt;Yes, of course. Give me a bit of time.&#160;&lt;/p&gt;</comment>
                            <comment id="21583" author="ncaplar" created="Mon, 28 Jun 2021 19:11:56 +0000"  >&lt;p&gt;I have placed the smallest script at&#160;/tigress/ncaplar/Images/&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-862&quot; title=&quot;Make pipeline compatible with MKL libraries &quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-862&quot;&gt;&lt;del&gt;PIPE2D-862&lt;/del&gt;&lt;/a&gt;, called test.py. It import a single array in and runs fft on it, with imports scipy.fftpack. Is that what you had in mind? (I also placed a single image showing that the code execute faster in ``my environment&apos;&apos;, and slower in LSST env)&lt;/p&gt;</comment>
                            <comment id="21608" author="price" created="Tue, 29 Jun 2021 17:32:10 +0000"  >&lt;p&gt;Activating MKL in a Docker container on my MacBook resulted in about a 2x speedup for the FFT operation:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
       10    0.000    0.000    2.217    0.222 /opt/pfs/python/miniconda3-4.5.12/envs/lsst-scipipe-1172c30/lib/python3.7/site-packages/scipy/fftpack/basic.py:370(fft2)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;vs:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
       10    0.000    0.000    5.029    0.503 /opt/pfs/python/miniconda3-4.5.12/envs/lsst-scipipe-1172c30/lib/python3.7/site-packages/scipy/fftpack/basic.py:673(fft2)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I&apos;ll update our install scripts and do a bit more testing to be sure this doesn&apos;t break anything else.&lt;/p&gt;</comment>
                            <comment id="21610" author="price" created="Tue, 29 Jun 2021 19:17:42 +0000"  >&lt;p&gt;Integration test passed, I think we can deploy this.&lt;/p&gt;</comment>
                            <comment id="21611" author="ncaplar" created="Tue, 29 Jun 2021 19:19:22 +0000"  >&lt;p&gt;Did you also perhaps test the execution times with the test code I have provided?&lt;/p&gt;</comment>
                            <comment id="21612" author="hassan" created="Tue, 29 Jun 2021 19:20:06 +0000"  >&lt;p&gt;Changes made approved. But check comment from Neven above.&lt;/p&gt;</comment>
                            <comment id="21613" author="price" created="Tue, 29 Jun 2021 19:20:48 +0000"  >&lt;p&gt;Yes, same result as before.&lt;/p&gt;</comment>
                            <comment id="21614" author="ncaplar" created="Tue, 29 Jun 2021 19:22:55 +0000"  >&lt;p&gt;I meant regarding the timing, did you also get a speed up making it comparable to non-LSST code? (I can see that for myself once when deployed)&lt;/p&gt;</comment>
                            <comment id="21615" author="price" created="Tue, 29 Jun 2021 19:23:54 +0000"  >&lt;p&gt;Yes, I got the same timing results as before.&lt;/p&gt;</comment>
                            <comment id="21616" author="ncaplar" created="Tue, 29 Jun 2021 19:26:00 +0000"  >&lt;p&gt;Hm, so no speed up when using MKL libraries within LSST code with test.py? Am I understanding this correctly?&lt;/p&gt;</comment>
                            <comment id="21617" author="price" created="Tue, 29 Jun 2021 19:28:26 +0000"  >&lt;blockquote&gt;
&lt;p&gt;about a 2x speedup for the FFT operation&lt;/p&gt;&lt;/blockquote&gt;</comment>
                            <comment id="21618" author="ncaplar" created="Tue, 29 Jun 2021 19:30:19 +0000"  >&lt;p&gt;Ok, I understand. I thought that ``same result as before&apos;&apos; was to be interpreted&#160; as ``same result as before the changes&apos;&apos;, and I was super confused.&#160;&lt;/p&gt;</comment>
                            <comment id="21619" author="price" created="Tue, 29 Jun 2021 19:30:28 +0000"  >&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
(lsst-scipipe) pprice@tiger2-sumire:/tigress/ncaplar/Images/PIPE2D-862 $ time python test.py 
test ended

    Time spent in user mode   : 0.582 sec
    Time spent in kernel mode : 0.235 sec
    Total time                : 0.820 sec
    CPU utilisation           : 99.60%
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="21620" author="price" created="Tue, 29 Jun 2021 19:47:26 +0000"  >&lt;p&gt;Merged and deployed.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="13935" name="LSST_package.pdf" size="925054" author="ncaplar" created="Tue, 22 Jun 2021 18:20:52 +0000"/>
                            <attachment id="13934" name="my_package.pdf" size="1075607" author="ncaplar" created="Tue, 22 Jun 2021 18:21:05 +0000"/>
                            <attachment id="13939" name="Screen Shot 2021-06-28 at 3.05.21 PM.png" size="143195" author="ncaplar" created="Mon, 28 Jun 2021 19:09:32 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10500" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|02qpq3:r2o</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10100" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                        <customfieldname>Reviewers</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>hassan</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>