Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resourecs: Update make.def to make is.D.x for x86 image #58

Open
wants to merge 4 commits into
base: stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/npb-24.04-imgs/arm-npb.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ build {
destination = "/home/gem5/"
}

provisioner "file" {
source = "make-files/ARM/make.def"
destination = "/home/gem5/NPB3.4-OMP/config/"
}

provisioner "shell" {
execute_command = "echo '${var.ssh_password}' | {{ .Vars }} sudo -E -S bash '{{ .Path }}'"
scripts = ["scripts/post-installation.sh"]
Expand Down
168 changes: 168 additions & 0 deletions src/npb-24.04-imgs/make-files/x86/make.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
#---------------------------------------------------------------------------
#
# SITE- AND/OR PLATFORM-SPECIFIC DEFINITIONS.
#
#---------------------------------------------------------------------------

#---------------------------------------------------------------------------
# This config is specific for gem5.
#---------------------------------------------------------------------------


#---------------------------------------------------------------------------
# Items in this file will need to be changed for each platform.
#---------------------------------------------------------------------------

#---------------------------------------------------------------------------
# Parallel Fortran:
#
# For CG, EP, FT, MG, LU, SP, BT and UA, which are in Fortran, the following
# must be defined:
#
# FC - Fortran compiler
# FFLAGS - Fortran compilation arguments
# F_INC - any -I arguments required for compiling Fortran
# FLINK - Fortran linker
# FLINKFLAGS - Fortran linker arguments
# F_LIB - any -L and -l arguments required for linking Fortran
#
# compilations are done with $(FC) $(F_INC) $(FFLAGS) or
# $(FC) $(FFLAGS)
# linking is done with $(FLINK) $(F_LIB) $(FLINKFLAGS)
#---------------------------------------------------------------------------

#---------------------------------------------------------------------------
# This is the fortran compiler used for Fortran programs
#---------------------------------------------------------------------------
FC = gfortran
# This links fortran programs; usually the same as ${FC}
FLINK = $(FC)

#---------------------------------------------------------------------------
# These macros are passed to the linker
#---------------------------------------------------------------------------
F_LIB = -lm5 -lm

#---------------------------------------------------------------------------
# These macros are passed to the compiler
#---------------------------------------------------------------------------
F_INC =

#---------------------------------------------------------------------------
# Global *compile time* flags for Fortran programs
#---------------------------------------------------------------------------
FFLAGS = -O3 -fopenmp -cpp -no-pie -DM5_ANNOTATION

#---------------------------------------------------------------------------
# Global *link time* flags. Flags for increasing maximum executable
# size usually go here.
#---------------------------------------------------------------------------
# Using no-pie here as m5 is compiled with the no-pie flash and cant no be build
# as a position independent executable.
FLINKFLAGS = -O3 -fopenmp -no-pie


#---------------------------------------------------------------------------
# Parallel C:
#
# For IS and DC, which are in C, the following must be defined:
#
# CC - C compiler
# CFLAGS - C compilation arguments
# C_INC - any -I arguments required for compiling C
# CLINK - C linker
# CLINKFLAGS - C linker flags
# C_LIB - any -L and -l arguments required for linking C
#
# compilations are done with $(CC) $(C_INC) $(CFLAGS) or
# $(CC) $(CFLAGS)
# linking is done with $(CLINK) $(C_LIB) $(CLINKFLAGS)
#---------------------------------------------------------------------------

#---------------------------------------------------------------------------
# This is the C compiler used for C programs
#---------------------------------------------------------------------------
CC = gcc
# This links C programs; usually the same as ${CC}
CLINK = $(CC)

#---------------------------------------------------------------------------
# These macros are passed to the linker
#---------------------------------------------------------------------------
C_LIB = -lm5 -lm

#---------------------------------------------------------------------------
# These macros are passed to the compiler
#---------------------------------------------------------------------------
C_INC =

#---------------------------------------------------------------------------
# Global *compile time* flags for C programs
# DC inspects the following flags (preceded by "-D"):
#
# IN_CORE - computes all views and checksums in main memory (if there is
# enough memory)
#
# VIEW_FILE_OUTPUT - forces DC to write the generated views to disk
#
# OPTIMIZATION - turns on some nonstandard DC optimizations
#
# _FILE_OFFSET_BITS=64
# _LARGEFILE64_SOURCE - are standard compiler flags which allow to work with
# files larger than 2GB.
#---------------------------------------------------------------------------
CFLAGS = -O3 -fopenmp -mcmodel=medium -no-pie -DM5_ANNOTATION

#---------------------------------------------------------------------------
# Global *link time* flags. Flags for increasing maximum executable
# size usually go here.
#---------------------------------------------------------------------------
# Using no-pie here as m5 is compiled with the no-pie flash and cant no be build
# as a position independent executable.
CLINKFLAGS = -O3 -fopenmp -no-pie


#---------------------------------------------------------------------------
# Utilities C:
#
# This is the C compiler used to compile C utilities. Flags required by
# this compiler go here also; typically there are few flags required; hence
# there are no separate macros provided for such flags.
#---------------------------------------------------------------------------
UCC = gcc


#---------------------------------------------------------------------------
# Destination of executables, relative to subdirs of the main directory. .
#---------------------------------------------------------------------------
BINDIR = ../bin


#---------------------------------------------------------------------------
# The variable RAND controls which random number generator
# is used. It is described in detail in README.install.
# Use "randi8" unless there is a reason to use another one.
# Other allowed values are "randi8_safe", "randdp" and "randdpvec"
#---------------------------------------------------------------------------
RAND = randi8
# The following is highly reliable but may be slow:
# RAND = randdp


#---------------------------------------------------------------------------
# The variable WTIME is the name of the wtime source code module in the
# common directory.
# For most machines, use wtime.c
# For SGI power challenge: use wtime_sgi64.c
#---------------------------------------------------------------------------
WTIME = wtime.c


#---------------------------------------------------------------------------
# Enable if either Cray (not Cray-X1) or IBM:
# (no such flag for most machines: see common/wtime.h)
# This is used by the C compiler to pass the machine name to common/wtime.h,
# where the C/Fortran binding interface format is determined
#---------------------------------------------------------------------------
# MACHINE = -DCRAY
# MACHINE = -DIBM
6 changes: 6 additions & 0 deletions src/npb-24.04-imgs/x86-npb.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ build {
source = "npb-with-roi/NPB/NPB3.4-OMP"
destination = "/home/gem5/"
}

provisioner "file" {
source = "make-files/x86/make.def"
Harshil2107 marked this conversation as resolved.
Show resolved Hide resolved
destination = "/home/gem5/NPB3.4-OMP/config/"
}

provisioner "shell" {
execute_command = "echo '${var.ssh_password}' | {{ .Vars }} sudo -E -S bash '{{ .Path }}'"
scripts = ["scripts/post-installation.sh"]
Expand Down