# # SCC system default MPI_COMPILER is gnu (option: pgi) # SCC system default MPI_IMPLEMENTATION is OpenMPI (no other options at present) # the mpif77, mpicc, amd mpiCC are generic scripts that depends # on the system default for MPI_COMPILER and MPI_IMPLEMENTATION # Example of linking PGI to the MPI scripts: # scc1% setenv MPI_COMPILER pgi # Kadin Tseng, June 23, 2008 # Modified November 22, 2013 ##### User configurable options ##### ROOT = OPTFLAGS = -O3 CC = $(ROOT)mpicc $(OPTFLAGS) CCC = $(ROOT)mpiCC $(OPTFLAGS) F77 = $(ROOT)mpif77 $(OPTFLAGS) F90 = $(ROOT)mpif90 $(OPTFLAGS) CLINKER = $(ROOT)mpicc $(OPTFLAGS) CCLINKER = $(ROOT)mpiCC $(OPTFLAGS) FLINKER = $(ROOT)mpif77 $(OPTFLAGS) F90LINKER = $(ROOT)mpif90 $(OPTFLAGS) MAKE = make SHELL = /bin/sh # ### End User configurable options ### CFLAGS = FFLAGS = LIBS = -lm LIBS = FLIBS = EXECS = example1 example1_1 example1_2 example1_3 example1_4 \ example1_5 example1_52 default: $(EXECS) all: $(EXECS) example1: pgf77 -o $@ $(OPTFLAGS) example1.f $(LIBS) example1_1: example1_1.o $(F77) -o $@ example1_1.o $(LIBS) example1_2: example1_2.o $(F77) -o $@ example1_2.o $(LIBS) example1_3: example1_3.o $(F77) -o $@ example1_3.o $(LIBS) example1_4: example1_4.o $(F77) -o $@ example1_4.o $(LIBS) example1_5: example1_5.o $(F77) -o $@ example1_5.o $(LIBS) # to demo redirection of standard I/O to files with # scc1 % mpirun -np 4 < myinput > myoutput example1_52: example1_52.o $(F77) -o $@ example1_52.o $(LIBS) clean: /bin/rm -f *.o *.mod *~ fort.4* $(EXECS) .c.o: $(CC) $(CFLAGS) -c $*.c .C.o: $(CCC) $(CFLAGS) -c $*.C .f.o: $(F77) $(FFLAGS) -c $*.f .f90.o: $(F90) $(FFLAGS) -c $*.f90 .SUFFIXES: .f90 .c .C