<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">Fri Jan 27 16:56:22 1995 Connection Machine Fortran Version: 2.1  Source Rev: f2100	page: 1
Source Listing File: /usr/castle/share/proj/shortcourse/wator/prob1/cmf/fish1.fcm
    1     1  0 	*  Move particles (fish) according to external force field (current)
    2     2  0 	*
    3     3  0 	*  Inputs :
    4     4  0 	*    nfish  = number of fish
    5     5  0 	*    fishp  = array of initial fish positions (stored as complex numbers)
    6     6  0 	*    fishv  = array of initial fish velocities (stored as complex numbers)
    7     7  0 	*    fishm  = array masses of fish
    8     8  0 	*    tfinal = final time for simulation
    9     9  0 	*    zoom   = range of display field
   10    10  0 	*
   11    11  0 	*  Outputs:
   12    12  0 	*    time intervals and root mean square velocity at each step
   13    13  0 	*    plot of fish positions after each time step
   14    14  0 	*
   15    15  0 	*  Algorithm: integrate using Euler's method
   16    16  0 	*
   17    17  0 	      program fish1
   18    18  0 	      include '/usr/cm5/cmf/include/cm/timer-fort.h'
   33    19  0 	      include '/usr/cm5/cmf/include/cm/CMF_defs.h'
   34    20  0 	
   35    21  0 	*     Define the size of the display window
  253    22  0 	      integer, parameter :: m = 256
  254    23  0 	      integer, parameter :: disp_interval = 10
  255    24  0 	      include 'color_display.inc'
  256    25  0 	
  257    26  0 	*     Max. No. of fish
  260    27  0 	      integer, parameter :: nfish = 10000
  261    28  0 	
  262    29  0 	      complex 	fishp(nfish), fishv(nfish), force(nfish), accel(nfish)
  263    30  0 	      real      fishm(nfish), fishspeed(nfish)
  264    31  0 	CMF$  layout    fishp(:news),fishv(:news),fishm(:news)
  265    32  0 	CMF$  layout    force(:news),accel(:news)
  266    33  0 	
  267    34  0 	      integer 	step,i
  268    35  0 	      real 	dt, t, tfinal, mnsqvel, zoom
  269    36  0 	      complex, parameter :: ii = (0,1) 	
  270    37  0 	C
  271    38  0 	C Initialize fishes, time, and display parameters
  272    39  0 	C
  273    40  0 	      force = (0.,0.)
  274    41  0 	      accel = (0.,0.)
  275    42  0 	      forall (i=1:nfish) fishp(i) = (float(i)*2.0/nfish)-1.0
  276    43  0 	      fishv = ii*fishp
  277    44  0 	      forall (i=1:nfish) fishm(i) = 1.0+float(i)/nfish
  278    45  0 	
  279    46  0 	      tfinal = 30.
  280    47  0 	      zoom   = 40.
  281    48  0 	*
  282    49  0 	* Loop over time steps
  283    50  0 	      step = 0
  284    51  0 	      dt   = .01
  285    52  0 	      t    = 0.0
Fri Jan 27 16:56:22 1995 Connection Machine Fortran Version: 2.1  Source Rev: f2100	page: 2
Source Listing File: /usr/castle/share/proj/shortcourse/wator/prob1/cmf/fish1.fcm
  286    53  0 	      do while (t &lt; tfinal) 
  287    54  0 	         t = t + dt
  288    55  0 	*
  289    56  0 	* Update fish positions and velocities
  290    57  0 	         fishp   = fishp + dt*fishv
  291    58  0 	         call compute_current(force,fishp)
  292    59  0 	         accel   = force/fishm
  293    60  0 	         fishv   = fishv + dt*accel
  294    61  0 	* Update time step
  295    62  0 	         fishspeed = abs(fishv)
  296    63  0 	         mnsqvel = sqrt(sum(fishspeed*fishspeed)/nfish)
  297    64  0 	         print 100,t,mnsqvel
  298    65  0 	         dt      = .1*maxval(fishspeed) / maxval(abs(accel))
  299    66  0 	*
  300    67  0 	* Show fish positions
  301    68  0 	         if (mod(step,disp_interval) .eq. 0) then
  302    69  0 	            call show_fish(fishp,nfish,zoom,m)
  303    70  0 	         endif
  304    71  0 	         step = step + 1
  305    72  0 	      enddo
  306    73  0 	 100  format(2f20.10)
  307    74  0 	      stop
