This is a short video tutorial to show you how to run your first optical simulation using the Kogence Optical Simulation Suite (KOSS).
- To follow this tutorial along, please make a copy of public model Optical simulation of multilayer stack of two dimensional (2D) metallic photonic crystals by clicking on the Copy button at the top right corner. Users that are not explicitly added as Collaborators on a model cannot make changes to or run that model even if it is a public model. Users can make a personal copy of public models and then run their personal copy as it is or edit as per their needs. Copying an existing model that has been executed or copied many times before by other users on the platform is easiest and quickest way to get started.
- We then go to the Cluster tab. First select a CPU credits account that you want to use for billing. You will at least one entry for your Individual Compute Plan. If you are part of a team subscription on Kogence then you may have more choices.
- Then lets select a time limit. CPU credits needed to run your simulation for this time limit will initially be blocked from the CPU credits account that you selected. If your simulation does not automatically end before the time limit then your simulation jo and your cloud HPC server would be automatically terminated at this time limit. If your simulation ends before this time limit then the remaining CPU credits would be refunded to your account.
- Now lets select a cloud HPC server hardware. In this example we are picking a small 2 CPU cloud HPC server. Do not forget to save the Cluster stack tab settings before navigating away form this tab otherwise your settings would be lost.
- We will invoke KOSS using its 2 argument syntax
koss *.cmd *.prbto simulate this 2D photonic crystal geometry. For more invocation options, please check the documentation page for KOSS. Go to the Stack tab of your Model. Click on the + button to add KOSS software container in the software stack of our workflow. On clicking the + button, you should get a popup on which you can either search for KOSS or browse to find KOSS. Then click the + button next to the KOSS entry in that popup. This will add KOSS to your workflow.
- You will see a dropdown menu that allows you to select an entrypoint binary to run inside the container. Please select
kossbinary. You will then see a command text box next to it. Please enter
YourCMDFile.cmd YourPRBFile.prb. Do not forget to save the Stack stack tab settings before navigating away form this tab otherwise your settings would be lost.
*.prbfiles that we entered in the Stack tab command box must be available with exact same name under the Files tab of your model. Under the Files tab, you can double click to open the file in a built-in code editor. Feel free to edit these as you like. If you have edited code on your local machine instead then you can also upload those to the Files tab by using the controls shown at the top navigation bar under the Files tab. If you have a large number of files to upload then you can create a zip file on your local machine and then upload the zip file. Zip file will be automatically extracted as soon as upload is complete.
- Optical scattering problem as defined in the
*.prbfile. This input file is used to define geometry, material properties, properties of incident light as well as parameters that control the accuracy of simulations. KOSS optical scattering simulation utilities/modules are called one after another to complete the simulation. This order is defined in
- After simulation is complete, your result file will also show up under this Files tab. If you desire you can download files to your local machine by doing right click on your mouse.
- Lets go back to Stack tab. Lets also add a CloudShell to our software stack. In the entrypoint binary dropdown, lets select
shell-terminal. In the command textbox, lets enter
gnome-terminal. This will give us a shell terminal. We can use this shell terminal for miscellaneous management and monitoring after our cloud HPC server boots up and once we connect to our machine using the Visualizer button on top right corner.
- In the Stack tab, lets check mark the box labeled "Run With Previous" next to the CloudShell entry that we added to our software stack. This allows CloudShell to start together with KOSS. So we will have CloudShell available to use while KOSS is still running. If we do not check mark this box then CloudShell will only become available after KOSS simulation ends. Lets save the Stack tab settings.
- Now we are ready. Lets click the Run button to start the simulation on our selected cloud HPC server. First time you request to boot up a server, it takes upto approximately 2 minutes. Once cloud HPC server boots up, you will see that Run button turns into Stop button. You will also see that the Visulaizer button becomes active. Clicking on the Visualizer button will connect you to your cloud HPC server. This is a full interactive graphical connection.
- You will see a few windows here. You can move them around for better visibility. You will see couple of log file that will show you if you are KOSS simulation is running or not or if it threw any errors. You will also see a system performance monitor window. Monitor has three tabs. If you go to the "Resources" tab, you can see how efficiently KOSS is using CPUs in the cloud HPC server. You will also see a CloudShell
gnome-terminalwindow that we added in our software stack. We can use this terminal to check our project folder and look at status of the files. If you like you can edit your code files here as well.
- Generally, your simulation ends automatically as soon as all the jobs complete. All the model files sync back to the Files tab. Billing stops irrespective of whatever time limit you selected in the Cluster tab. But in this case we added a CloudShell in the stack tab. CloudShell does not exit automatically, we have to close it manually. Your simulation and Kogence billing will not terminate until you press the Stop button or until you reached the time limit you selected on the Cluster tab.
- After simulation stops, we can go back to Files tab and explore or download the results. All graphically results from your simulation are also automatically pulled into your model's wiki page. Wiki pages come with a WYSIWYG Visual Editor. Feel free to move the graphical figures to appropriate locations and add some text in your model's wiki make to clearly document your modeling project and results so that it can shared with your collaborators and reviewers.
- After stopping your simulation if you want to make some changes and restart the simulation, this time your HPC server should come up instantly.