# # Included makefile for Intel ifort compiler on NCAR yellowstone: # F90 = ifort MPIF90 = mpif90 MPIRUN = mpirun.lsf FFLAGS = -g -r8 -heap-arrays DBGFLAGS = -debug full -traceback DBGFLAGS += -check bounds -check format -check output_conversion -check pointers -check uninit # # Makefile will use OPTIM = -g if set debug=TRUE in job script. OPTIM = -O3 # # ESMF lib on yellowstone: the following commands are executed by the ys job script: # source /glade/apps/opt/lmod/lmod/init/tcsh # module add esmf esmf-6.1.1-ncdfio-mpi-O # export ESMF_LIBDIR LIB_ESMF = $(ESMF_LIBDIR) include $(LIB_ESMF)/esmf.mk LIBS = -L$(LIB_ESMF) -Wl,-rpath=$(LIB_ESMF) -lesmf HOST = $(shell hostname) # # Make machines.ini file for MPI execution: # prereq: machines.ini mpirun.command machines.ini: export HN=$(HOST) machines.ini: export NP=$(NPROC) machines.ini: FORCE @echo "Making machines.ini.." @echo `hostname` > machines.ini @awk 'BEGIN{ for (i=2; i <= ENVIRON["NP"]; i++) print ENVIRON["HN"] }' >> machines.ini mpirun.command: FORCE @echo "Making mpirun.command: MPIRUN=$(MPIRUN)" @echo $(MPIRUN) > mpirun.command FORCE: # # TIMEGCM only: gw_drag.F and pdedif.F need special flags: # gw_drag.o: gw_drag.F $(FC) -c $(FFLAGS) -free $<