create_hpc_bat.lsf 592 B

1234567891011121314151617181920212223242526
  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. write(fname,"exit /b 1");
  18. break;
  19. }
  20. }
  21. }
  22. write(fname,"exit /b 0");
  23. redrawon;