NSTX logo FAQ Web Tools UNIX&VMS MDSplus
Overview Programming Diagnostics Applications
software
DiagnosticsFAQWeb ToolsUNIX&VMS softwareSoftware homeOverview Details

MPIDL Library Functions

(This page was created by a MODIFICATION of the IDL library routine mk_html_help).

List Last updated: Mon Jan 6 11:46:33 2003.


Alphabetical List of Routines

[List of Routines by Category]


Routine Descriptions

MPI_BARRIER

[Next Routine] [List of Routines]
 NAME:
       MPI_BARRIER
 PURPOSE:
	BLOCKS UNTIL ALL PROCESSES HAVE REACHED THIS ROUTINE     
 CALLING SEQUENCE:
       IDL> STS=MPI_BARRIER()
 INPUTS:
      NONE
	
 KEYWORD PARAMETERS:
       NONE
 OUTPUTS:
       STATUS OF CALLING MPI_BARRIER
 COMMON BLOCKS:
       NONE
 EXAMPLE:
	STS=MPI_BARRIER()
 NOTES:
       
 MODIFICATION HISTORY:
       18-DEC-02 Written by Dana Mastrovito, PPPL


MPI_BCAST

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       MPI_BCAST
 PURPOSE:
      BROADCASTS VALUE FROM ONE TO ALL PROCESSES
 CALLING SEQUENCE:
       IDL> VALUE=MPI_BCAST(SOURCE, DATA)
 INPUTS:
       SOURCE  NUMBER OF PROCESS FROM WHICH DATA WILL BE SENT
	DATA  IF ON PROCESSOR SOURCE DATA IS THE DATA TO BE BROADCAST
	ON ANY OTHER PROCESSOR DATA IS AN EMPTY VAR OF SAME SIZE AND SHAPE 
	OF DATA ON PROCESS SOURCE
 KEYWORD PARAMETERS:
       NONE
 OUTPUTS:
       VALUE OF BROADCASTED DATA	
 COMMON BLOCKS:
       NONE
 EXAMPLE:
	IDL> SOURCE=0
	GAIN=MDSVALUE('\MYTREE::GAIN')	
	IF MYID EQ SOURCE THEN DATA=FINDGEN(100)*GAIN ELSE $
	DATA=FLTARR(100)
	DATA=MPI_BCAST(0,DATA)		
 NOTES:
       
 MODIFICATION HISTORY:
       18-DEC-02 Written by Dana Mastrovito, PPPL


MPI_COMM_RANK

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       MPI_COMM_RANK
 PURPOSE:
      GET RANK OF CURRENT PROCESSOR 
 CALLING SEQUENCE:
       IDL> MYID=MPI_COMM_RANK()
 INPUTS:
       NONE 
 KEYWORD PARAMETERS:
       NONE
 OUTPUTS:
       RANK NUMBER OF CURRENT PROCESS
	IE THE NUMBER OF THE CALLING PROCESS 		
 COMMON BLOCKS:
       none
 EXAMPLE:
	IDL> MYID=MPI_COMM_RANK()
 NOTES:
       
 MODIFICATION HISTORY:
       18-DEC-02 Written by Dana Mastrovito, PPPL


MPI_COMM_SIZE

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       MPI_COMM_SIZE
 PURPOSE:
      GET NUMBER OF PROCESSORS IN GIVEN COMMUNICATOR
      CURRENTLY THIS RETURNS THE TOTAL NUMBER OF PROCESSORS ON WHICH YOUR
      PROCESS IS RUNNING
 CALLING SEQUENCE:
       IDL> NUMPROCS=MPI_COMM_SIZE()
 INPUTS:
       NONE 
 KEYWORD PARAMETERS:
       NONE
 OUTPUTS:
      NUMBER OF PROCESSORS	
 COMMON BLOCKS:
       NONE
 EXAMPLE:
	IDL> NUMPROCS=MPI_COMM_SIZE() 
 NOTES:
      
 MODIFICATION HISTORY:
       18-DEC-02 Written by Dana Mastrovito, PPPL


MPI_FINALIZE

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       MPI_FINALIZE
 PURPOSE:
      FINALIZE MPI 
 CALLING SEQUENCE:
       IDL> STS=MPI_FINALIZE()
 INPUTS:
       NONE
 KEYWORD PARAMETERS:
       NONE
 OUTPUTS:
       STATUS OF MPI FINALIZING FROM MPI	
 COMMON BLOCKS:
       NONE
 EXAMPLE:
	IDL> STS=MPI_FINALIZE()
 NOTES:
       
 MODIFICATION HISTORY:
       18-DEC-02 Written by Dana Mastrovito, PPPL