Fri Jan 27 16:56:22 1995 Connection Machine Fortran Version: 2.1  Source Rev: f2100	page: 3
Symbol Storage Map   File: /usr/castle/share/proj/shortcourse/wator/prob1/cmf/fish1.fcm
ENTRY POINTS
  Offset  Type    Name
       0  NONE    FISH1                           


STORAGE BLOCKS
    Size  Block
  400028  local
     455  constants




VARIABLES
  Offset    Size  Type        Block           Name
  400008       4  REAL4       local           FE       DT                              
  400004       4  INT4        local           FE       I                               
       4       4  REAL4       local           FE       MNSQVEL                         
  400000       4  INT4        local           FE       STEP                            
       8       4  REAL4       local           FE       T                               
  400016       4  REAL4       local           FE       TFINAL                          
       0       4  REAL4       local           FE       ZOOM                            
     ---       0  NONE        global          FE       _cmpe_fish1_0                   
     ---       0  NONE        global          FE       _cmpe_fish1_0_                  
     ---       0  NONE        global          FE       _cmpe_fish1_1                   
     ---       0  NONE        global          FE       _cmpe_fish1_1_                  
     ---       0  NONE        global          FE       _cmpe_fish1_2                   
     ---       0  NONE        global          FE       _cmpe_fish1_2_                  
     ---       0  NONE        global          FE       _cmpe_fish1_3                   
     ---       0  NONE        global          FE       _cmpe_fish1_3_                  
     ---       0  NONE        global          FE       _cmpe_fish1_4                   
     ---       0  NONE        global          FE       _cmpe_fish1_4_                  
     ---       0  NONE        global          FE       _cmpe_fish1_5                   
     ---       0  NONE        global          FE       _cmpe_fish1_5_                  
     ---       0  NONE        global          FE       _cmpe_fish1_6                   
     ---       0  NONE        global          FE       _cmpe_fish1_6_                  
     ---       0  NONE        not-referenced  FE       fish1                           


ARRAYS
  Offset    Size  Type        Block/Class     Home     Name
  240000   80000  CMPX8       local           CM       ACCEL                           
  320000   40000  REAL4       local           CM       FISHM                           
       0   80000  CMPX8       local           CM       FISHP                           
  360000   40000  REAL4       local           CM       FISHSPEED                       
   80000   80000  CMPX8       local           CM       FISHV                           
  160000   80000  CMPX8       local           CM       FORCE                           


PARAMETERS (Offset is within Storage Block 'constants')
  Offset  Type    Name                            Value
       0  INT4    ARRAY_ARG                       257
       0  INT4    ARRAY_GLOBAL                    513
