Comsol/Example

From ScientificComputing
Revision as of 11:43, 27 October 2016 by Sfux (talk | contribs)

Jump to: navigation, search

As an example for a Comsol job, we use the Plasmonic Wire Grating Analyzer which can be downloaded from the Comsol web site. It computes the coefficients of refraction, specular reflection, and first-order diffraction as functions of the angle of incidence for a plasmonic wire grating on a dielectric substrate.

[leonhard@euler02 comsol]$ ls
plasmonic_wire_grating.mph
[leonhard@euler02 comsol]$ module load comsol/5.2
[leonhard@euler02 comsol]$ bsub -n 4 -W 0:30 -R "rusage[mem=2048, scratch=2000]" "comsol batch -np 4 -autosave off -tmpdir \$TMPDIR -inputfile   plasmonic_wire_grating.mph -outputfile output.mph"
Generic job.
Job <26018628> is submitted to queue <normal.4h>.
[leonhard@euler02 comsol]$ bjobs
JOBID      USER        STAT  QUEUE      FROM_HOST   EXEC_HOST   JOB_NAME   SUBMIT_TIME
26018628   leonhard    PEND  normal.4h  euler02                 *utput.mph Aug 29 09:47
[leonhard@euler02 comsol]$ bjobs
JOBID      USER        STAT  QUEUE      FROM_HOST   EXEC_HOST   JOB_NAME   SUBMIT_TIME
26018628   leonhard    RUN   normal.4h  euler02     4*e1441     *utput.mph Aug 29 09:47
[leonhard@euler02 comsol]$ bjobs
No unfinished job found
[leonhard@euler02 comsol]$ ls
lsf.o26018628  output.mph  output.mph.bin  output.mph.status  plasmonic_wire_grating.mph
[leonhard@euler02 comsol]$ grep -A8 "Current Progress: 100 %" lsf.o26018628 
---------- Current Progress: 100 % - Solving linear system
Memory: 1062/1069 5666/5666
Stationary Solver 1 in Study 1/Solver 1 (sol1): Solution time: 0 s
                                                Physical memory: 1.06 GB
                                                Virtual memory: 5.67 GB
Run time: 42 s.
Saving model: /cluster/home/leonhard/comsol/output.mph
Save time: 0 s.
Total time: 55 s.

Comsol can create a large number of files in your home directory, therefore we recommend to have a look at the Comsol tutorial about redirecting files created by Comsol from your home directory to the local scratch.