############################################################# # Illustration of general technique for porting Fortran # code to Cray J90. It is highly recommended that you port # only thoroughly tested codes to minimize the amount of # debugging etc. you need to do on the J90 ############################################################# ############################################################# # All class members should be able to 'rlogin' into 'charon' # via # # % rlogin charon.cc.utexas.edu -l phas761 # # from any of the course machines. E-mail me if you can't. # From your account on einstein, this can be abbreviated to # # % rlogin phas761@charon ############################################################# charon% who am i phas761 ttyp028 Sep 30 11:27 (newton.ph.utexas.edu) charon% pwd /hpcf/u0/ph/as/phas761 ############################################################# # When using this Cray account, work ONLY within your # own sub-directory ############################################################# charon% ls README dfink/ jiwoh/ kurtm/ oleg/ phy329/ achiang/ eburns/ kurt/ lib/ oneko/ smartin/ ############################################################# # 'tdm' example ############################################################# charon% cd ~/phy329/f77/ex7 ############################################################# # Using a separate shell, 'rcp' the files from 'einstein' # to the Cray account. Be very careful so as not to clobber # anyone else's files!! ############################################################# einstein% cd ~phy329/f77/ex7 einstein% ls Makefile dmroutines.f tdm.f einstein% rcp * phas761@charon:~/phy329/f77/ex7 ############################################################# % Back on Cray account ... ############################################################# charon% pwd; ls /hpcf/u0/ph/as/phas761/phy329/f77/ex7 Makefile dmroutines.f tdm.f ############################################################# # Convert the Fortran source files to Cray-compatible form # using 'f77transcray' command (Instructor supplied script). # WARNING: The script may fail if you violate any of the # conventions discussed in class; particularly those having # to do with the specification of real*8 constants! ############################################################# charon% f77transcray usage: f77transcray [ ...] Converts 'canonical' double precision FORTRAN programs written for a 32-bit machine to equivalent Cray FORTRAN. Source code is modified in place, but original source is always saved in '.O' files. charon% f77transcray *.f f77transcray: Translating dmroutines.f f77transcray: Translating tdm.f charon% ls Makefile dmroutines.f.O tdm.f.O dmroutines.f tdm.f ############################################################# # The environment variables needed in the Makefile are # set in '~/.cshrc' ... ############################################################# charon% env | grep F77 F77=cf77 F77FLAGS=-g F77CFLAGS=-c F77LFLAGS=-L/hpcf/u0/ph/as/phas761/lib ############################################################# # Build the application ... (note that the 'p329f' library # lives in phas761's 'lib' directory) ############################################################# charon% make cf77 -g -c tdm.f cf77 -g -c dmroutines.f cf77 -g -L/hpcf/u0/ph/as/phas761/lib tdm.o \ dmroutines.o -lp329f -o tdm ############################################################# # ... and test it. ############################################################# charon% tdm usage: tdm Use 'tdm -' to read from standard input STOP executed at line 60 in Fortran routine 'TDM' CPU: 0.004s, Wallclock: 0.011s, 6.8% of 5-CPU Machine Memory HWM: 383015, Stack HWM: 204161, Stack segment expansions: 0 charon% tdm - 2*2 7., 10., 15., 22. STOP executed at line 52 in Fortran routine 'TDM' CPU: 0.005s, Wallclock: 5.132s Memory HWM: 393256, Stack HWM: 204161, Stack segment expansions: 0