📄 wmpiexec.cs
字号:
this.drive_map_label.Location = new System.Drawing.Point(24, 440); this.drive_map_label.Name = "drive_map_label"; this.drive_map_label.Size = new System.Drawing.Size(88, 23); this.drive_map_label.TabIndex = 19; this.drive_map_label.Text = "drive mappings"; // // drive_map_textBox // this.drive_map_textBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.drive_map_textBox.Location = new System.Drawing.Point(152, 440); this.drive_map_textBox.Name = "drive_map_textBox"; this.drive_map_textBox.Size = new System.Drawing.Size(352, 20); this.drive_map_textBox.TabIndex = 18; this.drive_map_textBox.Text = ""; // // channel_label // this.channel_label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.channel_label.Location = new System.Drawing.Point(24, 464); this.channel_label.Name = "channel_label"; this.channel_label.Size = new System.Drawing.Size(48, 23); this.channel_label.TabIndex = 21; this.channel_label.Text = "channel"; // // channel_comboBox // this.channel_comboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.channel_comboBox.Items.AddRange(new object[] { "sock", "shm", "sshm", "ssm", "essm", "ib", "mt", "default", "auto"}); this.channel_comboBox.Location = new System.Drawing.Point(424, 464); this.channel_comboBox.Name = "channel_comboBox"; this.channel_comboBox.Size = new System.Drawing.Size(80, 21); this.channel_comboBox.TabIndex = 19; this.channel_comboBox.Text = "default"; // // save_job_button // this.save_job_button.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.save_job_button.Location = new System.Drawing.Point(429, 56); this.save_job_button.Name = "save_job_button"; this.save_job_button.TabIndex = 8; this.save_job_button.Text = "Save Job"; this.save_job_button.Click += new System.EventHandler(this.save_job_button_Click); // // load_job_button // this.load_job_button.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.load_job_button.Location = new System.Drawing.Point(352, 56); this.load_job_button.Name = "load_job_button"; this.load_job_button.TabIndex = 7; this.load_job_button.Text = "Load Job"; this.load_job_button.Click += new System.EventHandler(this.load_job_button_Click); // // execute_button // this.execute_button.Location = new System.Drawing.Point(8, 56); this.execute_button.Name = "execute_button"; this.execute_button.TabIndex = 5; this.execute_button.Text = "Execute"; this.execute_button.Click += new System.EventHandler(this.execute_button_Click); // // break_button // this.break_button.Enabled = false; this.break_button.Location = new System.Drawing.Point(88, 56); this.break_button.Name = "break_button"; this.break_button.TabIndex = 6; this.break_button.Text = "Break"; this.break_button.Click += new System.EventHandler(this.break_button_Click); // // output_richTextBox // this.output_richTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.output_richTextBox.Font = new System.Drawing.Font("Lucida Console", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.output_richTextBox.Location = new System.Drawing.Point(8, 104); this.output_richTextBox.Name = "output_richTextBox"; this.output_richTextBox.Size = new System.Drawing.Size(496, 224); this.output_richTextBox.TabIndex = 11; this.output_richTextBox.Text = ""; this.output_richTextBox.WordWrap = false; this.output_richTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.output_richTextBox_KeyPress); // // application_comboBox // this.application_comboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.application_comboBox.Location = new System.Drawing.Point(88, 8); this.application_comboBox.Name = "application_comboBox"; this.application_comboBox.Size = new System.Drawing.Size(392, 21); this.application_comboBox.TabIndex = 2; // // show_command_button // this.show_command_button.Location = new System.Drawing.Point(8, 80); this.show_command_button.Name = "show_command_button"; this.show_command_button.Size = new System.Drawing.Size(96, 23); this.show_command_button.TabIndex = 9; this.show_command_button.Text = "Show Command"; this.show_command_button.Click += new System.EventHandler(this.show_command_button_Click); // // command_line_textBox // this.command_line_textBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.command_line_textBox.Location = new System.Drawing.Point(104, 80); this.command_line_textBox.Name = "command_line_textBox"; this.command_line_textBox.ReadOnly = true; this.command_line_textBox.Size = new System.Drawing.Size(400, 20); this.command_line_textBox.TabIndex = 10; this.command_line_textBox.Text = ""; // // application_radioButton // this.application_radioButton.Checked = true; this.application_radioButton.Location = new System.Drawing.Point(8, 8); this.application_radioButton.Name = "application_radioButton"; this.application_radioButton.Size = new System.Drawing.Size(16, 24); this.application_radioButton.TabIndex = 1; this.application_radioButton.TabStop = true; this.application_radioButton.CheckedChanged += new System.EventHandler(this.application_radioButton_CheckedChanged); // // configfile_radioButton // this.configfile_radioButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.configfile_radioButton.Location = new System.Drawing.Point(8, 520); this.configfile_radioButton.Name = "configfile_radioButton"; this.configfile_radioButton.Size = new System.Drawing.Size(16, 24); this.configfile_radioButton.TabIndex = 21; this.configfile_radioButton.CheckedChanged += new System.EventHandler(this.configfile_radioButton_CheckedChanged); // // mpich1_radioButton // this.mpich1_radioButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.mpich1_radioButton.Location = new System.Drawing.Point(8, 544); this.mpich1_radioButton.Name = "mpich1_radioButton"; this.mpich1_radioButton.Size = new System.Drawing.Size(16, 24); this.mpich1_radioButton.TabIndex = 24; this.mpich1_radioButton.CheckedChanged += new System.EventHandler(this.mpich1_radioButton_CheckedChanged); // // show_bottom_checkBox // this.show_bottom_checkBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.show_bottom_checkBox.Location = new System.Drawing.Point(8, 328); this.show_bottom_checkBox.Name = "show_bottom_checkBox"; this.show_bottom_checkBox.Size = new System.Drawing.Size(96, 16); this.show_bottom_checkBox.TabIndex = 12; this.show_bottom_checkBox.Text = "more options"; this.show_bottom_checkBox.CheckedChanged += new System.EventHandler(this.show_bottom_checkBox_CheckedChanged); // // extra_options_textBox // this.extra_options_textBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.extra_options_textBox.Location = new System.Drawing.Point(152, 496); this.extra_options_textBox.Name = "extra_options_textBox"; this.extra_options_textBox.Size = new System.Drawing.Size(352, 20); this.extra_options_textBox.TabIndex = 27; this.extra_options_textBox.Text = ""; // // extra_options_label // this.extra_options_label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.extra_options_label.Location = new System.Drawing.Point(24, 496); this.extra_options_label.Name = "extra_options_label"; this.extra_options_label.Size = new System.Drawing.Size(120, 23); this.extra_options_label.TabIndex = 28; this.extra_options_label.Text = "extra mpiexec options"; // // popup_checkBox // this.popup_checkBox.Location = new System.Drawing.Point(168, 56); this.popup_checkBox.Name = "popup_checkBox"; this.popup_checkBox.Size = new System.Drawing.Size(168, 24); this.popup_checkBox.TabIndex = 29; this.popup_checkBox.Text = "run in an separate window"; // // jumpshot_button // this.jumpshot_button.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.jumpshot_button.Location = new System.Drawing.Point(432, 336); this.jumpshot_button.Name = "jumpshot_button"; this.jumpshot_button.Size = new System.Drawing.Size(75, 24); this.jumpshot_button.TabIndex = 30; this.jumpshot_button.Text = "Jumpshot"; this.jumpshot_button.Click += new System.EventHandler(this.jumpshot_button_Click); // // log_checkBox // this.log_checkBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.log_checkBox.Location = new System.Drawing.Point(312, 336); this.log_checkBox.Name = "log_checkBox"; this.log_checkBox.Size = new System.Drawing.Size(112, 24); this.log_checkBox.TabIndex = 31; this.log_checkBox.Text = "produce clog2 file"; // // wmpiexec // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(512, 579); this.Controls.Add(this.log_checkBox); this.Controls.Add(this.jumpshot_button); this.Controls.Add(this.popup_checkBox); this.Controls.Add(this.extra_options_label); this.Controls.Add(this.extra_options_textBox); this.Controls.Add(this.application_radioButton); this.Controls.Add(this.command_line_textBox); this.Controls.Add(this.drive_map_textBox); this.Controls.Add(this.env_textBox); this.Controls.Add(this.mpich1_textBox); this.Controls.Add(this.configfile_textBox); this.Controls.Add(this.hosts_textBox); this.Controls.Add(this.wdir_textBox); this.Controls.Add(this.show_bottom_checkBox); this.Controls.Add(this.mpich1_radioButton); this.Controls.Add(this.configfile_radioButton); this.Controls.Add(this.show_command_button); this.Controls.Add(this.application_comboBox); this.Controls.Add(this.output_richTextBox); this.Controls.Add(this.break_button); this.Controls.Add(this.execute_button); this.Controls.Add(this.load_job_button); this.Controls.Add(this.save_job_button); this.Controls.Add(this.channel_comboBox); this.Controls.Add(this.channel_label); this.Controls.Add(this.drive_map_label); this.Controls.Add(this.env_label); this.Controls.Add(this.mpich1_browse_button); this.Controls.Add(this.mpich1_label); this.Controls.Add(this.configfile_browse_button); this.Controls.Add(this.configfile_label); this.Controls.Add(this.hosts_reset_button); this.Controls.Add(this.hosts_label); this.Controls.Add(this.wdir_browse_button); this.Controls.Add(this.wdir_label); this.Controls.Add(this.nproc_numericUpDown); this.Controls.Add(this.nproc_label); this.Controls.Add(this.application_browse_button); this.Controls.Add(this.application_label); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "wmpiexec"; this.Text = "MPIEXEC wrapper"; this.Closing += new System.ComponentModel.CancelEventHandler(this.wmpiexec_Closing); ((System.ComponentModel.ISupportInitialize)(this.nproc_numericUpDown)).EndInit(); this.ResumeLayout(false); } #endregion /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.Run(new wmpiexec()); } private void AppendText(string str) { output_richTextBox.AppendText(str); } private void SetProcess(Process p) { process = p; } private void ResetExecuteButtons() { execute_button.Enabled = true; break_button.Enabled = false; } private void application_browse_button_Click(object sender, System.EventArgs e) { OpenFileDialog dlg = new OpenFileDialog(); dlg.Filter = "Executable files (*.exe)|*.exe|All files (*.*)|*.*"; if (dlg.ShowDialog() == DialogResult.OK) { if (dlg.FileName.IndexOf(' ') != -1) { application_comboBox.Text = "\"" + dlg.FileName + "\""; } else { application_comboBox.Text = dlg.FileName; } } } private void wdir_browse_button_Click(object sender, System.EventArgs e) { FolderBrowserDialog dlg = new FolderBrowserDialog(); if (wdir_textBox.Text.Length > 0) { dlg.SelectedPath = wdir_textBox.Text; } else { dlg.SelectedPath = Environment.CurrentDirectory; } if (dlg.ShowDialog() == DialogResult.OK) { wdir_textBox.Text = dlg.SelectedPath; } } private void hosts_reset_button_Click(object sender, System.EventArgs e) { object obj; RegistryKey key = Registry.LocalMachine.OpenSubKey(@"Software\MPICH\SMPD"); obj = key.GetValue("hosts"); if (obj != null) { hosts_textBox.Text = obj.ToString(); } else { hosts_textBox.Text = ""; } } private void configfile_browse_button_Click(object sender, System.EventArgs e) { OpenFileDialog dlg = new OpenFileDialog(); dlg.Filter = "All files (*.*)|*.*"; if (dlg.ShowDialog() == DialogResult.OK) { configfile_textBox.Text = dlg.FileName; } } private void mpich1_browse_button_Click(object sender, System.EventArgs e) { OpenFileDialog dlg = new OpenFileDialog(); dlg.Filter = "Configuration file (*.cfg)|*.cfg|All files (*.*)|*.*"; if (dlg.ShowDialog() == DialogResult.OK) { mpich1_textBox.Text = dlg.FileName; } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -