<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div> Thank you. I have added this in MR <a href="https://gitlab.com/petsc/petsc/-/merge_requests/3443" class="">https://gitlab.com/petsc/petsc/-/merge_requests/3443</a><div class=""><br class=""></div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 11, 2020, at 5:19 PM, Kaustubh Khedkar <<a href="mailto:kkhedkar9879@sdsu.edu" class="">kkhedkar9879@sdsu.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">To activate Matlab on head node which does not have access to the internet. (see also:<span class="Apple-converted-space"> </span><span style="color: rgb(2, 167, 255);" class=""><a href="https://www.mathworks.com/matlabcentral/answers/259627-how-do-i-activate-matlab-or-other-mathworks-products-without-an-internet-connection" style="color: blue; text-decoration: underline;" class="">https://www.mathworks.com/matlabcentral/answers/259627-how-do-i-activate-matlab-or-other-mathworks-products-without-an-internet-connection</a></span>)<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><ol start="1" type="1" style="margin-bottom: 0in; margin-top: 0in;" class=""><li class="MsoListParagraph" style="margin: 0in 0in 0in -9pt; font-size: 11pt; font-family: Calibri, sans-serif;">First ssh into the head node using the command: <span class="Apple-converted-space"> </span><span style="color: red;" class="">ssh node_name</span><o:p class=""></o:p></li><li class="MsoListParagraph" style="margin: 0in 0in 0in -9pt; font-size: 11pt; font-family: Calibri, sans-serif;">Obtain the Host Id using the command: <span class="Apple-converted-space"> </span><span style="color: red;" class="">ip addr | grep ether <span class="Apple-converted-space"> </span></span>(More details found on: <span class="Apple-converted-space"> </span><span style="color: rgb(0, 176, 240);" class=""><a href="http://www.mathworks.com/matlabcentral/answers/101892" target="_blank" style="color: blue; text-decoration: underline;" class=""><span class="textwrapper"><span style="color: rgb(0, 176, 240);" class="">http://www.mathworks.com/matlabcentral/answers/101892</span></span></a></span>)<o:p class=""></o:p></li></ol><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">You will see something like this: link/ether xx:xx:xx:xx:xx:xx ABC yy:yy:yy:yy:yy:yy<o:p class=""></o:p></div><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Note down the given: xx:xx:xx:xx:xx:xx<o:p class=""></o:p></div><ol start="3" type="1" style="margin-bottom: 0in; margin-top: 0in;" class=""><li class="MsoListParagraph" style="margin: 0in 0in 0in -9pt; font-size: 11pt; font-family: Calibri, sans-serif;">Login to your MathWorks Account from a computer which has internet access. You will see the available license that your account has. Select a license from the list.<o:p class=""></o:p></li></ol><div style="margin: 0in 0in 0in 27pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0in 1.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span id="cid:image001.png@01D6B83D.FAE907A0"><image001.png></span><o:p class=""></o:p></div><div style="margin: 0in 0in 0in 27pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0in 27pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Then, select<span class="Apple-converted-space"> </span><span style="color: rgb(146, 208, 80);" class="">Install and Activate<span class="Apple-converted-space"> </span></span>option and select the<span class="Apple-converted-space"> </span><span style="color: rgb(146, 208, 80);" class="">Activate to Retrieve License File option.</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0in 27pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0in 99pt; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 9pt;" class=""><span id="cid:image002.png@01D6B83D.FAE907A0"><image002.png></span><o:p class=""></o:p></div><div style="margin: 0in 0in 0in 99pt; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 9pt;" class=""><o:p class=""> </o:p></div><ol start="4" type="1" style="margin-bottom: 0in; margin-top: 0in;" class=""><li class="MsoListParagraph" style="margin: 0in 0in 0in -9pt; font-size: 11pt; font-family: Calibri, sans-serif;">Enter the information and click<span class="Apple-converted-space"> </span><span style="color: rgb(146, 208, 80);" class="">Continue</span>.<o:p class=""></o:p></li></ol><div style="margin: 0in 0in 0in 27pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0in 99pt; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 9pt;" class=""><span id="cid:image003.png@01D6B83D.FAE907A0"><image003.png></span><o:p class=""></o:p></div><div style="margin: 0in 0in 0in 99pt; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 9pt;" class=""><o:p class=""> </o:p></div><ol start="5" type="1" style="margin-bottom: 0in; margin-top: 0in;" class=""><li class="MsoListParagraph" style="margin: 0in 0in 0in -9pt; font-size: 11pt; font-family: Calibri, sans-serif;">An option to download the License file will appear. Download it and copy the license file to the cluster (your home directory).<o:p class=""></o:p></li><li class="MsoListParagraph" style="margin: 0in 0in 0in -9pt; font-size: 11pt; font-family: Calibri, sans-serif;">Now, launch matlab when you have ssh into your head node.<o:p class=""></o:p></li></ol><div style="margin: 0in 0in 0in 27pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0in 99pt; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 9pt;" class=""><span id="cid:image004.png@01D6B83D.FAE907A0"><image004.png></span><o:p class=""></o:p></div><div style="margin: 0in 0in 0in 99pt; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 9pt;" class=""><o:p class=""> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 0.5in;" class="">Select the<span class="Apple-converted-space"> </span><span style="color: rgb(146, 208, 80);" class="">Activate manually without the internet</span><span class="Apple-converted-space"> </span>option and click<span class="Apple-converted-space"> </span><span style="color: rgb(146, 208, 80);" class="">Next ></span>.<o:p class=""></o:p></div><div style="margin: 0in 0in 0in 27pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><ol start="7" type="1" style="margin-bottom: 0in; margin-top: 0in;" class=""><li class="MsoListParagraph" style="margin: 0in 0in 0in -9pt; font-size: 11pt; font-family: Calibri, sans-serif;">Browse and locate the license file.<o:p class=""></o:p></li></ol><div style="margin: 0in 0in 0in 27pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0in 99pt; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 9pt;" class=""><span id="cid:image005.png@01D6B83D.FAE907A0"><image005.png></span><o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <span class="Apple-converted-space"> </span><o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 0.5in;" class="">Matlab is activated and ready to use.<o:p class=""></o:p></div><div style="margin: 0in 0in 0in 27pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(181, 196, 223); padding: 3pt 0in 0in;" class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><b class=""><span style="font-size: 12pt;" class="">From:<span class="Apple-converted-space"> </span></span></b><span style="font-size: 12pt;" class="">Amneet Bhalla <<a href="mailto:mail2amneet@gmail.com" style="color: blue; text-decoration: underline;" class="">mail2amneet@gmail.com</a>><br class=""><b class="">Date:<span class="Apple-converted-space"> </span></b>Tuesday, November 10, 2020 at 6:10 PM<br class=""><b class="">To:<span class="Apple-converted-space"> </span></b>Barry Smith <<a href="mailto:bsmith@petsc.dev" style="color: blue; text-decoration: underline;" class="">bsmith@petsc.dev</a>><br class=""><b class="">Cc:<span class="Apple-converted-space"> </span></b>Kaustubh Khedkar <<a href="mailto:kkhedkar9879@sdsu.edu" style="color: blue; text-decoration: underline;" class="">kkhedkar9879@sdsu.edu</a>>, "<a href="mailto:petsc-users@mcs.anl.gov" style="color: blue; text-decoration: underline;" class="">petsc-users@mcs.anl.gov</a>" <<a href="mailto:petsc-users@mcs.anl.gov" style="color: blue; text-decoration: underline;" class="">petsc-users@mcs.anl.gov</a>><br class=""><b class="">Subject:<span class="Apple-converted-space"> </span></b>Re: [petsc-users] Using Petsc-Matlab engine on a cluster<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Thank you Barry! We will definitely try this out and let you know.<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">We also found an inconvenient work around. We registered the ip of a head compute node on<span class="Apple-converted-space"> </span><a href="http://mathworks.com/" style="color: blue; text-decoration: underline;" class="">Mathworks.com</a>, which generated a license file. Then we activated Matlab on this compute node offline by pointing it to the license file. This allowed us to run Matlab engine on the head compute node (we run Matlab on only rank 0 which is mapped to the head compute node).<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Kaustubh, can you write the exact instructions for registering an ip on<span class="Apple-converted-space"> </span><a href="http://mathworks.com/" style="color: blue; text-decoration: underline;" class="">Mathworks.com</a><span class="Apple-converted-space"> </span>here, so as to benefit other PETSc users.<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">On Tue, Nov 10, 2020 at 5:22 PM Barry Smith <<a href="mailto:bsmith@petsc.dev" style="color: blue; text-decoration: underline;" class="">bsmith@petsc.dev</a>> wrote:<o:p class=""></o:p></div></div><blockquote style="border-style: none none none solid; border-left-width: 1pt; border-left-color: rgb(204, 204, 204); padding: 0in 0in 0in 6pt; margin-left: 4.8pt; margin-right: 0in;" class=""><div class=""><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> In the git branch <b class=""><span style="font-size: 12pt; font-family: Menlo; color: rgb(200, 20, 201);" class="">barry/2020-11-10/add-matlab-engine-host </span></b> I have added the option -matlab_engine_host hostname <o:p class=""></o:p></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Note this does require you have ssh access to hostname from where your PETSc program is running which may require setting up some ssh files<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Good luck<o:p class=""></o:p></div></div></div><div class=""><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Barry<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class=""><br class=""><o:p class=""></o:p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">On Nov 9, 2020, at 5:35 PM, Kaustubh Khedkar <<a href="mailto:kkhedkar9879@sdsu.edu" target="_blank" style="color: blue; text-decoration: underline;" class="">kkhedkar9879@sdsu.edu</a>> wrote:<o:p class=""></o:p></div></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div class=""><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Hello,<span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I am using PETSc with Matlab engine. I have built an application that uses Matlab engine through PETSc interface. I am trying to run this application on a cluster which has Matlab installed on a network drive (nas drive). I have made sure that I am able to access Matlab using my university details on the cluster (by activating Matlab license through <a href="http://mathworks.com/" target="_blank" style="color: blue; text-decoration: underline;" class="">Mathworks.com</a> account). I am also able to run this application using mpirun on the head node (master) which starts the Matlab engine but if I try to run this application using slurm on compute node then the Matlab engine does not start. I have also confirmed that if I login into one of the compute nodes and do a mpirun the Matlab engine does not start there. If I try to launch Matlab on a compute node it asks for Matlab license which the compute node is unable to activate possibly because it is not connected to the internet directly.<span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Is there a way start matlab engine on the head node through Petsc interface even though the application is running on compute nodes or is there any other work around this issue?<span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Thanks,<span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Kaustubh Khedkar<span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div></div></div></div></blockquote></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div></div></blockquote></div></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">--<span class="Apple-converted-space"> </span><o:p class=""></o:p></div><div class=""><div class=""><div class=""><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;">--Amneet </p></div></div></div></div></div></blockquote></div><br class=""></div></body></html>