MPI_FINALIZED

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       MPI_FINALIZED
 PURPOSE:
      CHECK IF MPI HAS BEEN FINALIZED 
 CALLING SEQUENCE:
       IDL> STS=MPI_FINALIZED()
 INPUTS:
       NONE 
 KEYWORD PARAMETERS:
       NONE
 OUTPUTS:
       STATUS OF MPI FINALIZING TRUE OR FALSE 		
 COMMON BLOCKS:
       NONE
 EXAMPLE:
	IDL> IF NOT MPI_FINALIZED() THEN STS=MPI_FINALIZE() 
 NOTES:
       
 MODIFICATION HISTORY:
       18-DEC-02 Written by Dana Mastrovito, PPPL


MPI_GATHER

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       MPI_GATHER
 PURPOSE:
      GATHERS DATA FROM ALL PROCESSES INTO AN ARRAY ON ONE PROCESS
 CALLING SEQUENCE:
       IDL> VALUE=MPI_GATHER(ROOT, DATA)
 INPUTS:
       ROOT IS THE NUMBER OF THE PROCESS WHICH WILL GATHER THE DATA
	DATA IS THE DATA TO BE GATHERED 
	
 KEYWORD PARAMETERS:
       NONE
 OUTPUTS:
       VALUE OF RECEIVED DATA	
 COMMON BLOCKS:
       NONE
 EXAMPLE:
	IDL>ROOT=0
	IDL>HELP, CALCULATION_RESULT
	CALCULATION_RESULT 	FLOAT	=ARRAY[10]
	IDL>PRINT,MPI_COMM_SIZE()
		10
	RESULT=MPI_GATHER(ROOT,CALCULATION_RESULT) 	
 NOTES:
       THE RESULT WILL BE A FLTARR[10,10] ON THE ROOT PROCESSOR 
 MODIFICATION HISTORY:
       18-DEC-02 Written by Dana Mastrovito, PPPL


MPI_INTIALIZE

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       MPI_INTIALIZE
 PURPOSE:
      INITIALIZE MPI 
 CALLING SEQUENCE:
       IDL> STS=MPI_INITIALIZE()
 INPUTS:
       NONE
 KEYWORD PARAMETERS:
       NONE
 OUTPUTS:
       STATUS OF MPI INITIALIZATION FROM MPI		
 COMMON BLOCKS:
       NONE
 EXAMPLE:
	IDL> STS=MPI_INITIALIZE() 
 NOTES:
       
 MODIFICATION HISTORY:
       18-DEC-02 Written by Dana Mastrovito, PPPL


MPI_INTIALIZED

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       MPI_INTIALIZED
 PURPOSE:
      CHECK IF MPI HAS BEEN INITIALIZED 
 CALLING SEQUENCE:
       IDL> STS=MPI_INITIALIZED()
 INPUTS:
       NONE 
 KEYWORD PARAMETERS:
       NONE
 OUTPUTS:
       STATUS OF MPI INITIALIZATION TRUE OR FALSE 		
 COMMON BLOCKS:
       NONE
 EXAMPLE:
	IDL> IF NOT MPI_INITIALIZED() THEN STS=MPI_INITIALIZE() 
 NOTES:
       
 MODIFICATION HISTORY:
       18-DEC-02 Written by Dana Mastrovito, PPPL


MPI_RECV

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       MPI_RECV
 PURPOSE:
      RECEIVES DATA FROM ANOTHER SPECIFIED PROCESS
 CALLING SEQUENCE:
       IDL> VALUE=MPI_RECV(SOURCE, DATA)
 INPUTS:
       SOURCE NUMBER OF PROCESS FROM WHICH DATA WILL BE SENT
	DATA IS THE DATA TO BE RECEIVED
	
 KEYWORD PARAMETERS:
       NONE
 OUTPUTS:
       VALUE OF RECEIVED DATA	
 COMMON BLOCKS:
       NONE
 EXAMPLE:
	IDL> SOURCE=0
	IDL> DEST=1
	GAIN=MDSVALUE('\MYTREE::GAIN')	
	IF MYID EQ SOURCE THEN DATA=FINDGEN(100)*GAIN ELSE $
	DATA=FLTARR(100)
	IF MYID EQ SOURCE THEN DATA=MPI_SEND(1,DATA)		
	IF MYID EQ DEST THEN DATA=MPI_RECV(0,DATA)
 NOTES:
       PROCESS TO SEND DATA MUST CALL MPI_SEND
 MODIFICATION HISTORY:
       18-DEC-02 Written by Dana Mastrovito, PPPL


MPI_RUN

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       MPI_RUN
 PURPOSE:
      RUNS THE IDL PROGRAM OF YOUR CHOICE AND BROADCASTS ITS NAME TO BACKGROUND
      IDL PROCESSES ON OTHER PROCESSORS TO RUN     
 CALLING SEQUENCE:
       IDL> STS=MPI_RUN("MYIDLPROGRAM")
 INPUTS:
       NAME OF PROGRAM TO BE RUN 
 KEYWORD PARAMETERS:
       NONE
 OUTPUTS:
       STATUS OF MPI BROADCAST OF PROGRAM NAME	
 COMMON BLOCKS:
       NONE
 EXAMPLE:
	IDL> STS=MPI_RUN("MYIDLPROGRAM")
 NOTES:
       
 MODIFICATION HISTORY:
       18-DEC-02 Written by Dana Mastrovito, PPPL