Fri Jan 27 16:56:22 1995 Connection Machine Fortran Version: 2.1  Source Rev: f2100	page: 4
Symbol Storage Map   File: /usr/castle/share/proj/shortcourse/wator/prob1/cmf/fish1.fcm
       0  INT4    ARRAY_LOCAL                     1025
       0  INT4    CMF_CHARACTER                   8
       0  INT4    CMF_CM200_PARIS                 3
       0  INT4    CMF_CM200_SLICEWISE             4
       0  INT4    CMF_CM2_PARIS                   0
       0  INT4    CMF_CM2_SLICEWISE               1
       0  INT4    CMF_CM5_SPARC                   2
       0  INT4    CMF_CM5_VU                      5
       0  INT4    CMF_CMSIM                       6
       0  INT4    CMF_COMPLEX                     5
       0  INT4    CMF_DOUBLE                      6
       0  INT4    CMF_DOUBLE_COMPLEX              7
       0  INT4    CMF_DOWNWARD                    1001
       0  INT4    CMF_ERROR_ALIGNED_GEOMETRY      3014
       0  INT4    CMF_ERROR_AXIS_ORDER            3002
       0  INT4    CMF_ERROR_BAD_ARGUMENT          3004
       0  INT4    CMF_ERROR_BAD_GEOMETRY          3005
       0  INT4    CMF_ERROR_BAD_OPCODE            3010
       0  INT4    CMF_ERROR_BAD_TYPE              3009
       0  INT4    CMF_ERROR_BOUNDS_VIOLATION      3011
       0  INT4    CMF_ERROR_CANNOT_INTERN         3003
       0  INT4    CMF_ERROR_FE_HOME               3007
       0  INT4    CMF_ERROR_FE_MEMORY             3008
       0  INT4    CMF_ERROR_MASK_MISMATCH         3006
       0  INT4    CMF_ERROR_NO_ALIAS              3013
       0  INT4    CMF_ERROR_NO_AXIS               3012
       0  INT4    CMF_ERROR_NULL_ARRAY            3000
       0  INT4    CMF_ERROR_RUNTIME_LAYER         3015
       0  INT4    CMF_ERROR_SPARSE_MASK           3001
       0  INT4    CMF_EXCLUSIVE                   2000
       0  INT4    CMF_FLOAT                       4
       0  INT4    CMF_INCLUSIVE                   2001
       0  INT4    CMF_LOGICAL                     1
       0  INT4    CMF_LONG_S_INTEGER              12
       0  INT4    CMF_MUTATE_ANY                  4002
       0  INT4    CMF_MUTATE_BEST                 4001
       0  INT4    CMF_MUTATE_SELECT               4000
       0  INT4    CMF_NEWS_ORDER                  0
       0  INT4    CMF_NONE                        3000
       0  INT4    CMF_NULL                        0
       0  INT4    CMF_SEGMENT_BIT                 3001
       0  INT4    CMF_SEND_ORDER                  1
       0  INT4    CMF_SERIAL_ORDER                2
       0  INT4    CMF_SIZEOF_DESCRIPTOR           18
       0  INT4    CMF_START_BIT                   3002
       0  INT4    CMF_S_INTEGER                   3
       0  INT4    CMF_UPWARD                      1000
       0  INT4    CMF_U_INTEGER                   2
       0  INT4    CMSSL_CHARACTER                 6
       0  INT4    CMSSL_COMPLEX                   5
       0  INT4    CMSSL_FLOAT                     4
       0  INT4    CMSSL_LOGICAL                   1
Fri Jan 27 16:56:22 1995 Connection Machine Fortran Version: 2.1  Source Rev: f2100	page: 5
Symbol Storage Map   File: /usr/castle/share/proj/shortcourse/wator/prob1/cmf/fish1.fcm
       0  INT4    CMSSL_S_INTEGER                 3
       0  INT4    CMSSL_U_INTEGER                 2
       0  INT4    DEBUG_DESC                      8
       0  INT4    DISP_INTERVAL                   10
       0  INT4    ERROR_DESC                      4
       0  INT4    HOME_CM                         1
       0  INT4    HOME_CM_ONLY                    3
       0  INT4    HOME_FE                         2
       0  INT4    HOME_FE_ONLY                    4
       9  CMPX8   II                              (0,1)
       2  INT4    M                               256
       0  INT4    MAXCOLORS                       4
       0  INT4    MODIF                           1
       0  INT4    NFISH                           10000
       0  INT4    NOT_MODIF                       0
       0  INT4    OBJECT_DESC                     1
       0  INT4    VIEW_DESC                       2
       0  INT4    _DOUBLE_                        64
       0  INT4    _DOUBLE_COMPLEX_                64
       0  INT4    _DOUBLE_INT_                    64
       0  INT4    _SINGLE_                        32
       0  INT4    _SINGLE_COMPLEX_                32
       0  INT4    _SINGLE_INT_                    32


INTRINSIC PROCEDURES
  Name
  ABS                             
  FLOAT                           
  MAXVAL                          
  MOD                             
  SQRT                            
  SUM                             


STATEMENT FUNCTIONS
  Type    Name


