hpc.bat 922 B

12345678910111213141516171819202122232425262728
  1. @echo off
  2. REM run on hpc
  3. setlocal EnableDelayedExpansion
  4. set "startTime=%time: =0%"
  5. REM path %path%;
  6. REM"C:\Program Files\Lumerical\FDTD\bin\fdtd-engine" -t 32 template-dipole-on-sphere-on-surf-z.fsp
  7. "C:\Program Files\Lumerical\FDTD\bin\fdtd-solutions" -nw -run create_hpc_bat.lsf
  8. call exec.bat
  9. REM mpiexec -n 16 python Si_cylinder_on_Al2O3_substrate.py
  10. REM python Si_cylinder_on_Al2O3_substrate.py
  11. set "endTime=%time: =0%"
  12. rem Get elapsed time:
  13. set "end=!endTime:%time:~8,1%=%%100)*100+1!" & set "start=!startTime:%time:~8,1%=%%100)*100+1!"
  14. set /A "elap=((((10!end:%time:~2,1%=%%100)*60+1!%%100)-((((10!start:%time:~2,1%=%%100)*60+1!%%100)"
  15. rem Convert elapsed time to HH:MM:SS:CC format:
  16. set /A "cc=elap%%100+100,elap/=100,ss=elap%%60+100,elap/=60,mm=elap%%60+100,hh=elap/60+100"
  17. echo Start: %startTime%
  18. echo End: %endTime%
  19. echo Elapsed: %hh:~1%%time:~2,1%%mm:~1%%time:~2,1%%ss:~1%%time:~8,1%%cc:~1%