User Tools

Site Tools


hpc:alpgenbuildingnotes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
hpc:alpgenbuildingnotes [2014/01/09 16:38]
jchilders old revision restored (2014/01/09 10:01)
hpc:alpgenbuildingnotes [2014/03/24 13:08] (current)
jchilders
Line 3: Line 3:
 ==== Machine dependent compile time changes ==== ==== Machine dependent compile time changes ====
  
-=== For BG/P ===  
-----  
-For now, use the IBM compiler. That requires ''compile.mk'' 
-to have the following changes 
-<code fortran> 
-ifeq ($(shell uname),Linux) 
-#  FFF = gfortran -fno-automatic 
-#  FF90 = gfortran -fno-automatic 
-  FFF  = mpixlf77  -fno-automatic 
-  FF90 =  mpixlf77  -fno-automatic 
-#FFF = g77 -O1 -Wall -fno-automatic -Wno-globals -fno-backslash \ 
-#        -ffast-math 
-endif 
-</code> 
-Doing a ''make gen'' or ''make gen90'' will fail at the linking stage because it must be linked with the MPI linker, ''mpixlf77''. One needs to do 
-<code bash> 
-mpixlf77  -o wqqgen ./wqqusr.o ../wqqlib/wqq.o \ 
-../alplib/alpgen.o ../alplib/alputi.o ../alplib/alppdf.o \ 
-../alplib/Acp.o ../alplib/Asu3.o ../alplib/Aint.o 
-</code> 
-(or similar) to pass the linking phase. 
  
 ===For BG/Q=== ===For BG/Q===
Line 36: Line 15:
   FFF = mpif77 -fno-automatic   FFF = mpif77 -fno-automatic
   FF90 = mpif90 -fno-automatic   FF90 = mpif90 -fno-automatic
 +# Or if you want optimization use this
 +#  FFF = mpixlf77 -O5 -qarch=qp -qtune=qp -qsave -qsimd=auto -qhot=level=1 -qprefetch -qunroll=yes -qnoipa -qfloat=rsqrt:hssngl:fltint
 +#  FF90 = mpixlf90 -O5 -qarch=qp -qtune=qp -qsave -qsimd=auto -qhot=level=1 -qprefetch -qunroll=yes -qnoipa -qfloat=rsqrt:hssngl:fltint
 #FFF = g77 -O1 -Wall -fno-automatic -Wno-globals -fno-backslash \ #FFF = g77 -O1 -Wall -fno-automatic -Wno-globals -fno-backslash \
 #        -ffast-math #        -ffast-math
Line 73: Line 55:
 ---- ----
  
- +Run \\ 
-module swap PrgEnv-pgi PrgEnv-gnu \\+''module swap PrgEnv-pgi PrgEnv-gnu'' \\
 That requires ''compile.mk'' to have the following changes That requires ''compile.mk'' to have the following changes
 <code make> <code make>
Line 89: Line 71:
 === Edison === === Edison ===
 ---- ----
- +Run \\ 
-module swap PrgEnv-intel PrgEnv-gnu \\+''module swap PrgEnv-intel PrgEnv-gnu'' \\
 That requires ''compile.mk'' to have the following changes That requires ''compile.mk'' to have the following changes
 <code make> <code make>
Line 110: Line 92:
 In subroutine ''alsdef'' in file ''alplib/alpgen.f'' near line 209, just after \\ In subroutine ''alsdef'' in file ''alplib/alpgen.f'' near line 209, just after \\
 ''c common declarations'' \\ ''c common declarations'' \\
-add these lines+add/merge these lines
 <code fortran> <code fortran>
       integer mpirank       integer mpirank
       character*5 rankstring       character*5 rankstring
       common/mpi/mpirank,rankstring       common/mpi/mpirank,rankstring
 +      
 +c local variables
 +      double precision dummy,ranset,ranset2
 +      integer i,retval,chdir
 +c
 </code> </code>
 ---- ----
 Near line 230, just before \\ Near line 230, just before \\
 ''c list processes'' \\ ''c list processes'' \\
-sdd the lines+add the lines
 <code fortran> <code fortran>
 C MPI variables C MPI variables
Line 135: Line 122:
       call MPI_FINALIZE(ierror)       call MPI_FINALIZE(ierror)
       write(6,*) 'MPI finalized: rank ', mpirank       write(6,*) 'MPI finalized: rank ', mpirank
-      write( rankstring, '(i5.5)' )  mpirank +      write( rankstring, '(i8.8)' )  mpirank 
-  work in this threads unique directory +c work in unique directory ./work/rankstring 
-      call chdir('work',retval)+      retval = chdir('work/'//rankstring//CHAR(0))
       if(retval.ne.0) then       if(retval.ne.0) then
-         write(6,*) 'Error changing directory to "work" ' +         write(6,*) 'Error changing directory to "work/rankstring" '
-      endif +
-      call chdir(rankstring,retval) +
-      if(retval.ne.0) then +
-         write(6,*) 'Error changing directory to ',rankstring+
       endif       endif
 c end of MPI block c end of MPI block
Line 164: Line 147:
 In subroutine ''alstio'', just after In subroutine ''alstio'', just after
 <code fortran> <code fortran>
-include 'alpgen.inc'+      include 'alpgen.inc'
 </code> </code>
 (near line 4584) add the lines: (near line 4584) add the lines:
Line 175: Line 158:
 Near line 4588, replace Near line 4588, replace
 <code fortran> <code fortran>
-call alustc(fname,'.wgt',tmpstr)+      call alustc(fname,'.wgt',tmpstr)
 </code> </code>
 with  with 
 <code fortran> <code fortran>
-call alustc('../../'//fname,'.'//rankstring//'.wgt',tmpstr)+      call alustc('../../'//fname,'.'//rankstring//'.wgt',tmpstr)
 </code> </code>
 immediately after immediately after
 <code fortan> <code fortan>
-         write(6,*) 'Run parameters and diagnostics written to '+      write(6,*) 'Run parameters and diagnostics written to '
             ,tmpstr(1:l)             ,tmpstr(1:l)
 </code> </code>
Line 204: Line 187:
 ''READ(9,'' ''READ(9,''
 This ensures everywhere is reading from the input file instead of ''stdin''. Only change this in the ''alplib/alpgen.f'' file. This ensures everywhere is reading from the input file instead of ''stdin''. Only change this in the ''alplib/alpgen.f'' file.
- 
- 
  
hpc/alpgenbuildingnotes.1389285498.txt.gz · Last modified: 2014/01/09 16:38 by jchilders