create_hpc_bat.lsf 544 B

123456789101112131415161718192021222324
  1. clear;
  2. redrawoff;
  3. status = layoutmode;
  4. slash = "/";
  5. if (operatingsystem == "windows") {slash = "\\";}
  6. curdir = pwd;
  7. files = splitstring(dir,endl);
  8. isCreated = false;
  9. fname = curdir+slash+"exec.bat";
  10. if (fileexists(fname)){rm(fname);}
  11. for(i=1:length(files)) {
  12. if(fileextension(files{i}) == "fsp") {
  13. load(files{i});
  14. status = layoutmode;
  15. if (status == 1) {
  16. write(fname,"\"C:\Program Files\Lumerical\FDTD\bin\fdtd-engine\" -t 32 "+files{i});
  17. #add_plasmon_monitors;
  18. }
  19. }
  20. }
  21. redrawon;