EXTERNALS
  Type    Unit_Kind     Name
  INT4    function      CMF_ALLOCATE_TABLE              
  INT4    function      CMF_ARCHITECTURE                
  LOG4    function      CMF_ARRAY_IS_ALIAS              
  LOG4    function      CMF_ARRAY_IS_ALIGNED            
  INT4    function      CMF_ARRAY_SIZE_QUANTUM          
  INT4    function      CMF_AVAILABLE_MEMORY            
  INT4    function      CMF_GET_ALIAS_SAFETY_LEVEL      
  INT4    function      CMF_GET_AXES_EXTENTS_PTR        
  INT4    function      CMF_GET_AXES_MAPS_PTR           
  INT4    function      CMF_GET_AXIS_EXTENT             
  INT4    function      CMF_GET_AXIS_MAP                
  INT4    function      CMF_GET_DATA_TYPE               
  INT4    function      CMF_GET_DEBUG_INFO_PTR          
Fri Jan 27 16:56:22 1995 Connection Machine Fortran Version: 2.1  Source Rev: f2100	page: 6
Symbol Storage Map   File: /usr/castle/share/proj/shortcourse/wator/prob1/cmf/fish1.fcm
  INT4    function      CMF_GET_DESCRIPTOR_KIND         
  INT4    function      CMF_GET_EXPONENT_LEN            
  INT4    function      CMF_GET_FE_ADDRESS              
  INT4    function      CMF_GET_FIELD_ID                
  INT4    function      CMF_GET_GEOMETRY_AXIS_OFFSET    
  INT4    function      CMF_GET_GEOMETRY_ID             
  INT4    function      CMF_GET_GEOMETRY_OFFSETS_PTR    
  INT4    function      CMF_GET_GEOMETRY_RANK           
  INT4    function      CMF_GET_GLOBAL_LOCATION         
  INT4    function      CMF_GET_HOME                    
  INT4    function      CMF_GET_INTEGER_LEN             
  INT4    function      CMF_GET_IS_MODIFIED             
  INT4    function      CMF_GET_OBJECT_KIND             
  INT4    function      CMF_GET_PHYSICAL_LOCATION       
  INT4    function      CMF_GET_RANK                    
  INT4    function      CMF_GET_SIGNIFICAND_LEN         
  INT4    function      CMF_GET_VP_SET_ID               
  INT4    function      CMF_IS_CM_SPACE_ALLOCATED       
  INT4    function      CMF_IS_FE_SPACE_ALLOCATED       
  INT4    function      CMF_IS_SLICEWISE                
  INT4    function      CMF_NUMBER_OF_PROCESSORS        
  INT4    function      CMF_SIZEOF_ARRAY_ELEMENT        
  INT4    function      CM_NUMBER_OF_TIMERS             
  REAL8   function      CM_TIMER_READ_CM_BUSY           
  REAL8   function      CM_TIMER_READ_CM_IDLE           
  REAL8   function      CM_TIMER_READ_ELAPSED           
  INT4    function      CM_TIMER_READ_RUN_STATE         
  INT4    function      CM_TIMER_READ_STARTS            
  NONE    subroutine    COMPUTE_CURRENT                 
  NONE    subroutine    SHOW_FISH                       


NAME LISTS
  Name


CONSTRUCT NAMES
  Name



COMMUNICATION ROUTINES
  Name                          Line Number (number of times)
  SUM (into scalar)             63
  MAXVAL (into scalar)          65(2)


Fri Jan 27 16:56:22 1995 Connection Machine Fortran Version: 2.1  Source Rev: f2100	page: 7
Source Listing File: /usr/castle/share/proj/shortcourse/wator/prob1/cmf/fish1.fcm
  309    76  0 	
  310    77  0 	      subroutine compute_current(force,fishp)
  311    78  0 	      complex force(:),fishp(:)
  312    79  0 	      complex, parameter :: ii = (0,1) 	
  313    80  0 	CMF$  layout force(:news),fishp(:news)
  314    81  0 	
  315    82  0 	      force = (3,0)*(fishp*ii)/(max(abs(fishp),0.01)) - fishp
  316    83  0 	      end
