Skip to content

Update README.md #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ interfaces. For more details, check the list of [supported toolboxes](http://www
and [ineligible programs](http://www.mathworks.com/products/ineligible_programs/).


All applications created with MATLAB Compiler use [MATLAB Compiler Runtime™ (MCR)](http://www.mathworks.com/products/compiler/mcr/), which enables royalty-free deployment and use. We assume you have access to a server that has MATLAB compiler because the compiler is not available on OSG Connect. MATLAB Runtime is available
on OSG Connect.
All applications created with MATLAB Compiler use [MATLAB Compiler Runtime™ (MCR)](http://www.mathworks.com/products/compiler/mcr/), which enables royalty-free deployment and use. We assume you have access to a server that has MATLAB compiler because the compiler is not available on OSG. MATLAB Runtime is available
on OSG.

Although the compiled binaries are portable, they need to have a compatible, OS-specific matlab runtime to interpret the binary. We recommend the
compilation of your matlab program against matlab versions that match the OSG [containers](https://portal.osg-htc.org/documentation/htc_workloads/using_software/available-containers-list/), with the compilation executed on a server with
Expand All @@ -33,7 +33,7 @@ Lets start with a simple MATLAB script `hello_world.m` that prints `Hello World!

### Compilation

*OSG connect does not have a license to use the MATLAB compiler*. On a Linux server with a MATLAB
*OSG does not have a license to use the MATLAB compiler*. On a Linux server with a MATLAB
license, invoke the compiler `mcc`. We turn off all graphical options (`-nodisplay`), disable Java (`-nojvm`), and instruct MATLAB to run this application as a single-threaded application (`-singleCompThread`):

mcc -m -R -singleCompThread -R -nodisplay -R -nojvm hello_world.m
Expand All @@ -46,7 +46,7 @@ The file `hello_world` is the standalone executable. The file `run_hello_world.s

## Running standalone binary applications on OSG

To see which releases are available on OSG visit our available [containers](https://portal.osg-htc.org/documentation/htc_workloads/using_software/available-contaners-list/) page :
To see which releases are available on OSG visit our available [containers](https://portal.osg-htc.org/documentation/htc_workloads/using_software/available-containers-list/) page :

### Tutorial files

Expand Down Expand Up @@ -78,14 +78,12 @@ The above command sets up the environment to run the matlab/2018b runtime applic
Hello, World!
=============

If you get the above output, the binary execution is successful. Now, exit from the apptainer/singularity environment typing `exit`. Next, we see how to submit the job on a remote execute point using HTcondor.
If you get the above output, the binary execution is successful. Now, exit from the apptainer/singularity environment typing `exit`. Next, we see how to submit the job on a remote execute point using HTCondor.

### Job execution and submission files

Let us take a look at `hello_world.submit` file:


universe = vanilla # One OSG Connect vanilla, the preffered job universe is "vanilla"
+SingularityImage = "/cvmfs/singularity.opensciencegrid.org/opensciencegrid/osgvo-matlab-runtime:R2018b"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change this to the new "HTC" images location: /cvmfs/singularity.opensciencegrid.org/htc/matlab-runtime:R2023a

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our container page does not show R2023a. Can I fix that from my end?


executable = hello_world
Expand All @@ -94,11 +92,10 @@ Let us take a look at `hello_world.submit` file:
Error = Log/job.$(Process).err # standard error
Log = Log/job.$(Process).log # log information about job execution

requirements = HAS_SINGULARITY == TRUE
queue 10 # Submit 10 jobs
queue 10 # Submit 10 jobs


Before we submit the job, make sure that the directory `Log` exists on the current working directory. Because HTcondor looks for `Log` directory to copy the standard output, error and log files as specified in the job description file.
Before we submit the job, make sure that the directory `Log` exists on the current working directory. Because HTCondor looks for `Log` directory to copy the standard output, error and log files as specified in the job description file.

From your work directory, type

Expand All @@ -110,7 +107,7 @@ Absence of `Log` directory would send the jobs to held state.

We submit the job using the `condor_submit` command as follows

$ condor_submit hello_world.submit //Submit the condor job description file "hello_world.submit"
$ condor_submit hello_world.submit # Submit the condor job description file "hello_world.submit"

Now you have submitted an ensemble of 10 MATLAB jobs. Each job prints `hello world` on the standard
output. Check the status of the submitted job,
Expand All @@ -125,6 +122,3 @@ The `hello_world.m` script sends the output to standard output. In the condor jo
## What's next?
Sure, it is not very exciting to print the same message on 10 output files. In the subsequent MATLAB
examples, we see how to scale up MATLAB computation on HTC environment.

## Getting help
For assistance or questions, please email the OSG User Support team at [[email protected]](mailto:[email protected]) or visit the [help desk and community forums](https://portal.osg-htc.org/documentation/).