[petsc-users] Using Petsc-Matlab engine on a cluster

Kaustubh Khedkar kkhedkar9879 at sdsu.edu
Wed Nov 11 17:19:02 CST 2020


To activate Matlab on head node which does not have access to the internet. (see also: https://www.mathworks.com/matlabcentral/answers/259627-how-do-i-activate-matlab-or-other-mathworks-products-without-an-internet-connection)


  1.  First ssh into the head node using the command:    ssh node_name
  2.  Obtain the Host Id using the command:     ip addr | grep ether      (More details found on:  http://www.mathworks.com/matlabcentral/answers/101892)

You will see something like this:  link/ether xx:xx:xx:xx:xx:xx ABC yy:yy:yy:yy:yy:yy

Note down the given: xx:xx:xx:xx:xx:xx

  1.  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.



[Graphical user interface, text, application, email  Description automatically generated]



Then, select Install and Activate option and select the Activate to Retrieve License File option.



[Graphical user interface, text, application  Description automatically generated]



  1.  Enter the information and click Continue.



[Graphical user interface, application  Description automatically generated]



  1.  An option to download the License file will appear. Download it and copy the license file to the cluster (your home directory).
  2.  Now, launch matlab when you have ssh into your head node.



[Graphical user interface, text, application  Description automatically generated]


Select the Activate manually without the internet option and click Next >.



  1.  Browse and locate the license file.



[Graphical user interface, text, application  Description automatically generated]

Matlab is activated and ready to use.



From: Amneet Bhalla <mail2amneet at gmail.com>
Date: Tuesday, November 10, 2020 at 6:10 PM
To: Barry Smith <bsmith at petsc.dev>
Cc: Kaustubh Khedkar <kkhedkar9879 at sdsu.edu>, "petsc-users at mcs.anl.gov" <petsc-users at mcs.anl.gov>
Subject: Re: [petsc-users] Using Petsc-Matlab engine on a cluster

Thank you Barry! We will definitely try this out and let you know.

We also found an inconvenient work around. We registered the ip of a head compute node on Mathworks.com, 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).

Kaustubh, can you write the exact instructions for registering an ip on Mathworks.com here, so as to benefit other PETSc users.



On Tue, Nov 10, 2020 at 5:22 PM Barry Smith <bsmith at petsc.dev<mailto:bsmith at petsc.dev>> wrote:

   In the git branch  barry/2020-11-10/add-matlab-engine-host   I have added the option -matlab_engine_host hostname

   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

   Good luck

   Barry



On Nov 9, 2020, at 5:35 PM, Kaustubh Khedkar <kkhedkar9879 at sdsu.edu<mailto:kkhedkar9879 at sdsu.edu>> wrote:

Hello,
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 Mathworks.com<http://mathworks.com/> 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.

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?


Thanks,
Kaustubh Khedkar

--
--Amneet


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20201111/39acc92b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 180532 bytes
Desc: image001.png
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20201111/39acc92b/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 271246 bytes
Desc: image002.png
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20201111/39acc92b/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 136139 bytes
Desc: image003.png
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20201111/39acc92b/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 126110 bytes
Desc: image004.png
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20201111/39acc92b/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 124781 bytes
Desc: image005.png
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20201111/39acc92b/attachment-0009.png>


More information about the petsc-users mailing list