Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
Grid[Interrupt] - 指定したノードで計算を中断
使い方
Interrupt(node)
パラメータ
node
-
中断するノードを指定する整数
説明
Interrupt コマンドは、指定した外部ノードで実行されている計算を中断します。
node パラメータは、外部プロセス内で Grid[MyNode] により得られる値で指定されるノードです。ノード番号については、Grid[MyNode] をご覧ください。
ノード 0 は中断できません。(並列ジョブ全体を中断することになってしまうため)
あるノードが自身を中断することも禁止されています。
ノードを中断する場合、そのノードからメッセージを待つ他のノードがブロックされてしまい、デッドロックが起きる可能性があります。そのようなデッドロックは検知し、ジョブは自動的に中止されます。
mpi モードで Grid パッケージ実行したとき、Interrupt は実装されません。その場合、呼ぶことはできますが効果は何もありません。
この関数は Grid パッケージに含まれているため、コマンド with(Grid) を実行した後でなければ Grid(..) という 短縮形 は利用できません。ただし、Grid[Interrupt](..) という 標準形 はいつでも利用できます。
互換性
Grid[Interrupt] コマンドは Maple 15 より導入されました。
Maple 15 の変更点についての詳細は、Maple 15 の更新情報 をご覧ください。
例
p := proc() uses Grid; if MyNode()=0 then Receive(); # wait for a message elif MyNode()=1 then # interrupt everybody else for i from 2 to NumNodes()-1 do Interrupt(i); end do; # notify node 0 Grid:-Util:-Send(0, true); else # all other nodes are in an infinite loop while true do end do; end if; end proc;
Warning, `i` is implicitly declared local to procedure `p`
Grid:-Launch(3,p);
参照
Grid
Download Help Document