01 function lock_file = MatMPI_lock_file(source ,dest ,tag ,comm)
02 % MatMPI_lock_file - function for creating lock file name.
03 %
04 % lock_file = MatMPI_lock_file(source,dest,tag,comm)
05 %
06
07 machine_id = comm.machine_id(1 ,dest + 1) ;
08 dir = comm.machine_db.dir{1 ,machine_id} ;
09 lock_file = [dir ,' / p' ,num2str(source) ,'_p' ,num2str(dest) ,'_t' ,num2str(tag) ,'_lock.mat'] ;
10
11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 % MatlabMPI
13 % Dr. Jeremy Kepner
14 % MIT Lincoln Laboratory
15 % kepner@ll.mit.edu
16 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17 % Copyright 2002 Massachusetts Institute of Technology
18 %
19 % Permission is herby granted, without payment, to copy, modify, display
20 % and distribute this software and its documentation, if any, for any
21 % purpose, provided that the above copyright notices and the following
22 % three paragraphs appear in all copies of this software. Use of this
23 % software constitutes acceptance of these terms and conditions.
24 %
25 % IN NO EVENT SHALL MIT BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
26 % SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF
27 % THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF MIT HAS BEEN ADVISED OF THE
28 % POSSIBILITY OF SUCH DAMAGE.
29 %
30 % MIT SPECIFICALLY DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING,
31 % BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
32 % FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
33 %
34 % THIS SOFTWARE IS PROVIDED "AS IS," MIT HAS NO OBLIGATION TO PROVIDE
35 % MAINTENANCE, SUPPORT, UPDATE, ENHANCEMENTS, OR MODIFICATIONS.
36
37
|