Example #1
0
        private void RunLammpsUsingSGE(string file, string extraArgs, string workingdir, int linknum)
        {
            var flagFile = Path.Combine(workingdir, "linker" + linknum + "-ave-force.d"); // says if lammps is finished

            if (File.Exists(flagFile))
            {
                File.Delete(flagFile);
            }


            // Tell qsub to run with binary
            const string lammpsExecutable = "/home/manion/expansion/Downloads/lammps-16Feb16/src/lmp_ubuntu";
            //var lammpsExecutable = Path.Combine(Settings.OutputDirAbs, "lmp_serial");
            var arguments     = " -in " + file + " " + extraArgs;
            var fullArguments = lammpsExecutable + arguments;
            var jobname       = "linker" + linknum + " -b y -wd " + workingdir + " "; //execute as binary

            OBFunctions.submitlammps(fullArguments, workingdir, jobname);             // lmp -v Linker "linker-" -v LinkerRoot

            while (!File.Exists(flagFile))
            {
            }
//            Console.WriteLine(flagFile);
        }