Comsol/Example
From ScientificComputing
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.
[sfux@eu-login-03 comsol]$ ls plasmonic_wire_grating.mph [sfux@eu-login-03 comsol]$ module load comsol/6.1 [sfux@eu-login-03 comsol]$ sbatch --ntasks=1 --cpus-per-task=4 --mem-per-cpu=2g --tmp=8g --wrap="comsol batch -np 4 -autosave off -tmpdir \$TMPDIR -inputfile plasmonic_wire_grating.mph -outputfile output.mph" Submitted batch job 39996633 [sfux@eu-login-03 comsol]$ squeue JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON) 39996633 normal.4h wrap sfux R 0:10 1 eu-g5-003-2 [sfux@eu-login-03 comsol]$ squeue JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON) [sfux@eu-login-03 comsol]$ ls output.mph output.mph.recovery output.mph.status plasmonic_wire_grating.mph slurm-39996633.out [sfux@eu-login-03 comsol]$ grep -A8 "Current Progress: 100 %" slurm-39996633.out ---------- Current Progress: 100 % - Solving linear system Memory: 894/894 7336/7336 Solution time: 5 s. Physical memory: 895 MB Virtual memory: 7336 MB Ended at Dec 14, 2023, 8:42:41 AM. ----- Stationary Solver 1 in Study 1/Solver 1 (sol1) --------------------------> Running: Study 2 <---- Compile Equations: Frequency Domain in Study 2/Solver 2 (sol2) ----------- -- ---------- Current Progress: 100 % - Solving linear system Solution time: 5 s. Physical memory: 1.08 GB Virtual memory: 7.35 GB Ended at Dec 14, 2023, 8:42:50 AM. ----- Stationary Solver 1 in Study 2/Solver 2 (sol2) --------------------------> Run time: 20 s. Saving model: /cluster/home/sfux/testrun/comsol/comsol/output.mph Save time: 0 s. -- ---------- Current Progress: 100 % - Done Memory: 935/1083 7345/7345 Comsollauncher: Cannot open display: [sfux@eu-login-03 comsol]$
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.