Fri Jan 27 16:56:22 1995 Connection Machine Fortran Version: 2.1  Source Rev: f2100	page: 8
Symbol Storage Map   File: /usr/castle/share/proj/shortcourse/wator/prob1/cmf/fish1.fcm
ENTRY POINTS
  Offset  Type    Name
       0  NONE    COMPUTE_CURRENT                 


STORAGE BLOCKS
    Size  Block
      64  constants




VARIABLES
  Offset    Size  Type        Block           Name
     ---       0  NONE        global          FE       _cmpe_compute_current_0         
     ---       0  NONE        global          FE       _cmpe_compute_current_0_        
     ---       0  NONE        not-referenced  FE       compute_current                 


ARRAYS
  Offset    Size  Type        Block/Class     Home     Name
     ---     ---  CMPX8       dummy-asu-shape CM       FISHP                           
     ---     ---  CMPX8       dummy-asu-shape CM       FORCE                           


PARAMETERS (Offset is within Storage Block 'constants')
  Offset  Type    Name                            Value
       5  CMPX8   II                              (0,1)
       0  INT4    _DOUBLE_                        64
       0  INT4    _DOUBLE_COMPLEX_                64
       0  INT4    _DOUBLE_INT_                    64
       0  INT4    _SINGLE_                        32
       0  INT4    _SINGLE_COMPLEX_                32
       0  INT4    _SINGLE_INT_                    32


INTRINSIC PROCEDURES
  Name
  ABS                             
  MAX                             


STATEMENT FUNCTIONS
  Type    Name


EXTERNALS
  Type    Unit_Kind     Name


NAME LISTS
  Name


CONSTRUCT NAMES
  Name

Fri Jan 27 16:56:22 1995 Connection Machine Fortran Version: 2.1  Source Rev: f2100	page: 9
Symbol Storage Map   File: /usr/castle/share/proj/shortcourse/wator/prob1/cmf/fish1.fcm


COMMUNICATION ROUTINES
  Name                          Line Number (number of times)
  BLOCKMOVE                     82


Fri Jan 27 16:56:22 1995 Connection Machine Fortran Version: 2.1  Source Rev: f2100	page: 10
Source Listing File: /usr/castle/share/proj/shortcourse/wator/prob1/cmf/fish1.fcm
  318    85  0 	
  319    86  0 	      subroutine show_fish(fishp,nfish,zoom,m)
  320    87  0 	      complex fishp(nfish)
  321    88  0 	      real zoom
  322    89  0 	      integer 	x(nfish), y(nfish), show(m, m)
  323    90  0 	      integer 	j
  324    91  0 	
  325    92  0 	* Scale the coordinates according to the zoom, and shift the origin 
  326    93  0 	      x = INT(( real(fishp)+zoom)/(zoom)*(m/2)) 
  327    94  0 	      y = INT((aimag(fishp)+zoom)/(zoom)*(m/2))
  328    95  0 	      show = 0 
  329    96  0 	      forall(j=1:nfish) show(x(j),y(j)) = 1
  330    97  0 	*
  331    98  0 	* enlarge each pixel for better visibility
  332    99  0 	      show(:,1:m-1) = show(:,1:m-1) + show(:,2:m)
  333   100  0 	      show(1:m-1,:) = show(1:m-1,:) + show(2:m,:)
  334   101  0 	      call display(show,m,m)
  335   102  0 	      end
Fri Jan 27 16:56:22 1995 Connection Machine Fortran Version: 2.1  Source Rev: f2100	page: 11
Symbol Storage Map   File: /usr/castle/share/proj/shortcourse/wator/prob1/cmf/fish1.fcm
ENTRY POINTS
  Offset  Type    Name
       0  NONE    SHOW_FISH                       


STORAGE BLOCKS
    Size  Block
       4  local
      56  constants




