To restrict the application to run only on hosts with available licenses, specify licenses>=1 in the resource requirements for the application.
See the LSF Configuration Reference for information about the lsf.task file.