MPI_SCATTER

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       MPI_SCATTER
 PURPOSE:
     SCATTERS AN ARRAY OF DATA FROM ONE PROCESS TO ALL PROCESSES
 CALLING SEQUENCE:
       IDL> VALUE=MPI_SCATTER(ROOT,DATA,[NSEND])
 INPUTS:
       ROOT IS THE NUMBER OF THE PROCESS WHICH WILL SCATTER THE DATA
	DATA IS THE DATA TO BE SCATTERED ON THE ROOT PROCESS
	FOR ANY OTHER PROCESS DATA IS AN EMPTY VAR TO CONTAIN WHATEVER SIZE &
	SHAPE DATA WILL BE RECEIVED ON THAT PROCESS
	NSEND (OPTIONAL) IS THE NUMBER OF ELEMENTS TO SEND TO EACH PROCESS
	
 KEYWORD PARAMETERS:
       NONE
 OUTPUTS:
       VALUE OF RECEIVED DATA	
 COMMON BLOCKS:
       NONE
 EXAMPLE:
	IDL>ROOT=0
	IDL> HELP, DATA ,/STRUCT
DATA         STRUCT     =  Array[20]
   NSC             FLOAT     Array[12, 72, 20]
   RGUESS          FLOAT     Array[72, 20]
   CG              FLOAT     Array[5, 20]
   CC_CHI          FLOAT     Array[3]
   DNSC            FLOAT     Array[12, 72, 20]
   WV_ALL          FLOAT     Array[330, 20]
   QT_LAMBDA       FLOAT     Array[330, 6, 20]
   DQT_LAMBDA      FLOAT     Array[330, 6, 20]
   THETA           FLOAT     Array[20]
   RADIUS          FLOAT     Array[20]
   FB              FLOAT     Array[330, 20]
   DFB             FLOAT     Array[330, 20]
   LFACTOR         FLOAT     Array[72]
   TL              FLOAT     Array[72]
   R1              FLOAT     Array[20]
   R2              FLOAT     Array[20]
   DR              FLOAT     Array[20]
   TIME            FLOAT     Array[31]
   M               FLOAT     Array[6, 20]                 
   NFACTOR         FLOAT     Array[20, 2]    
	IDL> IF MYID EQ ROOT THEN MPTS_MASTER, 109032,DATA=DATA
	IDL>PRINT,MPI_COMM_SIZE()
		10
	RESULT=MPI_SCATTER(ROOT,DATA,2)
 NOTES:
       THE RESULT WILL BE A STRUCTURE ARRAY[2] ON EACH PROCESSOR 
 MODIFICATION HISTORY:
       18-DEC-02 Written by Dana Mastrovito, PPPL


MPI_SEND

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       MPI_SEND
 PURPOSE:
      SENDS DATA FROM ONE PROCESS TO THE SPECIFIED PROCESS
 CALLING SEQUENCE:
       IDL> VALUE=MPI_SEND(DESTINATION, DATA)
 INPUTS:
       DESTINATION NUMBER OF PROCESS TO WHICH DATA WILL BE SENT
	DATA IS THE DATA TO BE SENT
	
 KEYWORD PARAMETERS:
       NONE
 OUTPUTS:
       VALUE OF SENT DATA	
 COMMON BLOCKS:
       NONE
 EXAMPLE:
	IDL> SOURCE=0
	IDL> DEST=1
	GAIN=MDSVALUE('\MYTREE::GAIN')	
	IF MYID EQ SOURCE THEN DATA=FINDGEN(100)*GAIN ELSE $
	DATA=FLTARR(100)
	IF MYID EQ SOURCE THEN DATA=MPI_SEND(1,DATA)		
	IF MYID EQ DEST THEN DATA=MPI_RECV(0,DATA)
 NOTES:
       PROCESS TO RECEIVE DATA MUST CALL MPI_RECV
 MODIFICATION HISTORY:
       18-DEC-02 Written by Dana Mastrovito, PPPL


MPI_TIME

[Previous Routine] [List of Routines]
 NAME:
       MPI_TIME
 PURPOSE:
      GETS MPI TIME ELAPSED SINCE INITIALIZATION
 CALLING SEQUENCE:
       IDL> TIME=MPI_TIME()
 INPUTS:
       NONE
 KEYWORD PARAMETERS:
       NONE
 OUTPUTS:
       TIME IN SECONDS	
 COMMON BLOCKS:
       NONE
 EXAMPLE:
	IDL> TIME=MPI_TIME()
 NOTES:
       
 MODIFICATION HISTORY:
       18-DEC-02 Written by Dana Mastrovito, PPPL