VARIABLES
  Offset    Size  Type        Block           Name
       0       4  INT4        local           FE       J                               
     ---       4  INT4        dummy           FE       M                               
     ---       4  INT4        dummy           FE       NFISH                           
     ---       4  REAL4       dummy           FE       ZOOM                            
     ---       0  NONE        global          FE       _cmpe_show_fish_0               
     ---       0  NONE        global          FE       _cmpe_show_fish_0_              
     ---       0  NONE        global          FE       _cmpe_show_fish_1               
     ---       0  NONE        global          FE       _cmpe_show_fish_1_              
     ---       0  NONE        global          FE       _cmpe_show_fish_2               
     ---       0  NONE        global          FE       _cmpe_show_fish_2_              
     ---       0  NONE        not-referenced  FE       show_fish                       


ARRAYS
  Offset    Size  Type        Block/Class     Home     Name
     ---     ---  CMPX8       dummy-adjust    CM       FISHP                           
     ---     ---  INT4        local-automatic CM       SHOW                            
     ---     ---  INT4        local-automatic CM       X                               
     ---     ---  INT4        local-automatic CM       Y                               


PARAMETERS (Offset is within Storage Block 'constants')
  Offset  Type    Name                            Value
       0  INT4    _DOUBLE_                        64
       0  INT4    _DOUBLE_COMPLEX_                64
       0  INT4    _DOUBLE_INT_                    64
       0  INT4    _SINGLE_                        32
       0  INT4    _SINGLE_COMPLEX_                32
       0  INT4    _SINGLE_INT_                    32


INTRINSIC PROCEDURES
  Name
  AIMAG                           
  DLBOUND                         
  INT                             
  REAL                            


STATEMENT FUNCTIONS
Fri Jan 27 16:56:22 1995 Connection Machine Fortran Version: 2.1  Source Rev: f2100	page: 12
Symbol Storage Map   File: /usr/castle/share/proj/shortcourse/wator/prob1/cmf/fish1.fcm
  Type    Name


EXTERNALS
  Type    Unit_Kind     Name
  NONE    subroutine    DISPLAY                         


NAME LISTS
  Name


CONSTRUCT NAMES
  Name



COMMUNICATION ROUTINES
  Name                          Line Number (number of times)
  NEWS                          99, 100
  BLOCKMOVE                     96(2)
  VECTOR SEND                   96


Fri Jan 27 16:56:22 1995 Connection Machine Fortran Version: 2.1  Source Rev: f2100	page: 13
Source Listing File: /usr/castle/share/proj/shortcourse/wator/prob1/cmf/fish1.fcm
Fri Jan 27 16:56:22 1995 Connection Machine Fortran Version: 2.1  Source Rev: f2100	page: 14
Utility Stats
Input File:	/usr/castle/share/proj/shortcourse/wator/prob1/cmf/fish1.fcm
Base File:	fish1
COMMAND QUALIFIERS

	-optimize -dp -extend_source -list fish1.fcm 

	analysis_data
	check = (no bounds,overflow,no underflow )
	continuations = 19
	directives
	extend_source
	f77
	i4
	ifconvert
	level_of_vectorization = 100
	list
	machine_code
	optimize = (local,global,code_motion )
	overlap
	show = (no dictionary,no include,no map,no preprocessor,no single )
	standard = (no syntax,no source,no semantic )
	v104
	warnings = (no declarations,general,no ultrix,no vaxeln )
	postoptimize
	preoptimize
	loadstoremotion
	ucephase
	uaephase
	prcphase
	prsphase
	ucepost
	uaepost
	prcpost
	prspost
	cppost
	complex_lower
	safety = 0
	pnodes = -1
	peephole
	axisreorder
	loopreversal
	dp
	trcback
	skip_garbage
	newforall
	killuselessalloc
	new_modifies
	prc2
	prs2
	redo_modifies
	defer_modifies
	comb_cp
	source_fc
	source_node
	const
	transp
	cp_last
	bb_merge
	meoptimize
	mecopypropagate
	memergetemps
	merepl
	menullallcntx
	mesgsize = 10000
	merge
	amode
	single_complex_opt
	prover = ()
	peschedule
	peschalias
	pe_asm_machine_code
	pe_asm_comments
	pe_asm_srclines
</pre></body></html>