hpc.bat 1023 B

1234567891011121314151617181920212223242526272829303132333435
  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. echo Before loop
  8. :loop
  9. "C:\Program Files\Lumerical\FDTD\bin\fdtd-solutions" -nw -run create_hpc_bat.lsf
  10. echo before run
  11. call exec.bat
  12. if !errorlevel! gtr 0 goto loop
  13. echo after loop
  14. REM mpiexec -n 16 python Si_cylinder_on_Al2O3_substrate.py
  15. REM python Si_cylinder_on_Al2O3_substrate.py
  16. set "endTime=%time: =0%"
  17. rem Get elapsed time:
  18. set "end=!endTime:%time:~8,1%=%%100)*100+1!" & set "start=!startTime:%time:~8,1%=%%100)*100+1!"
  19. set /A "elap=((((10!end:%time:~2,1%=%%100)*60+1!%%100)-((((10!start:%time:~2,1%=%%100)*60+1!%%100)"
  20. rem Convert elapsed time to HH:MM:SS:CC format:
  21. set /A "cc=elap%%100+100,elap/=100,ss=elap%%60+100,elap/=60,mm=elap%%60+100,hh=elap/60+100"
  22. echo Start: %startTime%
  23. echo End: %endTime%
  24. echo Elapsed: %hh:~1%%time:~2,1%%mm:~1%%time:~2,1%%ss:~1%%time:~8,1%%cc:~1%