Skip to content

Commit

Permalink
Add 521.wrf_r and patch its memory-leak and fix its symbol conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
junjie1475 committed May 27, 2023
1 parent 3220b11 commit 674b4f5
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Spec2017.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@
);
MACOSX_DEPLOYMENT_TARGET = 12.6;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = junjie1475.Spec2017;
PRODUCT_BUNDLE_IDENTIFIER = junjie1475.Spec2017.com;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = auto;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
Expand Down Expand Up @@ -401,7 +401,7 @@
);
MACOSX_DEPLOYMENT_TARGET = 12.6;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = junjie1475.Spec2017;
PRODUCT_BUNDLE_IDENTIFIER = junjie1475.Spec2017.com;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = auto;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
Expand Down
1 change: 1 addition & 0 deletions Spec2017/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ struct ContentView: View {
"510.parest_r",
"511.povray_r",
"519.lbm_r",
"521.wrf_r",
"527.cam4_r",
"526.blender_r",
"538.imagick_r",
Expand Down
1 change: 1 addition & 0 deletions Spec2017/ResultView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ struct ResultView: View {
"510.parest_r": 2615,
"511.povray_r": 2334,
"519.lbm_r": 1026,
"521.wrf_r": 2239,
"526.blender_r": 1521,
"527.cam4_r": 1748,
"538.imagick_r": 2486,
Expand Down
Binary file modified fortran_lib/libFortranRuntime.a
Binary file not shown.
Binary file added specbin/Floating-Point/divdc3.o
Binary file not shown.
Binary file added specbin/Floating-Point/divsc3.o
Binary file not shown.
Binary file modified specbin/Floating-Point/wrf.o
Binary file not shown.
18 changes: 18 additions & 0 deletions specbin/Floating-Point/wrf_warrper.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#define NAME_WITH_PREFIX_AND_REVISION(prefix, revision, name) \
prefix##revision##name
#define RTNAME(name) NAME_WITH_PREFIX_AND_REVISION(_Fortran, A, name)
struct EnvironmentDefaultList;
void RTNAME(ProgramStart)(
int, const char *[], const char *[], const struct EnvironmentDefaultList *);
void RTNAME(ByteswapOption)(void); // -byteswapio
/* main entry into PROGRAM */
void _QQmain_wrf(void);

extern const struct EnvironmentDefaultList *_QQEnvironmentDefaults;

/* C main stub */
int wrf_entry(int argc, const char *argv[], const char *envp[]) {
RTNAME(ProgramStart)(argc, argv, envp, _QQEnvironmentDefaults);
_QQmain_wrf();
return 0;
}
2 changes: 1 addition & 1 deletion specbin/makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
OBJ = Integer/perlbench.o Integer/exchange2.o Integer/xz.o Integer/leela_r.o Integer/deepsjeng.o Integer/x264.o Integer/omnetpp.o Integer/ldecode.o Integer/mcf.o Integer/xalancbmk.o Integer/gcc.o Floating-Point/nab.o Floating-Point/blender.o Floating-Point/bwaves.o Floating-Point/lbm.o Floating-Point/fotonik3d.o Floating-Point/roms.o Floating-Point/parest.o Floating-Point/povray_r.o Floating-Point/imagick.o Floating-Point/cactusBSSN.o Floating-Point/namd.o Floating-Point/cam4.o warp.o specEntry.o
OBJ = Integer/perlbench.o Integer/exchange2.o Integer/xz.o Integer/leela_r.o Integer/deepsjeng.o Integer/x264.o Integer/omnetpp.o Integer/ldecode.o Integer/mcf.o Integer/xalancbmk.o Integer/gcc.o Floating-Point/nab.o Floating-Point/blender.o Floating-Point/bwaves.o Floating-Point/lbm.o Floating-Point/fotonik3d.o Floating-Point/roms.o Floating-Point/parest.o Floating-Point/povray_r.o Floating-Point/imagick.o Floating-Point/cactusBSSN.o Floating-Point/namd.o Floating-Point/cam4.o warp.o specEntry.o Floating-Point/wrf.o Floating-Point/divdc3.o Floating-Point/divsc3.o

CC = $(shell xcrun --sdk iphoneos --find clang)
LIB = $(shell xcrun --sdk iphoneos --show-sdk-path)
Expand Down
7 changes: 5 additions & 2 deletions specbin/specEntry.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ f(namd, );
f(parest, );
f(povray, );
f(lbm, );
f(wrf, );
f(blender, );
f(cam4, );
f(imagick, );
Expand Down Expand Up @@ -87,6 +88,7 @@ static char commandLine[][6][300] = {
[510] = { "./parest_r ref.prm" },
[511] = { "./povray_r SPEC-benchmark-ref.ini" },
[519] = { "./lbm_r 3000 reference.dat 0 0 100_100_130_ldc.of" },
[521] = { "./wrf" },
[526] = { "./blender_r sh3_no_char.blend --render-output sh3_no_char_ --threads 1 -b -F RAWTGA -s 849 -e 849 -a" },
[527] = { "./cam4" },
[538] = { "./imagick -limit disk 0 refrate_input.tga -edge 41 -resample 181% -emboss 31 -colorspace YUV -mean-shift 19x19+15% -resize 30% refrate_output.tga" },
Expand All @@ -112,6 +114,7 @@ entry_t (*function_mapping[]) = {
[510] = 0,
[511] = 0,
[519] = 0,
[521] = 0,
[526] = 0,
[527] = 0,
[538] = 0,
Expand Down Expand Up @@ -142,7 +145,7 @@ void init() {
function_mapping[507] = cactusBSSN_entry;
function_mapping[508] = namd_entry;
function_mapping[510] = parest_entry;
function_mapping[511] = povray_entry;
function_mapping[521] = wrf_entry;
function_mapping[519] = lbm_entry;
function_mapping[526] = blender_entry;
function_mapping[527] = cam4_entry;
Expand Down Expand Up @@ -181,7 +184,7 @@ void specEntry(const char* benchname, double results[2]) {
}
while(commandLine[bench][count][0]) { count ++; }

if(bench == 500 || bench == 502 || bench == 531 || bench == 557 || bench == 527) __warp = true;
if(bench == 500 || bench == 502 || bench == 531 || bench == 557 || bench == 521 || bench == 527) __warp = true;
else __warp = false;
if(bench == 500) __init(); // For 500.perlbench we only need to clean up once.
for(int j = 0; j < count; j++) {
Expand Down

0 comments on commit 674b4f5

Please sign in to comment.