├── .github └── workflows │ └── test-build.yml ├── .gitignore ├── .travis.yml ├── CHANGELOG ├── COPYING ├── COPYING.LESSER ├── Dockerfile ├── INSTALL.md ├── Makefile.am ├── README.md ├── THANKS ├── autoconf └── tap-driver.sh ├── autogen.sh ├── cere ├── configure.ac ├── doc ├── Makefile.am ├── cere-capture.1.md ├── cere-check-matching.1.md ├── cere-configure.1.md ├── cere-flag.1.md ├── cere-hybrid.1.md ├── cere-instrument.1.md ├── cere-plugin-instr.1.md ├── cere-profile.1.md ├── cere-regions.1.md ├── cere-replay.1.md ├── cere-report.1.md ├── cere-select-ilp.1.md ├── cere-select-max-cov.1.md ├── cere-selectinv.1.md ├── cere-trace.1.md ├── cere-tutorial.1.md ├── images │ └── graph_.pdf └── index.txt ├── examples ├── NPB3.0-SER │ ├── BT │ │ ├── Makefile │ │ ├── add.f │ │ ├── adi.f │ │ ├── bt.f │ │ ├── error.f │ │ ├── exact_rhs.f │ │ ├── exact_solution.f │ │ ├── header.h │ │ ├── initialize.f │ │ ├── inputbt.data.sample │ │ ├── rhs.f │ │ ├── set_constants.f │ │ ├── verify.f │ │ ├── x_solve.f │ │ ├── y_solve.f │ │ └── z_solve.f │ ├── CG │ │ ├── Makefile │ │ ├── README.carefully │ │ ├── cg.f │ │ └── globals.h │ ├── EP │ │ ├── Makefile │ │ ├── README │ │ └── ep.f │ ├── FT │ │ ├── Makefile │ │ ├── appft.f │ │ ├── auxfnct.f │ │ ├── fft3d.f │ │ ├── global.h │ │ ├── mainft.f │ │ └── verify.f │ ├── IS │ │ ├── Makefile │ │ ├── README.carefully │ │ └── is.c │ ├── LU-hp │ │ ├── Makefile │ │ ├── applu.incl │ │ ├── blts.f │ │ ├── buts.f │ │ ├── calcnp.f │ │ ├── domain.f │ │ ├── erhs.f │ │ ├── error.f │ │ ├── exact.f │ │ ├── inputlu.data.sample │ │ ├── jacld.f │ │ ├── jacu.f │ │ ├── l2norm.f │ │ ├── lu.f │ │ ├── pintgr.f │ │ ├── read_input.f │ │ ├── rhs.f │ │ ├── setbv.f │ │ ├── setcoeff.f │ │ ├── setiv.f │ │ ├── ssor.f │ │ ├── ver2 │ │ │ ├── blts.f │ │ │ ├── buts.f │ │ │ ├── calcnp.f │ │ │ ├── jacld.f │ │ │ ├── jacu.f │ │ │ └── ssor.f │ │ └── verify.f │ ├── LU │ │ ├── Makefile │ │ ├── applu.incl │ │ ├── blts.f │ │ ├── buts.f │ │ ├── domain.f │ │ ├── erhs.f │ │ ├── error.f │ │ ├── exact.f │ │ ├── inputlu.data.sample │ │ ├── jacld.f │ │ ├── jacu.f │ │ ├── l2norm.f │ │ ├── lu.f │ │ ├── pintgr.f │ │ ├── read_input.f │ │ ├── rhs.f │ │ ├── setbv.f │ │ ├── setcoeff.f │ │ ├── setiv.f │ │ ├── ssor.f │ │ └── verify.f │ ├── MG │ │ ├── Makefile │ │ ├── README │ │ ├── globals.h │ │ ├── mg.f │ │ └── mg.input.sample │ ├── Makefile │ ├── README │ ├── SP │ │ ├── Makefile │ │ ├── add.f │ │ ├── adi.f │ │ ├── error.f │ │ ├── exact_rhs.f │ │ ├── exact_solution.f │ │ ├── header.h │ │ ├── initialize.f │ │ ├── inputsp.data.sample │ │ ├── ninvr.f │ │ ├── pinvr.f │ │ ├── rhs.f │ │ ├── set_constants.f │ │ ├── sp.f │ │ ├── txinvr.f │ │ ├── tzetar.f │ │ ├── verify.f │ │ ├── x_solve.f │ │ ├── y_solve.f │ │ └── z_solve.f │ ├── bin │ │ └── .gitignore │ ├── common │ │ ├── c_print_results.c │ │ ├── c_timers.c │ │ ├── print_results.f │ │ ├── randdp.f │ │ ├── randdpvec.f │ │ ├── randi8.f │ │ ├── randi8_safe.f │ │ ├── timers.f │ │ ├── wtime.c │ │ ├── wtime.f │ │ ├── wtime.h │ │ └── wtime_sgi64.c │ ├── config │ │ ├── NAS.samples │ │ │ ├── README │ │ │ ├── make.def.dec_alpha │ │ │ ├── make.def.kai │ │ │ ├── make.def.sp2_babbage │ │ │ ├── make.def_ibm │ │ │ ├── make.def_ibm64 │ │ │ ├── make.def_pgi │ │ │ ├── make.def_sgi │ │ │ ├── make.def_sgi64 │ │ │ ├── make.def_sun │ │ │ ├── make.def_sun64 │ │ │ ├── suite.def.bt │ │ │ ├── suite.def.cg │ │ │ ├── suite.def.ep │ │ │ ├── suite.def.ft │ │ │ ├── suite.def.is │ │ │ ├── suite.def.lu │ │ │ ├── suite.def.mg │ │ │ ├── suite.def.small │ │ │ └── suite.def.sp │ │ ├── make.def │ │ ├── make.def.template │ │ └── suite.def.template │ ├── run-bench.sh │ └── sys │ │ ├── Makefile │ │ ├── README │ │ ├── make.common │ │ ├── print_header │ │ ├── print_instructions │ │ └── setparams.c └── flags.csv ├── m4 ├── .gitignore ├── ax_compare_version.m4 ├── ax_llvm.m4 └── ax_python_module.m4 ├── src ├── .gitignore ├── GlobalRename │ ├── GlobalRename.cpp │ └── Makefile.am ├── Makefile.am ├── RegionDump │ ├── LoopRegionDump.cpp │ ├── Makefile.am │ ├── OmpRegionDump.cpp │ ├── RegionDump.cpp │ └── RegionDump.h ├── RegionInstrumentation │ ├── LoopRegionInstrumentation.cpp │ ├── Makefile.am │ ├── OmpRegionInstrumentation.cpp │ ├── RegionInstrumentation.cpp │ └── RegionInstrumentation.h ├── RegionOutliner │ ├── LoopRegionOutliner.cpp │ ├── Makefile.am │ ├── OmpRegionOutliner.cpp │ ├── RegionExtractor.cpp │ └── RegionExtractor.h ├── RegionReplay │ ├── LoopRegionReplay.cpp │ ├── Makefile.am │ ├── OmpRegionReplay.cpp │ ├── RegionReplay.cpp │ └── RegionReplay.h ├── ccan │ ├── Makefile.am │ ├── ccan │ │ ├── build_assert │ │ │ ├── LICENSE │ │ │ └── build_assert.h │ │ ├── compiler │ │ │ ├── LICENSE │ │ │ └── compiler.h │ │ ├── hash │ │ │ ├── LICENSE │ │ │ ├── hash.c │ │ │ └── hash.h │ │ └── htable │ │ │ ├── LICENSE │ │ │ ├── htable.c │ │ │ ├── htable.h │ │ │ └── htable_type.h │ └── licenses │ │ ├── CC0 │ │ └── LGPL-2.1 ├── cere │ ├── Report.js │ ├── __init__.py │ ├── __main__.py │ ├── cere_capture.py │ ├── cere_check_matching.py │ ├── cere_configure.py │ ├── cere_flag.py │ ├── cere_hybrid.py │ ├── cere_instrument.py │ ├── cere_profile.py │ ├── cere_regions.py │ ├── cere_replay.py │ ├── cere_report.py │ ├── cere_sanity_check.py │ ├── cere_select_ilp.py │ ├── cere_select_max_cov.py │ ├── cere_selectinv.py │ ├── cere_trace.py │ ├── compiler_frontend.py │ ├── compress.py │ ├── create_graph.py │ ├── errors.py │ ├── granularity.py │ ├── graph_error.py │ ├── graph_utils.py │ ├── ilp_update_graph.py │ ├── lec.py │ ├── lel.py │ ├── max_cov_update_graph.py │ ├── regions_selector.py │ ├── template.html │ ├── template_realmain.c │ ├── utils.py │ └── vars.py.in.in ├── cerec ├── cerec++ ├── ceref ├── memory_dump │ ├── Makefile.am │ ├── cere_tracer.c │ ├── debug.h │ ├── pages.h │ ├── ptrace.c │ ├── ptrace.h │ ├── replay.c │ ├── tracee.c │ ├── tracee.h │ ├── tracee_hooks.c │ ├── tracee_interface.c │ ├── tracee_interface.h │ ├── tracer_interface.c │ ├── tracer_interface.h │ ├── tracer_mem.c │ ├── tracer_mem.h │ └── types.h └── rdtsc │ ├── Makefile.am │ ├── rdtsc.c │ ├── rdtsc.h │ ├── rdtsc_wrapper.c │ └── test.c ├── tests ├── Makefile.am ├── _test_UI_Hybrid │ ├── c_print_results.c │ ├── c_timers.c │ ├── is.c │ ├── make.def │ ├── npbparams.h │ ├── test.sh │ ├── wtime.c │ └── wtime.h ├── long_01 │ ├── Makefile │ ├── Makefile.defaults │ ├── blocksort.c │ ├── bzip2.c │ ├── bzlib.c │ ├── bzlib.h │ ├── bzlib_private.h │ ├── compress.c │ ├── crctable.c │ ├── decompress.c │ ├── dryer.jpg │ ├── huffman.c │ ├── randtable.c │ ├── spec.c │ ├── spec.h │ └── test.sh ├── source.sh ├── test.sh ├── test_01 │ ├── Makefile │ ├── test.c │ └── test.sh ├── test_02 │ ├── Makefile │ ├── add.f │ ├── adi.f │ ├── bt.f │ ├── error.f │ ├── exact_rhs.f │ ├── exact_solution.f │ ├── fortran_test │ ├── header.h │ ├── initialize.f │ ├── inputbt.data.sample │ ├── make.def │ ├── npbparams.h │ ├── print_results.f │ ├── rhs.f │ ├── set_constants.f │ ├── test.sh │ ├── timers.f │ ├── verif │ ├── verify.f │ ├── wtime.c │ ├── wtime.h │ ├── x_solve.f │ ├── y_solve.f │ └── z_solve.f ├── test_03 │ ├── Makefile │ ├── c_print_results.c │ ├── c_timers.c │ ├── is.c │ ├── make.def │ ├── npbparams.h │ ├── test.sh │ ├── verif │ ├── wtime.c │ └── wtime.h ├── test_04 │ ├── Makefile │ ├── add.f │ ├── adi.f │ ├── bt.f │ ├── error.f │ ├── exact_rhs.f │ ├── exact_solution.f │ ├── fortran_test │ ├── header.h │ ├── initialize.f │ ├── inputbt.data.sample │ ├── make.def │ ├── npbparams.h │ ├── print_results.f │ ├── rhs.f │ ├── set_constants.f │ ├── test.sh │ ├── timers.f │ ├── verify.f │ ├── wtime.c │ ├── wtime.h │ ├── x_solve.f │ ├── y_solve.f │ └── z_solve.f ├── test_05 │ ├── Makefile │ ├── c_print_results.c │ ├── c_timers.c │ ├── is.c │ ├── make.def │ ├── npbparams.h │ ├── test.sh │ ├── wtime.c │ └── wtime.h ├── test_06 │ ├── Makefile │ ├── appft.f │ ├── auxfnct.f │ ├── fft3d.f │ ├── fortran_test │ ├── global.h │ ├── mainft.f │ ├── make.def │ ├── npbparams.h │ ├── print_results.f │ ├── randi8.f │ ├── test.sh │ ├── timers.f │ ├── verify.f │ ├── wtime.c │ └── wtime.h ├── test_07 │ ├── 3dview.c │ ├── 3dview.h │ ├── Makefile │ ├── Makefile.defaults │ ├── Makefile.deps │ ├── Makefile.spec │ ├── atomprop.c │ ├── atomprop.h │ ├── bin │ │ └── specpp │ ├── binio.c │ ├── binio.h │ ├── block_tx.c │ ├── block_tx.h │ ├── bondf.h │ ├── bondfree.c │ ├── buffer.c │ ├── buffer.h │ ├── bytes.pm │ ├── calcgrid.c │ ├── calcgrid.h │ ├── calch.c │ ├── calch.h │ ├── calcmu.c │ ├── calcmu.h │ ├── calcvir.c │ ├── callf77.h │ ├── clincs.c │ ├── comlib.c │ ├── comlib.h │ ├── config.h │ ├── confio.c │ ├── confio.h │ ├── constr.c │ ├── constr.h │ ├── copyrite.c │ ├── copyrite.h │ ├── coupling.c │ ├── csettle.c │ ├── detectcpu.h │ ├── disre.c │ ├── disre.h │ ├── do_fit.c │ ├── do_fit.h │ ├── do_gct.c │ ├── dummies.c │ ├── dummies.h │ ├── ebin.c │ ├── ebin.h │ ├── edsam.c │ ├── edsam.h │ ├── enxio.c │ ├── enxio.h │ ├── ewald.c │ ├── ewald.h │ ├── ewald_util.c │ ├── ewald_util.h │ ├── f77_wrappers.c │ ├── fatal.c │ ├── fatal.h │ ├── ffscanf.c │ ├── ffscanf.h │ ├── fftgrid.c │ ├── fftgrid.h │ ├── fftw_wrapper.h │ ├── filenm.c │ ├── filenm.h │ ├── flincs.f │ ├── flincsd.f │ ├── fnbf.c │ ├── force.c │ ├── force.h │ ├── fortran_test │ ├── fsettle.F │ ├── fsettled.F │ ├── fshake.f │ ├── fshaked.f │ ├── futil.c │ ├── futil.h │ ├── gbutil.c │ ├── gctio.c │ ├── genalg.c │ ├── genalg.h │ ├── ghat.c │ ├── glaasje.c │ ├── glaasje.h │ ├── gmx_system_xdr.c │ ├── gmx_system_xdr.h │ ├── gmxcomplex.h │ ├── gmxfio.c │ ├── gmxfio.h │ ├── gromacs.tpr │ ├── gstat.h │ ├── ifunc.c │ ├── index.c │ ├── index.h │ ├── init.c │ ├── init_sh.c │ ├── inner.h │ ├── innerc.c │ ├── innerf.f │ ├── invblock.c │ ├── invblock.h │ ├── ionize.c │ ├── ionize.h │ ├── libxdrf.c │ ├── macros.c │ ├── macros.h │ ├── main.c │ ├── main.h │ ├── maths.c │ ├── maths.h │ ├── matio.c │ ├── matio.h │ ├── md.c │ ├── mdatom.c │ ├── mdatoms.h │ ├── mdebin.c │ ├── mdebin.h │ ├── mdrun.c │ ├── mdrun.h │ ├── memdump.c │ ├── memdump.h │ ├── minimize.c │ ├── mshift.c │ ├── mshift.h │ ├── mvdata.c │ ├── mvdata.h │ ├── mvxvf.c │ ├── names.c │ ├── names.h │ ├── network.c │ ├── network.h │ ├── nrama.c │ ├── nrama.h │ ├── nrjac.c │ ├── nrjac.h │ ├── nrnb.c │ ├── nrnb.h │ ├── ns.c │ ├── ns.h │ ├── nsb.c │ ├── nsb.h │ ├── nsgrid.c │ ├── nsgrid.h │ ├── orires.c │ ├── orires.h │ ├── pargs.c │ ├── pbc.c │ ├── pbc.h │ ├── pdbio.c │ ├── pdbio.h │ ├── physics.h │ ├── pme.c │ ├── pme.h │ ├── poisson.c │ ├── poisson.h │ ├── pppm.c │ ├── pppm.h │ ├── princ.c │ ├── princ.h │ ├── psgather.c │ ├── pssolve.c │ ├── psspread.c │ ├── pull.c │ ├── pull.h │ ├── pull_internal.h │ ├── pullinit.c │ ├── pullio.c │ ├── pullutil.c │ ├── rando.c │ ├── random.c │ ├── random.h │ ├── rbin.c │ ├── rbin.h │ ├── rdgroup.c │ ├── rdgroup.h │ ├── readinp.c │ ├── readinp.h │ ├── relax_sh.c │ ├── replace.c │ ├── replace.h │ ├── rmpbc.c │ ├── rmpbc.h │ ├── shakef.c │ ├── shift_util.c │ ├── shift_util.h │ ├── sim_util.c │ ├── sim_util.h │ ├── smalloc.c │ ├── smalloc.h │ ├── sortwater.c │ ├── sortwater.h │ ├── splittop.c │ ├── splittop.h │ ├── stat.c │ ├── statutil.c │ ├── statutil.h │ ├── strdb.c │ ├── strdb.h │ ├── strict.pm │ ├── string2.c │ ├── string2.h │ ├── symtab.c │ ├── symtab.h │ ├── synclib.c │ ├── synclib.h │ ├── sysstuff.h │ ├── tables.c │ ├── tags.h │ ├── test.sh │ ├── tgroup.c │ ├── tgroup.h │ ├── tpxio.c │ ├── tpxio.h │ ├── trnio.c │ ├── trnio.h │ ├── trxio.c │ ├── txtdump.c │ ├── txtdump.h │ ├── typedefs.c │ ├── typedefs.h │ ├── types │ │ ├── atoms.h │ │ ├── block.h │ │ ├── commrec.h │ │ ├── edsams.h │ │ ├── energy.h │ │ ├── enums.h │ │ ├── fcdata.h │ │ ├── filenm.h │ │ ├── forcerec.h │ │ ├── graph.h │ │ ├── group.h │ │ ├── idef.h │ │ ├── ifunc.h │ │ ├── inputrec.h │ │ ├── ishift.h │ │ ├── matrix.h │ │ ├── mdatom.h │ │ ├── nblist.h │ │ ├── nrnb.h │ │ ├── nsborder.h │ │ ├── nsgrid.h │ │ ├── parm.h │ │ ├── simple.h │ │ ├── symtab.h │ │ ├── topology.h │ │ └── trx.h │ ├── update.c │ ├── update.h │ ├── vcm.c │ ├── vcm.h │ ├── vec.c │ ├── vec.h │ ├── verif │ ├── viewit.c │ ├── viewit.h │ ├── vveclib.h │ ├── wgms.c │ ├── wgms.h │ ├── wman.c │ ├── wman.h │ ├── wnblist.c │ ├── wnblist.h │ ├── writeps.c │ ├── writeps.h │ ├── xdrd.c │ ├── xdrf.h │ ├── xmdrun.h │ ├── xtcio.c │ ├── xtcio.h │ ├── xutils.c │ ├── xvgr.c │ └── xvgr.h ├── test_08 │ ├── Makefile │ ├── Makefile.defaults │ ├── Makefile.deps │ ├── Makefile.spec │ ├── advx1.f │ ├── advx2.f │ ├── advx3.f │ ├── avisc.f │ ├── avisc_d.f │ ├── bin │ │ └── specpp │ ├── blast.f │ ├── bndyflgs.f │ ├── bval3d.f │ ├── bvalemf.f │ ├── bytes.pm │ ├── ct.f │ ├── dataio.f │ ├── diverg.f │ ├── empty.f │ ├── findno.f │ ├── forces.f │ ├── forces_d.f │ ├── fort.1 │ ├── fortran_test │ ├── fourn.f │ ├── ggen.f │ ├── gpbv.f │ ├── grdv.f │ ├── hdfall.f │ ├── hsmoc.f │ ├── intchk.f │ ├── linpck.f │ ├── lorentz.f │ ├── lorentz_d.f │ ├── maxmin.f │ ├── mnmx.f │ ├── momx1.f │ ├── momx2.f │ ├── momx3.f │ ├── movie.f │ ├── msave.f │ ├── mstart.f │ ├── newdt.f │ ├── newgrid.f │ ├── newvg.f │ ├── newx1.f │ ├── newx2.f │ ├── nudt.f │ ├── pablo.f │ ├── pdv.f │ ├── pdv_d.f │ ├── pressure.f │ ├── printd.f │ ├── restart.f │ ├── setup.f │ ├── spenergy.f │ ├── srcstep.f │ ├── strict.pm │ ├── strtoi.f │ ├── test.sh │ ├── textdmp.f │ ├── transprt.f │ ├── tranx1.f │ ├── tranx2.f │ ├── tranx3.f │ ├── tslice.f │ ├── zeusmp.F │ └── zmp_inp ├── test_09 │ ├── Makefile │ ├── Makefile.defaults │ ├── Makefile.deps │ ├── Makefile.spec │ ├── block_solver.f │ ├── bwaves.in │ ├── flow_lam.f │ ├── flux_lam.f │ ├── fortran_test │ ├── jacobian_lam.f │ ├── shell_lam.f │ └── test.sh ├── test_10 │ ├── Makefile │ ├── test.c │ └── test.sh ├── test_11 │ ├── 100_100_130_ldc.of │ ├── Makefile │ ├── Makefile.defaults │ ├── Makefile.deps │ ├── Makefile.spec │ ├── config.h │ ├── lbm.c │ ├── lbm.h │ ├── lbm.in │ ├── lbm_1d_array.h │ ├── main.c │ ├── main.h │ └── test.sh ├── test_12 │ ├── Makefile │ ├── Makefile.defaults │ ├── Makefile.deps │ ├── Makefile.spec │ ├── fort.99 │ ├── fortran_test │ ├── les3d_data.hmd │ ├── leslie3d.in │ ├── test.sh │ └── tml.f ├── test_13 │ ├── Makefile │ ├── iter.R │ ├── test.c │ └── test.sh ├── test_14 │ ├── Makefile │ ├── iter.R │ ├── test.c │ └── test.sh ├── test_15 │ ├── Makefile │ ├── iter.R │ ├── test.c │ └── test.sh ├── test_16 │ ├── .cere │ │ └── traces │ │ │ ├── __cere__randi8_vranlc__69.bin │ │ │ └── __cere__randi8_vranlc__69.csv │ └── test.sh ├── test_Omp_Blackscholes │ ├── Makefile │ ├── blackscholes.m4.cpp │ ├── in_64K.txt │ └── test.sh ├── test_Omp_Capture_Replay │ ├── Makefile │ ├── test.c │ └── test.sh ├── test_Omp_Instrument │ ├── Makefile │ ├── reg │ ├── test.c │ └── test.sh ├── test_Remove_Graph_Cycles │ ├── test.py │ └── test.sh ├── test_UI_Capture_Repr │ ├── .cere │ │ ├── io_traces │ │ │ └── __cere__rhs_compute_rhs__59 │ │ │ │ ├── 1 │ │ │ │ └── __cere__rhs_compute_rhs__59 │ │ │ │ ├── 2 │ │ │ │ └── __cere__rhs_compute_rhs__59 │ │ │ │ └── 4 │ │ │ │ └── __cere__rhs_compute_rhs__59 │ │ └── traces │ │ │ ├── __cere__rhs_compute_rhs__59.bin │ │ │ ├── __cere__rhs_compute_rhs__59.csv │ │ │ └── __cere__rhs_compute_rhs__59.invocations │ ├── Makefile │ ├── add.f │ ├── adi.f │ ├── bt.f │ ├── error.f │ ├── exact_rhs.f │ ├── exact_solution.f │ ├── fortran_test │ ├── header.h │ ├── initialize.f │ ├── inputbt.data.sample │ ├── make.def │ ├── npbparams.h │ ├── print_results.f │ ├── rhs.f │ ├── set_constants.f │ ├── test.sh │ ├── timers.f │ ├── verify.f │ ├── wtime.c │ ├── wtime.h │ ├── x_solve.f │ ├── y_solve.f │ └── z_solve.f ├── test_UI_Cluster │ ├── Makefile │ ├── appft.f │ ├── auxfnct.f │ ├── fft3d.f │ ├── fortran_test │ ├── global.h │ ├── loops │ ├── mainft.f │ ├── make.def │ ├── npbparams.h │ ├── print_results.f │ ├── randi8.f │ ├── test.sh │ ├── timers.f │ ├── verify.f │ ├── wtime.c │ └── wtime.h ├── test_UI_Configure │ └── test.sh ├── test_UI_Dump │ ├── Makefile │ ├── c_print_results.c │ ├── c_timers.c │ ├── is.c │ ├── make.def │ ├── npbparams.h │ ├── test.sh │ ├── wtime.c │ └── wtime.h ├── test_UI_Flags │ ├── .cere │ │ ├── dumps │ │ │ └── __cere__fft3d_swarztrauber__27 │ │ │ │ └── 2818 │ │ │ │ ├── 000000408000.memdump │ │ │ │ ├── 000000609000.memdump │ │ │ │ ├── 00000061b000.memdump │ │ │ │ ├── 00000062b000.memdump │ │ │ │ ├── 000000a1e000.memdump │ │ │ │ ├── 000000a2e000.memdump │ │ │ │ ├── 0000020e1000.memdump │ │ │ │ ├── 0000020e4000.memdump │ │ │ │ ├── 0000020e6000.memdump │ │ │ │ ├── 7f4ca495a000.memdump │ │ │ │ ├── 7f4ca495d000.memdump │ │ │ │ ├── 7f4ca4d69000.memdump │ │ │ │ ├── 7f4ca620e000.memdump │ │ │ │ ├── 7ffe8ae52000.memdump │ │ │ │ ├── 7ffe8aed3000.memdump │ │ │ │ ├── 7ffe8aed7000.memdump │ │ │ │ ├── core.map │ │ │ │ ├── hotpages.map │ │ │ │ ├── lel_bin │ │ │ │ ├── static.names │ │ │ │ └── static.sym │ │ ├── profile │ │ │ ├── graph_.dot │ │ │ └── graph_.pkl │ │ └── traces │ │ │ ├── __cere__fft3d_swarztrauber__27.bin │ │ │ ├── __cere__fft3d_swarztrauber__27.csv │ │ │ └── __cere__fft3d_swarztrauber__27.invocations │ ├── Makefile │ ├── appft.f │ ├── auxfnct.f │ ├── cere.json │ ├── fft3d.f │ ├── fortran_test │ ├── global.h │ ├── mainft.f │ ├── make.def │ ├── npbparams.h │ ├── print_results.f │ ├── randi8.f │ ├── small_seq_1.csv │ ├── test.sh │ ├── timers.f │ ├── verify.f │ ├── wtime.c │ └── wtime.h ├── test_UI_Measure │ ├── fortran_test │ └── test.sh ├── test_UI_Profile │ ├── Makefile │ ├── c_print_results.c │ ├── c_timers.c │ ├── is.c │ ├── make.def │ ├── npbparams.h │ ├── test.py │ ├── test.sh │ ├── wtime.c │ └── wtime.h ├── test_UI_Regions │ ├── .cere │ │ └── profile │ │ │ └── app.prof │ ├── Makefile │ ├── appft.f │ ├── auxfnct.f │ ├── fft3d.f │ ├── fortran_test │ ├── global.h │ ├── mainft.f │ ├── make.def │ ├── npbparams.h │ ├── print_results.f │ ├── randi8.f │ ├── test.sh │ ├── timers.f │ ├── verify.f │ ├── wtime.c │ └── wtime.h ├── test_UI_Replay │ ├── Makefile │ ├── Makefile.defaults │ ├── Makefile.deps │ ├── Makefile.spec │ ├── block_solver.f │ ├── bwaves.in │ ├── flow_lam.f │ ├── flux_lam.f │ ├── fortran_test │ ├── jacobian_lam.f │ ├── shell_lam.f │ └── test.sh ├── test_UI_Replay_Repr │ ├── .cere │ │ ├── dumps │ │ │ └── __cere__rhs_compute_rhs__59 │ │ │ │ ├── 1 │ │ │ │ ├── 00000061d000.memdump │ │ │ │ ├── 000000629000.memdump │ │ │ │ ├── 00000064f000.memdump │ │ │ │ ├── 000000652000.memdump │ │ │ │ ├── 0000009d1000.memdump │ │ │ │ ├── 0000009d7000.memdump │ │ │ │ ├── 7f30ef18f000.memdump │ │ │ │ ├── 7f30ef192000.memdump │ │ │ │ ├── 7f30ef59e000.memdump │ │ │ │ ├── 7f30f073f000.memdump │ │ │ │ ├── 7fff0ebb9000.memdump │ │ │ │ ├── 7fff0ec3a000.memdump │ │ │ │ ├── core.map │ │ │ │ ├── hotpages.map │ │ │ │ ├── lel_bin │ │ │ │ └── static.names │ │ │ │ ├── 2 │ │ │ │ ├── 00000061d000.memdump │ │ │ │ ├── 000000ae7000.memdump │ │ │ │ ├── 000000aed000.memdump │ │ │ │ ├── 7f78e8376000.memdump │ │ │ │ ├── 7f78e8379000.memdump │ │ │ │ ├── 7f78e8785000.memdump │ │ │ │ ├── 7f78e9926000.memdump │ │ │ │ ├── 7ffd9158f000.memdump │ │ │ │ ├── 7ffd91610000.memdump │ │ │ │ ├── 7ffd91614000.memdump │ │ │ │ ├── core.map │ │ │ │ ├── hotpages.map │ │ │ │ ├── lel_bin │ │ │ │ └── static.names │ │ │ │ └── 4 │ │ │ │ ├── 00000061d000.memdump │ │ │ │ ├── 000000774000.memdump │ │ │ │ ├── 00000077a000.memdump │ │ │ │ ├── 7f4c566c2000.memdump │ │ │ │ ├── 7f4c566c5000.memdump │ │ │ │ ├── 7f4c56ad1000.memdump │ │ │ │ ├── 7f4c57c72000.memdump │ │ │ │ ├── 7ffeb7d9c000.memdump │ │ │ │ ├── 7ffeb7e1b000.memdump │ │ │ │ ├── 7ffeb7e20000.memdump │ │ │ │ ├── core.map │ │ │ │ ├── hotpages.map │ │ │ │ ├── lel_bin │ │ │ │ └── static.names │ │ ├── io_traces │ │ │ └── __cere__rhs_compute_rhs__59 │ │ │ │ ├── 1 │ │ │ │ └── __cere__rhs_compute_rhs__59 │ │ │ │ ├── 2 │ │ │ │ └── __cere__rhs_compute_rhs__59 │ │ │ │ └── 4 │ │ │ │ └── __cere__rhs_compute_rhs__59 │ │ └── traces │ │ │ ├── __cere__rhs_compute_rhs__59.bin │ │ │ ├── __cere__rhs_compute_rhs__59.csv │ │ │ └── __cere__rhs_compute_rhs__59.invocations │ ├── Makefile │ ├── add.f │ ├── adi.f │ ├── bt.f │ ├── error.f │ ├── exact_rhs.f │ ├── exact_solution.f │ ├── fortran_test │ ├── header.h │ ├── initialize.f │ ├── inputbt.data.sample │ ├── make.def │ ├── npbparams.h │ ├── print_results.f │ ├── rhs.f │ ├── set_constants.f │ ├── test.sh │ ├── timers.f │ ├── verify.f │ ├── wtime.c │ ├── wtime.h │ ├── x_solve.f │ ├── y_solve.f │ └── z_solve.f ├── test_check_io │ ├── Makefile │ ├── test.c │ └── test.sh ├── test_pthread │ ├── Makefile │ ├── test.c │ └── test.sh └── testplan.test └── tools └── check-code.sh /.gitignore: -------------------------------------------------------------------------------- 1 | **/*.o 2 | **/*.a 3 | **/*.so 4 | **/*.ll 5 | **/*.pyc 6 | **/*.mod 7 | **/.* 8 | **/*~ 9 | **/#* 10 | **/.DS_Store 11 | **/Makefile 12 | *.in 13 | verificarlo 14 | configure 15 | autom4te.cache 16 | stamp-h1 17 | config.h 18 | config.log 19 | config.status 20 | aclocal.m4 21 | autoconf 22 | libtool 23 | m4/libtool.m4 24 | m4/ltoptions.m4 25 | m4/ltsugar.m4 26 | m4/ltversion.m4 27 | m4/lt~obsolete.m4 28 | !.github 29 | tests/*/*.log 30 | tests/*/*.b 31 | testllvm.c 32 | src/memory_dump/cere-tracer 33 | doc/html/*.html 34 | doc/man1/*.1 35 | tests/testplan.log 36 | tests/testplan.trs 37 | src/cere/vars.py 38 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS=src/ tests/ doc/ 2 | ACLOCAL_AMFLAGS=-I m4 3 | EXTRA_DIST=examples/ 4 | dist_bin_SCRIPTS=cere 5 | -------------------------------------------------------------------------------- /THANKS: -------------------------------------------------------------------------------- 1 | Many people have contributed to CERE by reporting problems, suggesting various 2 | improvements or writing actual code. Here is a list of these people: 3 | 4 | https://github.com/benchmark-subsetting/cere/graphs/contributors 5 | 6 | Chadi Akel 7 | Yohan Chatelain 8 | Aurelien Delval 9 | Florent Conti 10 | Pablo de Oliveira Castro 11 | Eric Petit 12 | Mihail Popov 13 | David C. Wong 14 | Neko1990 15 | Rayhana Ziara 16 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | autoreconf -is 3 | -------------------------------------------------------------------------------- /cere: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | exec python -m cere "$@" 3 | -------------------------------------------------------------------------------- /doc/Makefile.am: -------------------------------------------------------------------------------- 1 | RONN_FLAGS=\ 2 | --manual="CERE manual" \ 3 | --organization="Université de Versailles St-Quentin-en-Yvelines" 4 | 5 | man_MANS = man1/cere-configure.1 man1/cere-profile.1 man1/cere-capture.1 man1/cere-tutorial.1 man1/cere-replay.1 man1/cere-regions.1 man1/cere-trace.1 man1/cere-selectinv.1 man1/cere-instrument.1 \ 6 | man1/cere-check-matching.1 man1/cere-report.1 man1/cere-select-ilp.1 man1/cere-select-max-cov.1 man1/cere-plugin-instr.1 man1/cere-hybrid.1 man1/cere-flag.1 7 | doc_DATA = html/cere-configure.1.html html/cere-profile.1.html html/cere-capture.1.html html/cere-tutorial.1.html html/cere-replay.1.html html/cere-regions.1.html html/cere-trace.1.html html/cere-selectinv.1.html \ 8 | html/cere-instrument.1.html html/cere-check-matching.1.html html/cere-report.1.html html/cere-select-ilp.1.html html/cere-select-max-cov.1.html html/cere-plugin-instr.1.html \ 9 | html/cere-hybrid.1.html html/cere-flag.1.html 10 | 11 | man1/%.1: %.1.md 12 | mkdir -p man1 13 | $(RONN) $(RONN_FLAGS) --pipe -r $< > $@ 14 | 15 | html/%.1.html: %.1.md 16 | mkdir -p html 17 | $(RONN) $(RONN_FLAGS) --pipe -5 $< > $@ 18 | 19 | clean-local: 20 | rm -rf html man1 21 | 22 | EXTRA_DIST=\ 23 | cere-configure.1.md \ 24 | cere-profile.1.md \ 25 | cere-capture.1.md \ 26 | cere-tutorial.1.md \ 27 | cere-replay.1.md \ 28 | cere-regions.1.md \ 29 | cere-trace.1.md \ 30 | cere-selectinv.1.md \ 31 | cere-instrument.1.md \ 32 | cere-check-matching.1.md \ 33 | cere-report.1.md \ 34 | cere-select-ilp.1.md \ 35 | cere-select-max-cov.1.md \ 36 | cere-plugin-instr.1.md \ 37 | cere-hybrid.1.md \ 38 | cere-flag.1.md 39 | -------------------------------------------------------------------------------- /doc/cere-regions.1.md: -------------------------------------------------------------------------------- 1 | cere regions(1) -- List extractible regions 2 | ================================================================== 3 | 4 | ## SYNOPSIS 5 | 6 | ``` 7 | cere regions [-h] [--static] 8 | ``` 9 | 10 | ## DESCRIPTION 11 | 12 | **cere regions** list extractible regions. To achieve this all regions are 13 | outlined at compilation time and listed in the file **regions.csv**. this file 14 | contains for each region, informations such as the file and the function from 15 | where the region is outlined, the start line and coverage measures. To get regions 16 | coverage, you must first run **cere profile**. If you don't need coverage 17 | informations use **cere regions --static** 18 | 19 | ## OPTIONS 20 | 21 | * `-h`: 22 | Prints a synopsis and a list of the most commonly used options. 23 | 24 | * `--static`: 25 | With the **static** flag, all regions are outlined and listed but the binary 26 | is not executed. So keep in mind that a region may not be extractible as it 27 | is not necessarily executed. Also coverage informations are not available. 28 | 29 | ## OUTPUT FILES 30 | 31 | * `regions.csv`: 32 | File containing for each region, the region name, region location, and 33 | coverage informations. 34 | 35 | ## COPYRIGHT 36 | 37 | cere is Copyright (C) 2014-2015 Université de Versailles St-Quentin-en-Yvelines 38 | 39 | ## SEE ALSO 40 | 41 | cere-profile(1) 42 | -------------------------------------------------------------------------------- /doc/cere-report.1.md: -------------------------------------------------------------------------------- 1 | cere report(1) -- Generates an html summary of regions matching error 2 | ===================================================================== 3 | 4 | ## SYNOPSIS 5 | 6 | ``` 7 | cere report [-h] [--path PATH] 8 | ``` 9 | 10 | ## DESCRIPTION 11 | 12 | **cere report** creates an html summary that shows regions call tree, regions 13 | matching, regions source code, invocations clustering for each region, the 14 | percentage of execution time covered by matching codelets and a graph to show 15 | the coverage you could reach versus the maximum tolerated error. **cere report** 16 | can be used after calling cere-select-ilp(1) or cere-select-max-cov(1). 17 | 18 | ## OPTIONS 19 | 20 | * `-h`: 21 | Prints a synopsis and a list of the most commonly used options. 22 | 23 | * `--path PATH`: 24 | The path of the application to report. Default is the current folder. 25 | 26 | ## OUTPUT FILES 27 | 28 | * `PATH.html`: 29 | The html report. 30 | 31 | ## COPYRIGHT 32 | 33 | cere is Copyright (C) 2014-2015 Université de Versailles St-Quentin-en-Yvelines 34 | 35 | ## SEE ALSO 36 | 37 | cere-select-ilp(1) cere-select-max-cov(1) 38 | -------------------------------------------------------------------------------- /doc/cere-select-ilp.1.md: -------------------------------------------------------------------------------- 1 | cere check-select-ilp(1) -- Automatic regions selector 2 | ======================================================== 3 | 4 | ## SYNOPSIS 5 | 6 | ``` 7 | cere select-ilp [-h] [--max-error MAX_ERROR] [--min-coverage MIN_COVERAGE] 8 | [--force] 9 | ``` 10 | 11 | ## DESCRIPTION 12 | 13 | **cere select-ilp** automatically selects the best set of matching regions to 14 | provide a good-enough application coverage while minimizing the replay 15 | cost. **cere select-ilp** calls cere-check-matching(1) on all regions, and selects 16 | among the matching ones the best set of codelets. The optimization problem is 17 | formulated as an Integer Linear Programming problem. cere-profile(1) must be 18 | executed before running **cere select-ilp**. cere-report(1) can be then used to 19 | visualize the selection summary. 20 | 21 | ## OPTIONS 22 | 23 | * `-h`: 24 | Prints a synopsis and a list of the most commonly used options. 25 | 26 | * `--max-error MAX_ERROR`: 27 | If the error between original and replay execution time is lower or equal than 28 | MAX_ERROR, then the region is matching. The default MAX_ERROR value is 15% 29 | 30 | * `--min-coverage MIN_COVERAGE`: 31 | The region minimum coverage value for being selected. By default, this value 32 | is 1%. 33 | 34 | ## COPYRIGHT 35 | 36 | cere is Copyright (C) 2014-2015 Université de Versailles St-Quentin-en-Yvelines 37 | 38 | ## SEE ALSO 39 | 40 | cere-configure(1) cere-profile(1) cere-report(1) cere-select-max-cov(1) 41 | -------------------------------------------------------------------------------- /doc/cere-select-max-cov.1.md: -------------------------------------------------------------------------------- 1 | cere check-select-max-cov(1) -- Automatic regions selector 2 | ========================================================== 3 | 4 | ## SYNOPSIS 5 | 6 | ``` 7 | cere select-max-cov [-h] [--max-error MAX_ERROR] [--min-coverage MIN_COVERAGE] 8 | [--force] 9 | ``` 10 | 11 | ## DESCRIPTION 12 | 13 | **cere select-max-cov** automatically selects the best set of matching regions to 14 | maximize the application coverage regardless of the replay cost. cere-profile(1) 15 | must be executed before running **cere select-max-cov**. cere-report(1) can be 16 | then used to visualize the selection summary. 17 | 18 | ## OPTIONS 19 | 20 | * `-h`: 21 | Prints a synopsis and a list of the most commonly used options. 22 | 23 | * `--max-error MAX_ERROR`: 24 | If the error between original and replay execution time is lower or equal than 25 | MAX_ERROR, then the region is matching. The default MAX_ERROR value is 15% 26 | 27 | * `--min-coverage MIN_COVERAGE`: 28 | The region minimum coverage value for being selected. By default, this value 29 | is 1%. 30 | 31 | ## COPYRIGHT 32 | 33 | cere is Copyright (C) 2014-2015 Université de Versailles St-Quentin-en-Yvelines 34 | 35 | ## SEE ALSO 36 | 37 | cere-configure(1) cere-profile(1) cere-report(1) cere-select-ilp(1) 38 | -------------------------------------------------------------------------------- /doc/images/graph_.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/doc/images/graph_.pdf -------------------------------------------------------------------------------- /doc/index.txt: -------------------------------------------------------------------------------- 1 | # CERE Manual 2 | cere-configure(1) cere-configure.1.ronn 3 | cere-trace(1) cere-trace.1.ronn 4 | cere-capture(1) cere-capture.1.ronn 5 | cere-regions(1) cere-regions.1.ronn 6 | cere-replay(1) cere-replay.1.ronn 7 | cere-report(1) cere-report.1.ronn 8 | cere-plugin-instr(1) cere-plugin-instr.1.ronn 9 | cere-selectinv(1) cere-selectinv.1.ronn 10 | cere-instrument(1) cere-instrument.1.ronn 11 | cere-check-matching(1) cere-check-matching.1.ronn 12 | cere-report(1) cere-report.1.ronn 13 | cere-select-ilp(1) cere-select-ilp.1.ronn 14 | cere-select-max-cov(1) cere-select-max-cov.1.ronn 15 | cere-plugin-instr(1) cere-plugin-instr.1.ronn 16 | cere-profile(1) cere-profile.1.ronn 17 | cere-hybrid(1) cere-hybrid.1.ronn 18 | cere-flag(1) cere-flag.1.ronn 19 | 20 | # External links 21 | atexit(3) http://man.cx/atexit(3) 22 | google-pprof(1) http://man.cx/google-pprof(1) 23 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/BT/add.f: -------------------------------------------------------------------------------- 1 | c--------------------------------------------------------------------- 2 | c--------------------------------------------------------------------- 3 | 4 | subroutine add 5 | 6 | c--------------------------------------------------------------------- 7 | c--------------------------------------------------------------------- 8 | 9 | c--------------------------------------------------------------------- 10 | c addition of update to the vector u 11 | c--------------------------------------------------------------------- 12 | 13 | include 'header.h' 14 | 15 | integer i, j, k, m 16 | 17 | if (timeron) call timer_start(t_add) 18 | do k = 1, grid_points(3)-2 19 | do j = 1, grid_points(2)-2 20 | do i = 1, grid_points(1)-2 21 | do m = 1, 5 22 | u(m,i,j,k) = u(m,i,j,k) + rhs(m,i,j,k) 23 | enddo 24 | enddo 25 | enddo 26 | enddo 27 | if (timeron) call timer_stop(t_add) 28 | 29 | return 30 | end 31 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/BT/adi.f: -------------------------------------------------------------------------------- 1 | c--------------------------------------------------------------------- 2 | c--------------------------------------------------------------------- 3 | 4 | subroutine adi 5 | 6 | c--------------------------------------------------------------------- 7 | c--------------------------------------------------------------------- 8 | 9 | call compute_rhs 10 | 11 | call x_solve 12 | 13 | call y_solve 14 | 15 | call z_solve 16 | 17 | call add 18 | 19 | return 20 | end 21 | 22 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/BT/exact_solution.f: -------------------------------------------------------------------------------- 1 | c--------------------------------------------------------------------- 2 | c--------------------------------------------------------------------- 3 | 4 | subroutine exact_solution(xi,eta,zeta,dtemp) 5 | 6 | c--------------------------------------------------------------------- 7 | c--------------------------------------------------------------------- 8 | 9 | c--------------------------------------------------------------------- 10 | c this function returns the exact solution at point xi, eta, zeta 11 | c--------------------------------------------------------------------- 12 | 13 | include 'header.h' 14 | 15 | double precision xi, eta, zeta, dtemp(5) 16 | integer m 17 | 18 | do m = 1, 5 19 | dtemp(m) = ce(m,1) + 20 | > xi*(ce(m,2) + xi*(ce(m,5) + xi*(ce(m,8) + xi*ce(m,11)))) + 21 | > eta*(ce(m,3) + eta*(ce(m,6) + eta*(ce(m,9) + eta*ce(m,12))))+ 22 | > zeta*(ce(m,4) + zeta*(ce(m,7) + zeta*(ce(m,10) + 23 | > zeta*ce(m,13)))) 24 | enddo 25 | 26 | return 27 | end 28 | 29 | 30 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/BT/inputbt.data.sample: -------------------------------------------------------------------------------- 1 | 60 number of time steps 2 | 0.01d0 dt for class A = 0.0008d0. class B = 0.0003d0 class C = 0.0001d0 3 | 12 12 12 4 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/CG/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | BENCHMARK=cg 3 | BENCHMARKU=CG 4 | 5 | include ../config/make.def 6 | 7 | OBJS = cg.o ${COMMON}/print_results.o \ 8 | ${COMMON}/${RAND}.o ${COMMON}/timers.o ${COMMON}/wtime.o 9 | 10 | include ../sys/make.common 11 | 12 | ${PROGRAM}: config ${OBJS} 13 | ${FLINK} ${FLINKFLAGS} -o ${PROGRAM} ${OBJS} ${F_LIB} 14 | 15 | cg.o: cg.f globals.h npbparams.h 16 | ${FCOMPILE} cg.f 17 | 18 | clean: 19 | - rm -f *.o *~ 20 | - rm -f npbparams.h core 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/CG/README.carefully: -------------------------------------------------------------------------------- 1 | Note: please observe that in the routine conj_grad three 2 | implementations of the sparse matrix-vector multiply have 3 | been supplied. The default matrix-vector multiply is not 4 | loop unrolled. The alternate implementations are unrolled 5 | to a depth of 2 and unrolled to a depth of 8. Please 6 | experiment with these to find the fastest for your particular 7 | architecture. If reporting timing results, any of these three may 8 | be used without penalty. 9 | 10 | Performance examples: 11 | The non-unrolled version of the multiply is actually (slightly: 12 | maybe %5) faster on the sp2-66MHz-WN on 16 nodes than is the 13 | unrolled-by-2 version below. On the Cray t3d, the reverse is true, 14 | i.e., the unrolled-by-two version is some 10% faster. 15 | The unrolled-by-8 version below is significantly faster 16 | on the Cray t3d - overall speed of code is 1.5 times faster. 17 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/EP/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | BENCHMARK=ep 3 | BENCHMARKU=EP 4 | 5 | include ../config/make.def 6 | 7 | OBJS = ep.o ${COMMON}/print_results.o ${COMMON}/${RAND}.o \ 8 | ${COMMON}/timers.o ${COMMON}/wtime.o 9 | 10 | include ../sys/make.common 11 | 12 | ${PROGRAM}: config ${OBJS} 13 | ${FLINK} ${FLINKFLAGS} -o ${PROGRAM} ${OBJS} ${F_LIB} 14 | 15 | 16 | ep.o: ep.f npbparams.h 17 | ${FCOMPILE} ep.f 18 | 19 | clean: 20 | - rm -f *.o *~ 21 | - rm -f npbparams.h core 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/EP/README: -------------------------------------------------------------------------------- 1 | This code implements the random-number generator described in the 2 | NAS Parallel Benchmark document RNR Technical Report RNR-94-007. 3 | The code is "embarrassingly" parallel in that no communication is 4 | required for the generation of the random numbers itself. 5 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/FT/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | BENCHMARK=ft 3 | BENCHMARKU=FT 4 | 5 | include ../config/make.def 6 | 7 | include ../sys/make.common 8 | 9 | OBJS = appft.o auxfnct.o fft3d.o mainft.o verify.o \ 10 | ${COMMON}/${RAND}.o ${COMMON}/print_results.o \ 11 | ${COMMON}/timers.o ${COMMON}/wtime.o 12 | 13 | ${PROGRAM}: config ${OBJS} 14 | ${FLINK} ${FLINKFLAGS} -o ${PROGRAM} ${OBJS} ${F_LIB} 15 | 16 | 17 | 18 | .f.o: 19 | ${FCOMPILE} $< 20 | 21 | appft.o: appft.f global.h npbparams.h 22 | auxfnct.o: auxfnct.f global.h npbparams.h 23 | fft3d.o: fft3d.f global.h npbparams.h 24 | mainft.o: mainft.f global.h npbparams.h 25 | verify.o: verify.f global.h npbparams.h 26 | 27 | clean: 28 | - rm -f *.o *~ mputil* 29 | - rm -f ft npbparams.h core 30 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/FT/global.h: -------------------------------------------------------------------------------- 1 | include 'npbparams.h' 2 | 3 | c Cache blocking params. These values are good for most 4 | c RISC processors. 5 | c FFT parameters: 6 | c fftblock controls how many ffts are done at a time. 7 | c The default is appropriate for most cache-based machines 8 | c On vector machines, the FFT can be vectorized with vector 9 | c length equal to the block size, so the block size should 10 | c be as large as possible. This is the size of the smallest 11 | c dimension of the problem: 128 for class A, 256 for class B and 12 | c 512 for class C. 13 | 14 | integer fftblock_default, fftblockpad_default, 15 | & CacheSize,BlockMax 16 | parameter (fftblock_default=16, 17 | & fftblockpad_default=18, 18 | & CacheSize=8192, 19 | & BlockMax=32) 20 | 21 | integer fftblock, fftblockpad 22 | common /blockinfo/ fftblock, fftblockpad 23 | 24 | external timer_read 25 | double precision timer_read 26 | external ilog2 27 | integer ilog2 28 | 29 | external randlc 30 | double precision randlc 31 | 32 | double complex plane((BlockMax+1)*maxdim),pad(128), 33 | & scr(BlockMax+1,maxdim) 34 | common /workarr/ plane,pad,scr 35 | 36 | double precision seed, a, pi, alpha 37 | parameter (seed = 314159265.d0, a = 1220703125.d0, 38 | . pi = 3.141592653589793238d0, alpha=1.0d-6) 39 | 40 | c for checksum data 41 | double complex sums(0:niter_default) 42 | common /sumcomm/ sums 43 | 44 | logical timers_enabled 45 | common /timerscomm/ timers_enabled 46 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/IS/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | BENCHMARK=is 3 | BENCHMARKU=IS 4 | 5 | include ../config/make.def 6 | 7 | include ../sys/make.common 8 | 9 | OBJS = is.o \ 10 | ${COMMON}/c_print_results.o \ 11 | ${COMMON}/c_timers.o \ 12 | ${COMMON}/c_wtime.o 13 | 14 | 15 | ${PROGRAM}: config ${OBJS} 16 | ${CLINK} ${CLINKFLAGS} -o ${PROGRAM} ${OBJS} ${C_LIB} 17 | 18 | .c.o: 19 | ${CCOMPILE} $< 20 | 21 | is.o: is.c npbparams.h 22 | 23 | 24 | clean: 25 | - rm -f *.o *~ mputil* 26 | - rm -f npbparams.h core 27 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/LU-hp/calcnp.f: -------------------------------------------------------------------------------- 1 | c--------------------------------------------------------------------- 2 | c--------------------------------------------------------------------- 3 | 4 | subroutine calcnp(lst, lend, np, indxp, jndxp) 5 | 6 | c--------------------------------------------------------------------- 7 | c Calculate available indices on each 'hyper-plane' 8 | c for the use with lower- and upper-triangular solvers. 9 | c--------------------------------------------------------------------- 10 | 11 | implicit none 12 | 13 | include 'applu.incl' 14 | 15 | integer lst, lend, np(*) 16 | integer indxp(isiz1*isiz2*3/4,*), 17 | > jndxp(isiz1*isiz2*3/4,*) 18 | integer i, j, k, l, n 19 | 20 | do l = lst, lend 21 | n = 0 22 | do j = max(2, l-nx-nz+2), min(ny-1, l-4) 23 | do i = max(2, l-j-nz+1), min(nx-1, l-j-2) 24 | k = l - i - j 25 | if (k.ge.2 .and. k.le.nz-1) then 26 | n = n + 1 27 | indxp(n,l) = i 28 | jndxp(n,l) = j 29 | endif 30 | end do 31 | end do 32 | np(l) = n 33 | end do 34 | 35 | return 36 | end 37 | 38 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/LU-hp/inputlu.data.sample: -------------------------------------------------------------------------------- 1 | c 2 | c***controls printing of the progress of iterations: ipr inorm 3 | 1 250 4 | c 5 | c***the maximum no. of pseudo-time steps to be performed: nitmax 6 | 250 7 | c 8 | c***magnitude of the time step: dt 9 | 2.0e+00 10 | c 11 | c***relaxation factor for SSOR iterations: omega 12 | 1.2 13 | c 14 | c***tolerance levels for steady-state residuals: tolnwt(m),m=1,5 15 | 1.0e-08 1.0e-08 1.0e-08 1.0e-08 1.0e-08 16 | c 17 | c***number of grid points in xi and eta and zeta directions: nx ny nz 18 | 64 64 64 19 | c 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/LU-hp/ver2/calcnp.f: -------------------------------------------------------------------------------- 1 | c--------------------------------------------------------------------- 2 | c--------------------------------------------------------------------- 3 | 4 | subroutine calcnp(l, jstp, jendp) 5 | 6 | c--------------------------------------------------------------------- 7 | c Calculate j-index limit on a given 'hyper-plane' (l = j + k) 8 | c for the use with lower- and upper-triangular solvers. 9 | c--------------------------------------------------------------------- 10 | 11 | implicit none 12 | integer l, jstp, jendp 13 | 14 | include 'applu.incl' 15 | 16 | jstp = l - nz + 1 17 | if (jstp.lt.jst) jstp = jst 18 | jendp = l - 2 19 | if (jendp.gt.jend) jendp = jend 20 | 21 | return 22 | end 23 | 24 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/LU/inputlu.data.sample: -------------------------------------------------------------------------------- 1 | c 2 | c***controls printing of the progress of iterations: ipr inorm 3 | 1 250 4 | c 5 | c***the maximum no. of pseudo-time steps to be performed: nitmax 6 | 250 7 | c 8 | c***magnitude of the time step: dt 9 | 2.0e+00 10 | c 11 | c***relaxation factor for SSOR iterations: omega 12 | 1.2 13 | c 14 | c***tolerance levels for steady-state residuals: tolnwt(m),m=1,5 15 | 1.0e-08 1.0e-08 1.0e-08 1.0e-08 1.0e-08 16 | c 17 | c***number of grid points in xi and eta and zeta directions: nx ny nz 18 | 64 64 64 19 | c 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/MG/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | BENCHMARK=mg 3 | BENCHMARKU=MG 4 | 5 | include ../config/make.def 6 | 7 | OBJS = mg.o ${COMMON}/print_results.o \ 8 | ${COMMON}/${RAND}.o ${COMMON}/timers.o ${COMMON}/wtime.o 9 | 10 | include ../sys/make.common 11 | 12 | ${PROGRAM}: config ${OBJS} 13 | ${FLINK} ${FLINKFLAGS} -o ${PROGRAM} ${OBJS} ${F_LIB} 14 | 15 | mg.o: mg.f globals.h npbparams.h 16 | ${FCOMPILE} mg.f 17 | 18 | clean: 19 | - rm -f *.o *~ 20 | - rm -f npbparams.h core 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/MG/mg.input.sample: -------------------------------------------------------------------------------- 1 | 8 = top level 2 | 256 256 256 = nx ny nz 3 | 20 = nit 4 | 0 0 0 0 0 0 0 0 = debug_vec 5 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | CLASS=W 3 | SFILE=config/suite.def 4 | 5 | default: header 6 | @ sys/print_instructions 7 | 8 | BT: bt 9 | bt: header 10 | cd BT; $(MAKE) CLASS=$(CLASS) 11 | 12 | SP: sp 13 | sp: header 14 | cd SP; $(MAKE) CLASS=$(CLASS) 15 | 16 | LU: lu 17 | lu: header 18 | cd LU; $(MAKE) CLASS=$(CLASS) 19 | 20 | MG: mg 21 | mg: header 22 | cd MG; $(MAKE) CLASS=$(CLASS) 23 | 24 | FT: ft 25 | ft: header 26 | cd FT; $(MAKE) CLASS=$(CLASS) 27 | 28 | IS: is 29 | is: header 30 | cd IS; $(MAKE) CLASS=$(CLASS) 31 | 32 | CG: cg 33 | cg: header 34 | cd CG; $(MAKE) CLASS=$(CLASS) 35 | 36 | EP: ep 37 | ep: header 38 | cd EP; $(MAKE) CLASS=$(CLASS) 39 | 40 | # Awk script courtesy cmg@cray.com 41 | suite: 42 | @ awk '{ if ($$1 !~ /^#/ && NF > 0) \ 43 | printf "make %s CLASS=%s\n", $$1, $$2 }' $(SFILE) \ 44 | | $(SHELL) 45 | 46 | 47 | # It would be nice to make clean in each subdirectory (the targets 48 | # are defined) but on a really clean system this will won't work 49 | # because those makefiles need config/make.def 50 | clean: 51 | - rm -f core 52 | - rm -f *~ */core */*~ */*.o */npbparams.h */*.obj */*.exe 53 | - rm -f sys/setparams sys/makesuite sys/setparams.h 54 | 55 | veryclean: clean 56 | - rm config/make.def config/suite.def Part* 57 | - rm bin/sp.* bin/lu.* bin/mg.* bin/ft.* bin/bt.* bin/is.* bin/ep.* bin/cg.* 58 | 59 | header: 60 | @ sys/print_header 61 | 62 | kit: 63 | - makekit -s100k -k30 * */* */*/* 64 | 65 | 66 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/SP/add.f: -------------------------------------------------------------------------------- 1 | 2 | c--------------------------------------------------------------------- 3 | c--------------------------------------------------------------------- 4 | 5 | subroutine add 6 | 7 | c--------------------------------------------------------------------- 8 | c--------------------------------------------------------------------- 9 | 10 | c--------------------------------------------------------------------- 11 | c addition of update to the vector u 12 | c--------------------------------------------------------------------- 13 | 14 | include 'header.h' 15 | 16 | integer i,j,k,m 17 | 18 | do k = 1, nz2 19 | do j = 1, ny2 20 | do i = 1, nx2 21 | do m = 1, 5 22 | u(m,i,j,k) = u(m,i,j,k) + rhs(m,i,j,k) 23 | end do 24 | end do 25 | end do 26 | end do 27 | 28 | return 29 | end 30 | 31 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/SP/adi.f: -------------------------------------------------------------------------------- 1 | 2 | c--------------------------------------------------------------------- 3 | c--------------------------------------------------------------------- 4 | 5 | subroutine adi 6 | 7 | include 'header.h' 8 | 9 | c--------------------------------------------------------------------- 10 | c--------------------------------------------------------------------- 11 | 12 | if (timeron) call timer_start(t_rhs) 13 | call compute_rhs 14 | if (timeron) call timer_stop(t_rhs) 15 | 16 | if (timeron) call timer_start(t_txinvr) 17 | call txinvr 18 | if (timeron) call timer_stop(t_txinvr) 19 | 20 | call x_solve 21 | 22 | call y_solve 23 | 24 | call z_solve 25 | 26 | if (timeron) call timer_start(t_add) 27 | call add 28 | if (timeron) call timer_stop(t_add) 29 | 30 | return 31 | end 32 | 33 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/SP/exact_solution.f: -------------------------------------------------------------------------------- 1 | 2 | c--------------------------------------------------------------------- 3 | c--------------------------------------------------------------------- 4 | 5 | subroutine exact_solution(xi,eta,zeta,dtemp) 6 | 7 | c--------------------------------------------------------------------- 8 | c--------------------------------------------------------------------- 9 | 10 | c--------------------------------------------------------------------- 11 | c this function returns the exact solution at point xi, eta, zeta 12 | c--------------------------------------------------------------------- 13 | 14 | include 'header.h' 15 | 16 | double precision xi, eta, zeta, dtemp(5) 17 | integer m 18 | 19 | do m = 1, 5 20 | dtemp(m) = ce(m,1) + 21 | > xi*(ce(m,2) + xi*(ce(m,5) + xi*(ce(m,8) + xi*ce(m,11)))) + 22 | > eta*(ce(m,3) + eta*(ce(m,6) + eta*(ce(m,9) + eta*ce(m,12))))+ 23 | > zeta*(ce(m,4) + zeta*(ce(m,7) + zeta*(ce(m,10) + 24 | > zeta*ce(m,13)))) 25 | end do 26 | 27 | return 28 | end 29 | 30 | 31 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/SP/inputsp.data.sample: -------------------------------------------------------------------------------- 1 | 400 number of time steps 2 | 0.0015d0 dt for class A = 0.0015d0. class B = 0.001d0 class C = 0.00067d0 3 | 64 64 64 4 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/SP/ninvr.f: -------------------------------------------------------------------------------- 1 | 2 | c--------------------------------------------------------------------- 3 | c--------------------------------------------------------------------- 4 | 5 | subroutine ninvr 6 | 7 | c--------------------------------------------------------------------- 8 | c--------------------------------------------------------------------- 9 | 10 | c--------------------------------------------------------------------- 11 | c block-diagonal matrix-vector multiplication 12 | c--------------------------------------------------------------------- 13 | 14 | include 'header.h' 15 | 16 | integer i, j, k 17 | double precision r1, r2, r3, r4, r5, t1, t2 18 | 19 | do k = 1, nz2 20 | do j = 1, ny2 21 | do i = 1, nx2 22 | 23 | r1 = rhs(1,i,j,k) 24 | r2 = rhs(2,i,j,k) 25 | r3 = rhs(3,i,j,k) 26 | r4 = rhs(4,i,j,k) 27 | r5 = rhs(5,i,j,k) 28 | 29 | t1 = bt * r3 30 | t2 = 0.5d0 * ( r4 + r5 ) 31 | 32 | rhs(1,i,j,k) = -r2 33 | rhs(2,i,j,k) = r1 34 | rhs(3,i,j,k) = bt * ( r4 - r5 ) 35 | rhs(4,i,j,k) = -t1 + t2 36 | rhs(5,i,j,k) = t1 + t2 37 | enddo 38 | enddo 39 | enddo 40 | 41 | return 42 | end 43 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/SP/pinvr.f: -------------------------------------------------------------------------------- 1 | 2 | c--------------------------------------------------------------------- 3 | c--------------------------------------------------------------------- 4 | 5 | subroutine pinvr 6 | 7 | c--------------------------------------------------------------------- 8 | c--------------------------------------------------------------------- 9 | 10 | c--------------------------------------------------------------------- 11 | c block-diagonal matrix-vector multiplication 12 | c--------------------------------------------------------------------- 13 | 14 | include 'header.h' 15 | 16 | integer i, j, k 17 | double precision r1, r2, r3, r4, r5, t1, t2 18 | 19 | do k = 1, nz2 20 | do j = 1, ny2 21 | do i = 1, nx2 22 | 23 | r1 = rhs(1,i,j,k) 24 | r2 = rhs(2,i,j,k) 25 | r3 = rhs(3,i,j,k) 26 | r4 = rhs(4,i,j,k) 27 | r5 = rhs(5,i,j,k) 28 | 29 | t1 = bt * r1 30 | t2 = 0.5d0 * ( r4 + r5 ) 31 | 32 | rhs(1,i,j,k) = bt * ( r4 - r5 ) 33 | rhs(2,i,j,k) = -r3 34 | rhs(3,i,j,k) = r2 35 | rhs(4,i,j,k) = -t1 + t2 36 | rhs(5,i,j,k) = t1 + t2 37 | end do 38 | end do 39 | end do 40 | 41 | return 42 | end 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/bin/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/common/wtime.c: -------------------------------------------------------------------------------- 1 | #include "wtime.h" 2 | #include 3 | 4 | void wtime(double *t) 5 | { 6 | static int sec = -1; 7 | struct timeval tv; 8 | gettimeofday(&tv, (void *)0); 9 | if (sec < 0) sec = tv.tv_sec; 10 | *t = (tv.tv_sec - sec) + 1.0e-6*tv.tv_usec; 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/common/wtime.f: -------------------------------------------------------------------------------- 1 | C 2 | C Note: currently (NPB2.3), this routine not called 3 | C 4 | subroutine wtime(tim) 5 | real*8 tim 6 | dimension tarray(2) 7 | call etime(tarray) 8 | tim = tarray(1) 9 | return 10 | end 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/common/wtime.h: -------------------------------------------------------------------------------- 1 | /* C/Fortran interface is different on different machines. 2 | * You may need to tweak this. 3 | */ 4 | 5 | 6 | #if defined(IBM) 7 | #define wtime wtime 8 | #elif defined(CRAY) 9 | #define wtime WTIME 10 | #else 11 | #define wtime wtime_ 12 | #endif 13 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/config/NAS.samples/README: -------------------------------------------------------------------------------- 1 | This directory contains examples of make.def files that were used 2 | by the NPB team in testing the benchmarks on different platforms. 3 | They can be used as starting points for make.def files for your 4 | own platform, but you may need to taylor them for best performance 5 | on your installation. A clean template can be found in directory 6 | `config'. 7 | Some examples of suite.def files are also provided. -------------------------------------------------------------------------------- /examples/NPB3.0-SER/config/NAS.samples/make.def.dec_alpha: -------------------------------------------------------------------------------- 1 | #This is for a DEC Alpha 8400. The code will execute on a 2 | #single processor 3 | #Warning: parallel make does not work properly in general 4 | F77 = f77 5 | FLINK = f77 6 | #Optimization -O5 breaks SP; works fine for all other codes 7 | FFLAGS = -O4 8 | 9 | CC = cc 10 | CLINK = cc 11 | CFLAGS = -O5 12 | 13 | BINDIR = ../bin 14 | 15 | RAND = randi8 16 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/config/NAS.samples/make.def.sp2_babbage: -------------------------------------------------------------------------------- 1 | #This is for the IBM SP2 at Ames 2 | F77 = xlf 3 | FLINK = xlf 4 | FFLAGS = -O3 -qtune=pwr2 -qarch=pwr2 -qnohot 5 | FLINKFLAGS = -bmaxdata:0x60000000 6 | 7 | CC = cc 8 | CLINK = cc 9 | CFLAGS = -O3 10 | CLINKFLAGS = -bmaxdata:0x60000000 11 | 12 | BINDIR = ../bin 13 | 14 | RAND = randi8 15 | 16 | WTIME = wtime.c 17 | MACHINE = -DIBM 18 | 19 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/config/NAS.samples/suite.def.bt: -------------------------------------------------------------------------------- 1 | bt S 2 | bt W 3 | bt A 4 | bt B 5 | bt C 6 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/config/NAS.samples/suite.def.cg: -------------------------------------------------------------------------------- 1 | cg S 2 | cg W 3 | cg A 4 | cg B 5 | cg C 6 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/config/NAS.samples/suite.def.ep: -------------------------------------------------------------------------------- 1 | ep S 2 | ep W 3 | ep A 4 | ep B 5 | ep C 6 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/config/NAS.samples/suite.def.ft: -------------------------------------------------------------------------------- 1 | ft S 2 | ft W 3 | ft A 4 | ft B 5 | ft C 6 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/config/NAS.samples/suite.def.is: -------------------------------------------------------------------------------- 1 | is S 2 | is W 3 | is A 4 | is B 5 | is C 6 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/config/NAS.samples/suite.def.lu: -------------------------------------------------------------------------------- 1 | lu S 2 | lu W 3 | lu A 4 | lu B 5 | lu C 6 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/config/NAS.samples/suite.def.mg: -------------------------------------------------------------------------------- 1 | mg S 2 | mg W 3 | mg A 4 | mg B 5 | mg C 6 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/config/NAS.samples/suite.def.small: -------------------------------------------------------------------------------- 1 | bt S 2 | cg S 3 | ep S 4 | ft S 5 | is S 6 | lu S 7 | mg S 8 | sp S 9 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/config/NAS.samples/suite.def.sp: -------------------------------------------------------------------------------- 1 | sp S 2 | sp W 3 | sp A 4 | sp B 5 | sp C 6 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/config/suite.def.template: -------------------------------------------------------------------------------- 1 | # config/suite.def 2 | # This file is used to build several benchmarks with a single command. 3 | # Typing "make suite" in the main directory will build all the benchmarks 4 | # specified in this file. 5 | # Each line of this file contains a benchmark name, class, and number 6 | # of nodes. The name is one of "cg", "is", "ep", mg", "ft", "sp", "bt", 7 | # and "lu". 8 | # The class is one of "S", "W", "A", "B", and "C". 9 | # No blank lines. 10 | # The following example builds serial sample sizes of all benchmarks. 11 | ft S 12 | mg S 13 | sp S 14 | lu S 15 | bt S 16 | is S 17 | ep S 18 | cg S 19 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/run-bench.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | CLASS=A 5 | export CERE_WARMUP="WORKLOAD" 6 | export CERE_REPLAY_REPETITIONS=5 7 | 8 | for bench in LU CG EP FT IS MG SP BT; do 9 | echo "Benchmarking $bench" 10 | sbench=$( echo $bench | tr '[A-Z]' '[a-z]' ) 11 | cd $BASEDIR/$bench 12 | RUN_COMMAND="numactl -C 1 ../bin/${sbench}.${CLASS}" 13 | BUILD_COMMAND="make CLASS=${CLASS}" 14 | cere configure --build-cmd="$BUILD_COMMAND" --run-cmd="$RUN_COMMAND" --clean-cmd="make clean" 15 | cere profile 16 | cere select-max-cov 17 | cere report 18 | done 19 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/sys/Makefile: -------------------------------------------------------------------------------- 1 | UCC = cc 2 | include ../config/make.def 3 | 4 | # Note that COMPILE is also defined in make.common and should 5 | # be the same. We can't include make.common because it has a lot 6 | # of other garbage. 7 | FCOMPILE = $(F77) -c $(F_INC) $(FFLAGS) 8 | 9 | all: setparams 10 | 11 | # setparams creates an npbparam.h file for each benchmark 12 | # configuration. npbparams.h also contains info about how a benchmark 13 | # was compiled and linked 14 | 15 | setparams: setparams.c ../config/make.def 16 | gcc ${CONVERTFLAG} -o setparams setparams.c 17 | 18 | 19 | clean: 20 | -rm -f setparams setparams.h npbparams.h 21 | -rm -f *~ *.o 22 | 23 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/sys/README: -------------------------------------------------------------------------------- 1 | This directory contains utilities and files used by the 2 | build process. You should not need to change anything 3 | in this directory. 4 | 5 | Original Files 6 | -------------- 7 | setparams.c: 8 | Source for the setparams program. This program is used internally 9 | in the build process to create the file "npbparams.h" for each 10 | benchmark. npbparams.h contains Fortran or C parameters to build a 11 | benchmark for a specific class. The setparams program is never run 12 | directly by a user. Its invocation syntax is 13 | 14 | "setparams benchmark-name class". 15 | 16 | It examines the file "npbparams.h" in the current directory. If 17 | the specified parameters are the same as those in the npbparams.h 18 | file, nothing it changed. If the file does not exist or corresponds 19 | to a different class/number of nodes, it is (re)built. 20 | One of the more complicated things in npbparams.h is that it 21 | contains, in a Fortran string, the compiler flags used to build a 22 | benchmark, so that a benchmark can print out how it was compiled. 23 | 24 | make.common 25 | A makefile segment that is included in each individual benchmark 26 | program makefile. It sets up some standard macros (COMPILE, etc) 27 | and makes sure everything is configured correctly (npbparams.h) 28 | 29 | Makefile 30 | Builds setparams 31 | 32 | README 33 | This file. 34 | 35 | 36 | Created files 37 | ------------- 38 | 39 | setparams 40 | See descriptions above 41 | 42 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/sys/print_header: -------------------------------------------------------------------------------- 1 | echo ' ===========================================' 2 | echo ' = NAS PARALLEL BENCHMARKS 3.0 =' 3 | echo ' = Serial Versions =' 4 | echo ' = F77/C =' 5 | echo ' ===========================================' 6 | echo '' 7 | -------------------------------------------------------------------------------- /examples/NPB3.0-SER/sys/print_instructions: -------------------------------------------------------------------------------- 1 | echo '' 2 | echo ' To make a NAS benchmark type ' 3 | echo '' 4 | echo ' make CLASS=' 5 | echo '' 6 | echo ' where is "bt", "cg", "ep", "ft", "is", "lu",' 7 | echo ' "mg", or "sp"' 8 | echo ' is "S", "W", "A", "B" or "C"' 9 | echo '' 10 | echo ' To make a set of benchmarks, create the file config/suite.def' 11 | echo ' according to the instructions in config/suite.def.template and type' 12 | echo '' 13 | echo ' make suite' 14 | echo '' 15 | echo ' ***************************************************************' 16 | echo ' * Remember to edit the file config/make.def for site specific *' 17 | echo ' * information as described in the README file *' 18 | echo ' ***************************************************************' 19 | 20 | -------------------------------------------------------------------------------- /m4/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /m4/ax_python_module.m4: -------------------------------------------------------------------------------- 1 | dnl @synopsis AX_PYTHON_MODULE(modname[, fatal]) 2 | dnl 3 | dnl Checks for Python 2 module. 4 | dnl 5 | dnl If fatal is non-empty then absence of a module will trigger an 6 | dnl error. 7 | dnl 8 | dnl @category InstalledPackages 9 | dnl @author Andrew Collier . 10 | dnl @version 2014-09-08 11 | dnl @license AllPermissive 12 | 13 | AC_DEFUN([AX_PYTHON_MODULE],[ 14 | AC_MSG_CHECKING(python module: $1) 15 | $PYTHON -c "import $1" 2>/dev/null 16 | if test $? -eq 0; 17 | then 18 | AC_MSG_RESULT(yes) 19 | eval AS_TR_CPP(HAVE_PYMOD_$1)=yes 20 | else 21 | AC_MSG_RESULT(no) 22 | eval AS_TR_CPP(HAVE_PYMOD_$1)=no 23 | # 24 | if test -n "$2" 25 | then 26 | AC_MSG_ERROR(failed to find required python module $1) 27 | exit 1 28 | fi 29 | fi 30 | ]) 31 | -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | llvm-3.3.src 2 | **/*.o 3 | **/*.so 4 | **/*.a 5 | **/*.ll 6 | **/*.in 7 | **/*.la 8 | **/*.lo 9 | -------------------------------------------------------------------------------- /src/GlobalRename/Makefile.am: -------------------------------------------------------------------------------- 1 | libcere_globalrename_la_CXXFLAGS = @LLVM_CPPFLAGS@ 2 | 3 | 4 | lib_LTLIBRARIES = libcere_globalrename.la 5 | libcere_globalrename_la_SOURCES = GlobalRename.cpp 6 | libcere_globalrename_la_LDFLAGS = 7 | -------------------------------------------------------------------------------- /src/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS=ccan rdtsc memory_dump RegionOutliner RegionInstrumentation RegionReplay RegionDump GlobalRename 2 | 3 | dist_bin_SCRIPTS = cerec cerec++ 4 | if WITH_FLANG 5 | dist_bin_SCRIPTS += ceref 6 | endif 7 | 8 | pkgpython_PYTHON= \ 9 | cere/compiler_frontend.py \ 10 | cere/lel.py \ 11 | cere/lec.py \ 12 | cere/vars.py \ 13 | cere/utils.py \ 14 | cere/__main__.py \ 15 | cere/cere_sanity_check.py \ 16 | cere/ilp_update_graph.py \ 17 | cere/cere_trace.py \ 18 | cere/granularity.py \ 19 | cere/cere_regions.py \ 20 | cere/cere_select_max_cov.py \ 21 | cere/cere_selectinv.py \ 22 | cere/graph_utils.py \ 23 | cere/compress.py \ 24 | cere/__init__.py \ 25 | cere/cere_select_ilp.py \ 26 | cere/cere_profile.py \ 27 | cere/cere_hybrid.py \ 28 | cere/errors.py \ 29 | cere/max_cov_update_graph.py \ 30 | cere/create_graph.py \ 31 | cere/graph_error.py \ 32 | cere/cere_check_matching.py \ 33 | cere/regions_selector.py \ 34 | cere/cere_instrument.py \ 35 | cere/cere_replay.py \ 36 | cere/cere_capture.py \ 37 | cere/cere_report.py \ 38 | cere/cere_flag.py \ 39 | cere/cere_configure.py \ 40 | cere/template.html \ 41 | cere/template_realmain.c \ 42 | cere/Report.js 43 | 44 | edit_script = $(SED) -e 's,%LIBDIR%,$(libdir),'g $(NULL) 45 | 46 | cere/vars.py: cere/vars.py.in Makefile 47 | $(AM_V_GEN)rm -f $@ $@.tmp && \ 48 | $(edit_script) $< >$@.tmp && \ 49 | chmod a-w $@.tmp && \ 50 | mv $@.tmp $@ 51 | 52 | CLEANFILES = cere/vars.py 53 | -------------------------------------------------------------------------------- /src/RegionDump/Makefile.am: -------------------------------------------------------------------------------- 1 | libcere_regiondump_la_CXXFLAGS = @LLVM_CPPFLAGS@ 2 | 3 | 4 | lib_LTLIBRARIES = libcere_regiondump.la 5 | libcere_regiondump_la_SOURCES = RegionDump.cpp LoopRegionDump.cpp OmpRegionDump.cpp RegionDump.h 6 | -------------------------------------------------------------------------------- /src/RegionInstrumentation/Makefile.am: -------------------------------------------------------------------------------- 1 | libcere_regioninstrumentation_la_CXXFLAGS = @LLVM_CPPFLAGS@ 2 | 3 | 4 | lib_LTLIBRARIES = libcere_regioninstrumentation.la 5 | libcere_regioninstrumentation_la_SOURCES = RegionInstrumentation.cpp LoopRegionInstrumentation.cpp OmpRegionInstrumentation.cpp RegionInstrumentation.h 6 | -------------------------------------------------------------------------------- /src/RegionOutliner/Makefile.am: -------------------------------------------------------------------------------- 1 | libcere_regionoutliner_la_CXXFLAGS = @LLVM_CPPFLAGS@ 2 | 3 | 4 | lib_LTLIBRARIES = libcere_regionoutliner.la 5 | libcere_regionoutliner_la_SOURCES = RegionExtractor.cpp LoopRegionOutliner.cpp OmpRegionOutliner.cpp RegionExtractor.h 6 | -------------------------------------------------------------------------------- /src/RegionReplay/Makefile.am: -------------------------------------------------------------------------------- 1 | libcere_regionreplay_la_CXXFLAGS = @LLVM_CPPFLAGS@ 2 | 3 | 4 | lib_LTLIBRARIES = libcere_regionreplay.la 5 | libcere_regionreplay_la_SOURCES = RegionReplay.cpp LoopRegionReplay.cpp OmpRegionReplay.cpp RegionReplay.h 6 | -------------------------------------------------------------------------------- /src/ccan/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libccan.la 2 | libccan_la_CFLAGS = -fPIC -static 3 | libccan_la_SOURCES = \ 4 | ccan/hash/hash.c \ 5 | ccan/hash/hash.h \ 6 | ccan/htable/htable.c \ 7 | ccan/htable/htable.h \ 8 | ccan/htable/htable_type.h \ 9 | ccan/compiler/compiler.h \ 10 | ccan/build_assert/build_assert.h 11 | -------------------------------------------------------------------------------- /src/ccan/ccan/build_assert/LICENSE: -------------------------------------------------------------------------------- 1 | ../../licenses/CC0 -------------------------------------------------------------------------------- /src/ccan/ccan/build_assert/build_assert.h: -------------------------------------------------------------------------------- 1 | /* CC0 (Public domain) - see LICENSE file for details */ 2 | #ifndef CCAN_BUILD_ASSERT_H 3 | #define CCAN_BUILD_ASSERT_H 4 | 5 | /** 6 | * BUILD_ASSERT - assert a build-time dependency. 7 | * @cond: the compile-time condition which must be true. 8 | * 9 | * Your compile will fail if the condition isn't true, or can't be evaluated 10 | * by the compiler. This can only be used within a function. 11 | * 12 | * Example: 13 | * #include 14 | * ... 15 | * static char *foo_to_char(struct foo *foo) 16 | * { 17 | * // This code needs string to be at start of foo. 18 | * BUILD_ASSERT(offsetof(struct foo, string) == 0); 19 | * return (char *)foo; 20 | * } 21 | */ 22 | #define BUILD_ASSERT(cond) \ 23 | do { (void) sizeof(char [1 - 2*!(cond)]); } while(0) 24 | 25 | /** 26 | * BUILD_ASSERT_OR_ZERO - assert a build-time dependency, as an expression. 27 | * @cond: the compile-time condition which must be true. 28 | * 29 | * Your compile will fail if the condition isn't true, or can't be evaluated 30 | * by the compiler. This can be used in an expression: its value is "0". 31 | * 32 | * Example: 33 | * #define foo_to_char(foo) \ 34 | * ((char *)(foo) \ 35 | * + BUILD_ASSERT_OR_ZERO(offsetof(struct foo, string) == 0)) 36 | */ 37 | #define BUILD_ASSERT_OR_ZERO(cond) \ 38 | (sizeof(char [1 - 2*!(cond)]) - 1) 39 | 40 | #endif /* CCAN_BUILD_ASSERT_H */ 41 | -------------------------------------------------------------------------------- /src/ccan/ccan/compiler/LICENSE: -------------------------------------------------------------------------------- 1 | ../../licenses/CC0 -------------------------------------------------------------------------------- /src/ccan/ccan/hash/LICENSE: -------------------------------------------------------------------------------- 1 | ../../licenses/CC0 -------------------------------------------------------------------------------- /src/ccan/ccan/htable/LICENSE: -------------------------------------------------------------------------------- 1 | ../../licenses/LGPL-2.1 -------------------------------------------------------------------------------- /src/cere/__init__.py: -------------------------------------------------------------------------------- 1 | # This file is part of CERE. 2 | # 3 | # Copyright (c) 2013-2016, Universite de Versailles St-Quentin-en-Yvelines 4 | # 5 | # CERE is free software: you can redistribute it and/or modify it under 6 | # the terms of the GNU Lesser General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, 8 | # or (at your option) any later version. 9 | # 10 | # CERE is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with CERE. If not, see . 17 | 18 | -------------------------------------------------------------------------------- /src/cere/errors.py: -------------------------------------------------------------------------------- 1 | # This file is part of CERE. 2 | # 3 | # Copyright (c) 2013-2016, Universite de Versailles St-Quentin-en-Yvelines 4 | # 5 | # CERE is free software: you can redistribute it and/or modify it under 6 | # the terms of the GNU Lesser General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, 8 | # or (at your option) any later version. 9 | # 10 | # CERE is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with CERE. If not, see . 17 | #!/usr/bin/env python 18 | 19 | EIO = "Not replayables IOs" 20 | EDUMP = "Dumping region failed" 21 | EREPLAY = "Replaying region failed" 22 | ETRACE = "Tracing region failed" 23 | -------------------------------------------------------------------------------- /src/cere/graph_error.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # This file is part of CERE. 3 | # 4 | # Copyright (c) 2013-2016, Universite de Versailles St-Quentin-en-Yvelines 5 | # 6 | # CERE is free software: you can redistribute it and/or modify it under 7 | # the terms of the GNU Lesser General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, 9 | # or (at your option) any later version. 10 | # 11 | # CERE is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with CERE. If not, see . 18 | 19 | import os 20 | from cere import vars as var 21 | import numpy as np 22 | import matplotlib.pyplot as plt 23 | 24 | def read_datafile(file_name): 25 | table = np.genfromtxt(file_name, delimiter=',', names=['error', 'coverage']) 26 | return table 27 | 28 | def plot_graph(datafile): 29 | table = read_datafile(datafile) 30 | #Sort by error 31 | table.sort(0) 32 | f, ax = plt.subplots(1, figsize=(10, 4.16)) 33 | ax.plot(table['error'], table['coverage'], linewidth=0.8, marker="o") 34 | ax.axvline(15, color="r", linestyle="dotted", linewidth=1.5) 35 | ax.grid('on') 36 | ax.set_ylabel("Exec time Cumulated (%)") 37 | ax.set_xlabel("Error max allowed (%)") 38 | ax.axis([0, 105, 0, 105]) 39 | f.savefig(os.path.join(var.CERE_PLOTS_PATH, "bench_error.png"), 40 | bbox_inches='tight', dpi=100) 41 | -------------------------------------------------------------------------------- /src/cerec: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from cere import compiler_frontend 4 | import sys 5 | 6 | if __name__ == "__main__": 7 | compiler_frontend.run("c", sys.argv) 8 | -------------------------------------------------------------------------------- /src/cerec++: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from cere import compiler_frontend 4 | import sys 5 | 6 | if __name__ == "__main__": 7 | compiler_frontend.run("cpp", sys.argv) 8 | -------------------------------------------------------------------------------- /src/ceref: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from cere import compiler_frontend 4 | import sys 5 | 6 | if __name__ == "__main__": 7 | compiler_frontend.run("fortran", sys.argv) 8 | -------------------------------------------------------------------------------- /src/memory_dump/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LTLIBRARIES = libcere_dump.la libcere_load.la 2 | 3 | libcere_dump_la_LDFLAGS = -fPIC -ldl 4 | libcere_dump_la_CFLAGS = -g --std=gnu99 5 | libcere_dump_la_SOURCES = tracee.c tracee_hooks.c tracee_interface.c tracee.h tracee_interface.h pages.h types.h err.h 6 | 7 | libcere_load_la_CFLAGS = -g --std=gnu99 -Wl,-z,now 8 | libcere_load_la_SOURCES = replay.c pages.h 9 | 10 | bin_PROGRAMS = cere-tracer 11 | cere_tracer_CFLAGS = -I ../ccan/ -g --std=gnu99 -Wl,-z,now 12 | cere_tracer_SOURCES = ptrace.c cere_tracer.c tracer_interface.c tracer_mem.c pages.h tracer_interface.h ptrace.h types.h err.h 13 | cere_tracer_LDADD = ../ccan/libccan.la 14 | -------------------------------------------------------------------------------- /src/memory_dump/debug.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * This file is part of CERE. * 3 | * * 4 | * Copyright (c) 2016, Universite de Versailles St-Quentin-en-Yvelines * 5 | * * 6 | * CERE is free software: you can redistribute it and/or modify it under * 7 | * the terms of the GNU Lesser General Public License as published by * 8 | * the Free Software Foundation, either version 3 of the License, * 9 | * or (at your option) any later version. * 10 | * * 11 | * CERE is distributed in the hope that it will be useful, * 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 14 | * GNU General Public License for more details. * 15 | * * 16 | * You should have received a copy of the GNU General Public License * 17 | * along with CERE. If not, see . * 18 | *****************************************************************************/ 19 | #ifdef _DEBUG 20 | #define debug_print(fmt, ...) fprintf(stderr, fmt, __VA_ARGS__) 21 | #else 22 | #define debug_print(fmt, ...) 23 | #endif 24 | -------------------------------------------------------------------------------- /src/memory_dump/tracer_mem.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | // LOCK 7 | 8 | void* get_protect_offset(char* executable); 9 | void tracer_lock_mem(pid_t pid); 10 | 11 | 12 | // UNLOCK 13 | 14 | bool should_unprotect(void ** start, void ** end, long long unsigned int * permissions); 15 | void tracer_unlock_mem(pid_t pid); 16 | -------------------------------------------------------------------------------- /src/rdtsc/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LTLIBRARIES = libcere_rdtsc.la 2 | libcere_rdtsc_la_CFLAGS = --std=gnu99 -I ../ccan/ 3 | libcere_rdtsc_la_SOURCES = rdtsc.c rdtsc_wrapper.c rdtsc.h 4 | libcere_rdtsc_la_LIBADD = ../ccan/libccan.la 5 | -------------------------------------------------------------------------------- /tests/Makefile.am: -------------------------------------------------------------------------------- 1 | TESTS = test.sh 2 | EXTRA_DIST = $(TESTS) 3 | CLEANFILES = testplan.log testplan.trs 4 | -------------------------------------------------------------------------------- /tests/_test_UI_Hybrid/npbparams.h: -------------------------------------------------------------------------------- 1 | #define CLASS 'W' 2 | /* 3 | This file is generated automatically by the setparams utility. 4 | It sets the number of processors and the class of the NPB 5 | in this directory. Do not modify it by hand. */ 6 | 7 | #define COMPILETIME "10 Oct 2013" 8 | #define NPBVERSION "3.0" 9 | #define CC "clang" 10 | #define CFLAGS "(none)" 11 | #define CLINK "clang" 12 | #define CLINKFLAGS "(none)" 13 | #define C_LIB "(none)" 14 | #define C_INC "(none)" 15 | -------------------------------------------------------------------------------- /tests/_test_UI_Hybrid/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | make clean 6 | cere configure --build-cmd="make" --run-cmd="./IS" --clean-cmd="make clean" 7 | cere regions 8 | cere hybrid --regions-file=.cere/flags/regions_flags.csv --instrument 9 | ./IS 10 | 11 | cat main.csv 12 | } 13 | 14 | source ../source.sh 15 | -------------------------------------------------------------------------------- /tests/_test_UI_Hybrid/wtime.c: -------------------------------------------------------------------------------- 1 | #include "wtime.h" 2 | #include 3 | 4 | void wtime(double *t) 5 | { 6 | static int sec = -1; 7 | struct timeval tv; 8 | gettimeofday(&tv, (void *)0); 9 | if (sec < 0) sec = tv.tv_sec; 10 | *t = (tv.tv_sec - sec) + 1.0e-6*tv.tv_usec; 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/_test_UI_Hybrid/wtime.h: -------------------------------------------------------------------------------- 1 | /* C/Fortran interface is different on different machines. 2 | * You may need to tweak this. 3 | */ 4 | 5 | 6 | #if defined(IBM) 7 | #define wtime wtime 8 | #elif defined(CRAY) 9 | #define wtime WTIME 10 | #else 11 | #define wtime wtime_ 12 | #endif 13 | -------------------------------------------------------------------------------- /tests/long_01/Makefile: -------------------------------------------------------------------------------- 1 | PROJECT_ROOT=../../ 2 | FLAGS+=-g 3 | CC=../../src/lec/lec 4 | CLINK=../../src/lel/lel 5 | 6 | OBJS = blocksort.o bzip2.o bzlib.o compress.o crctable.o decompress.o huffman.o randtable.o spec.o 7 | PROGRAM=bzip2 8 | 9 | ${PROGRAM}: ${OBJS} 10 | ${CLINK} ${MODE} ${INSTRU} ${FLAGS} -o ${PROGRAM} ${OBJS} ${C_LIB} 11 | 12 | %.o: %.c 13 | ${CC} ${MODE} ${INSTRU} ${FLAGS} $< 14 | 15 | clean: 16 | - rm -f *.o *.s *.ll *~ mputil* 17 | - rm -f $(PROGRAM) 18 | - rm -f dump.c 19 | 20 | veryclean: clean 21 | - rm -rf dump/ results/ 22 | - rm -f lel_bin realmain.c dump.c level_* loop_to_keep matching_codelets out *.csv dryer.jpg.bz2 23 | -------------------------------------------------------------------------------- /tests/long_01/dryer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/long_01/dryer.jpg -------------------------------------------------------------------------------- /tests/long_01/spec.h: -------------------------------------------------------------------------------- 1 | /* Prototypes for stuff in spec.c */ 2 | void spec_initbufs(); 3 | void spec_compress(int in, int out, int level); 4 | void spec_uncompress(int in, int out, int level); 5 | int spec_init (); 6 | int spec_random_load (int fd); 7 | int spec_load (int num, char *filename, int size); 8 | int spec_read (int fd, unsigned char *buf, int size); 9 | int spec_reset (int fd); 10 | int spec_write (int fd, unsigned char *buf, int size); 11 | int spec_getc (int fd); 12 | int spec_ungetc (unsigned char ch, int fd); 13 | int spec_fread (unsigned char *buf, int size, int num, int fd); 14 | int spec_fwrite (unsigned char *buf, int size, int num, int fd); 15 | int spec_rewind (int fd); 16 | int spec_putc (unsigned char ch, int fd); 17 | int debug_time(); 18 | 19 | -------------------------------------------------------------------------------- /tests/long_01/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | make veryclean > /dev/null 2>&1 4 | ../../src/granularity/coverage.sh . "./bzip2 -k -z -f dryer.jpg" make 5 | exit $? 6 | -------------------------------------------------------------------------------- /tests/source.sh: -------------------------------------------------------------------------------- 1 | 2 | STATUS=255 3 | TMPDIR=`mktemp -d` 4 | do_test 5 | STATUS=$? 6 | rm -rf $TMPDIR 7 | 8 | exit $STATUS 9 | -------------------------------------------------------------------------------- /tests/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | RANDOMIZE_SPACE=$(cat /proc/sys/kernel/randomize_va_space) 3 | if test "$RANDOMIZE_SPACE" = "0"; then 4 | echo "layout space randomization is required during replay" 5 | echo "please type echo 1 | sudo tee /proc/sys/kernel/randomize_va_space" 6 | echo "before running tests" 7 | exit 127 8 | fi 9 | ../autoconf/tap-driver.sh --test-name testplan.test --log-file testplan.log --trs-file testplan.trs --color-tests yes -- ./testplan.test 10 | grep ":global-test-result: PASS" testplan.trs > /dev/null 11 | exit $? 12 | -------------------------------------------------------------------------------- /tests/test_01/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | PROJECT_ROOT=../../ 3 | CC=cerec 4 | FLINK=cerec 5 | 6 | FLAGS=-g -O0 7 | 8 | OBJS = test.o 9 | 10 | PROGRAM=test 11 | 12 | ${PROGRAM}: ${OBJS} 13 | ${FLINK} ${FLAGS} -o ${PROGRAM} ${OBJS} ${F_LIB} 14 | 15 | %.o: %.c 16 | ${CC} ${FLAGS} -c $< 17 | 18 | clean: 19 | - rm -f *.o *.s *.ll 20 | - rm -f test 21 | 22 | veryclean: clean 23 | - rm -rf .cere/ 24 | - rm -f *.o realmain.c 25 | -------------------------------------------------------------------------------- /tests/test_01/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int checksum(int *a, int size) 5 | { 6 | int check=0, i; 7 | for (i = 0; i < size; i++) { 8 | if (i == 0) { 9 | fprintf(stderr, "check: %d, &a: %p, a[0]: %d\n", check, a, a[0]); 10 | } 11 | if (i % 1024 == 0) 12 | fprintf(stderr, "it:%p\n", &a[i]); 13 | check += a[i]; 14 | if (i == size-1) 15 | fprintf(stderr, "Checksum invitro: %d\n", check); 16 | } 17 | return check; 18 | } 19 | 20 | void init(int *a, int size) 21 | { 22 | int i; 23 | for (i = 0; i < size; i++) 24 | a[i]=i+1; 25 | } 26 | 27 | int main(int argc, char **argv) 28 | { 29 | int size=4096*4; 30 | int * a = malloc(sizeof(int)*size); 31 | init(a, size); 32 | int check = checksum(a, size); 33 | fprintf(stderr, "Checksum : %d\n", check); 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /tests/test_01/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | make veryclean 6 | make -j4 CERE_MODE="dump --region=__cere__test_checksum_7" 7 | ./test 2> $TMPDIR/test.dump.out 8 | cat $TMPDIR/test.dump.out 9 | 10 | make clean 11 | make -j4 CERE_MODE="replay --region=__cere__test_checksum_7" 12 | ./test 2> $TMPDIR/test.replay.out 13 | cat $TMPDIR/test.replay.out 14 | 15 | cat $TMPDIR/test.dump.out | grep "&a" | head -n1 > test.a 16 | cat $TMPDIR/test.replay.out | grep "&a" | head -n1 > test.b 17 | if [ ! -s test.a ]; then 18 | return 1 19 | fi 20 | 21 | diff test.a test.b 22 | } 23 | 24 | source ../source.sh 25 | -------------------------------------------------------------------------------- /tests/test_02/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | BENCHMARK=bt 3 | BENCHMARKU=BT 4 | PROJECT_ROOT=../../ 5 | include make.def 6 | CC=../../src/cerec 7 | F77=../../src/cerec 8 | FLINK=../../src/cerec 9 | 10 | FLAGS=-g 11 | 12 | OBJS = bt.o initialize.o exact_solution.o exact_rhs.o \ 13 | set_constants.o adi.o rhs.o \ 14 | x_solve.o y_solve.o \ 15 | z_solve.o add.o error.o verify.o \ 16 | print_results.o timers.o wtime.o 17 | 18 | PROGRAM=BT 19 | 20 | ${PROGRAM}: ${OBJS} 21 | ${FLINK} ${FLINKFLAGS} ${FLAGS} -o ${PROGRAM} ${OBJS} ${F_LIB} -lgfortran 22 | 23 | %.o: %.c 24 | ${CC} ${FLAGS} -c $< 25 | 26 | %.o: %.f 27 | ${F77} ${FLAGS} -c $< 28 | 29 | clean: 30 | - rm -f *.o *.s *.ll *~ mputil* 31 | - rm -f core BT 32 | - rm -f dump.c 33 | 34 | veryclean: clean 35 | - rm -rf .cere/ 36 | - rm -f lel_bin realmain.c dump.c 37 | -------------------------------------------------------------------------------- /tests/test_02/add.f: -------------------------------------------------------------------------------- 1 | c--------------------------------------------------------------------- 2 | c--------------------------------------------------------------------- 3 | 4 | subroutine add 5 | 6 | c--------------------------------------------------------------------- 7 | c--------------------------------------------------------------------- 8 | 9 | c--------------------------------------------------------------------- 10 | c addition of update to the vector u 11 | c--------------------------------------------------------------------- 12 | 13 | include 'header.h' 14 | 15 | integer i, j, k, m 16 | 17 | if (timeron) call timer_start(t_add) 18 | do k = 1, grid_points(3)-2 19 | do j = 1, grid_points(2)-2 20 | do i = 1, grid_points(1)-2 21 | do m = 1, 5 22 | u(m,i,j,k) = u(m,i,j,k) + rhs(m,i,j,k) 23 | enddo 24 | enddo 25 | enddo 26 | enddo 27 | if (timeron) call timer_stop(t_add) 28 | 29 | return 30 | end 31 | -------------------------------------------------------------------------------- /tests/test_02/adi.f: -------------------------------------------------------------------------------- 1 | c--------------------------------------------------------------------- 2 | c--------------------------------------------------------------------- 3 | 4 | subroutine adi 5 | 6 | c--------------------------------------------------------------------- 7 | c--------------------------------------------------------------------- 8 | 9 | call compute_rhs 10 | 11 | call x_solve 12 | 13 | call y_solve 14 | 15 | call z_solve 16 | 17 | call add 18 | 19 | return 20 | end 21 | 22 | -------------------------------------------------------------------------------- /tests/test_02/exact_solution.f: -------------------------------------------------------------------------------- 1 | c--------------------------------------------------------------------- 2 | c--------------------------------------------------------------------- 3 | 4 | subroutine exact_solution(xi,eta,zeta,dtemp) 5 | 6 | c--------------------------------------------------------------------- 7 | c--------------------------------------------------------------------- 8 | 9 | c--------------------------------------------------------------------- 10 | c this function returns the exact solution at point xi, eta, zeta 11 | c--------------------------------------------------------------------- 12 | 13 | include 'header.h' 14 | 15 | double precision xi, eta, zeta, dtemp(5) 16 | integer m 17 | 18 | do m = 1, 5 19 | dtemp(m) = ce(m,1) + 20 | > xi*(ce(m,2) + xi*(ce(m,5) + xi*(ce(m,8) + xi*ce(m,11)))) + 21 | > eta*(ce(m,3) + eta*(ce(m,6) + eta*(ce(m,9) + eta*ce(m,12))))+ 22 | > zeta*(ce(m,4) + zeta*(ce(m,7) + zeta*(ce(m,10) + 23 | > zeta*ce(m,13)))) 24 | enddo 25 | 26 | return 27 | end 28 | 29 | 30 | -------------------------------------------------------------------------------- /tests/test_02/fortran_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_02/fortran_test -------------------------------------------------------------------------------- /tests/test_02/inputbt.data.sample: -------------------------------------------------------------------------------- 1 | 60 number of time steps 2 | 0.01d0 dt for class A = 0.0008d0. class B = 0.0003d0 class C = 0.0001d0 3 | 12 12 12 4 | -------------------------------------------------------------------------------- /tests/test_02/npbparams.h: -------------------------------------------------------------------------------- 1 | c CLASS = B 2 | c 3 | c 4 | c This file is generated automatically by the setparams utility. 5 | c It sets the number of processors and the class of the NPB 6 | c in this directory. Do not modify it by hand. 7 | c 8 | integer problem_size, niter_default 9 | parameter (problem_size=10, niter_default=2) 10 | double precision dt_default 11 | parameter (dt_default = 0.0003d0) 12 | logical convertdouble 13 | parameter (convertdouble = .false.) 14 | character*11 compiletime 15 | parameter (compiletime='10 Oct 2013') 16 | character*3 npbversion 17 | parameter (npbversion='3.0') 18 | character*8 cs1 19 | parameter (cs1='gfortran') 20 | character*5 cs2 21 | parameter (cs2='clang') 22 | character*6 cs3 23 | parameter (cs3='(none)') 24 | character*6 cs4 25 | parameter (cs4='(none)') 26 | character*6 cs5 27 | parameter (cs5='(none)') 28 | character*6 cs6 29 | parameter (cs6='(none)') 30 | character*6 cs7 31 | parameter (cs7='randi8') 32 | -------------------------------------------------------------------------------- /tests/test_02/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | make veryclean 6 | make -j4 CERE_MODE="dump --region=__cere__verify_verify__265" 7 | ./BT 8 | 9 | make clean 10 | make -j4 CERE_REPLAY_REPETITIONS=1 CERE_MODE="replay --region=__cere__verify_verify__265" 11 | ./BT > $TMPDIR/test.replay.out 12 | 13 | cat $TMPDIR/test.replay.out 14 | 15 | cat $TMPDIR/test.replay.out | head -n1 > $TMPDIR/test.a 16 | 17 | diff $TMPDIR/test.a verif 18 | } 19 | 20 | source ../source.sh 21 | -------------------------------------------------------------------------------- /tests/test_02/verif: -------------------------------------------------------------------------------- 1 | 1 0.4557289985700E+03 2 | -------------------------------------------------------------------------------- /tests/test_02/wtime.c: -------------------------------------------------------------------------------- 1 | #include "wtime.h" 2 | #include 3 | 4 | void wtime(double *t) 5 | { 6 | static int sec = -1; 7 | struct timeval tv; 8 | gettimeofday(&tv, (void *)0); 9 | if (sec < 0) sec = tv.tv_sec; 10 | *t = (tv.tv_sec - sec) + 1.0e-6*tv.tv_usec; 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/test_02/wtime.h: -------------------------------------------------------------------------------- 1 | /* C/Fortran interface is different on different machines. 2 | * You may need to tweak this. 3 | */ 4 | 5 | 6 | #if defined(IBM) 7 | #define wtime wtime 8 | #elif defined(CRAY) 9 | #define wtime WTIME 10 | #else 11 | #define wtime wtime_ 12 | #endif 13 | -------------------------------------------------------------------------------- /tests/test_03/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | BENCHMARK=is 3 | BENCHMARKU=IS 4 | PROJECT_ROOT=../../ 5 | 6 | include make.def 7 | 8 | CC=../../src/cerec 9 | CLINK=../../src/cerec 10 | 11 | FLAGS=-g 12 | 13 | PROGRAM=IS 14 | 15 | OBJS = is.o \ 16 | c_print_results.o \ 17 | c_timers.o \ 18 | wtime.o 19 | 20 | 21 | ${PROGRAM}: ${OBJS} 22 | ${CLINK} ${CLINKFLAGS} ${FLAGS} -o ${PROGRAM} ${OBJS} ${C_LIB} 23 | 24 | .c.o: 25 | ${CC} ${FLAGS} -c $< 26 | 27 | is.o: is.c npbparams.h 28 | 29 | clean: 30 | - rm -f *.o *.s *.ll *~ mputil* 31 | - rm -f IS core 32 | 33 | veryclean: clean 34 | - rm -rf .cere 35 | - rm -f lel_bin realmain.c dump.c 36 | -------------------------------------------------------------------------------- /tests/test_03/npbparams.h: -------------------------------------------------------------------------------- 1 | #define CLASS 'W' 2 | /* 3 | This file is generated automatically by the setparams utility. 4 | It sets the number of processors and the class of the NPB 5 | in this directory. Do not modify it by hand. */ 6 | 7 | #define COMPILETIME "10 Oct 2013" 8 | #define NPBVERSION "3.0" 9 | #define CC "clang" 10 | #define CFLAGS "(none)" 11 | #define CLINK "clang" 12 | #define CLINKFLAGS "(none)" 13 | #define C_LIB "(none)" 14 | #define C_INC "(none)" 15 | -------------------------------------------------------------------------------- /tests/test_03/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | make veryclean 6 | make -j4 CERE_MODE="dump --region=__cere__is_main_724 --invocation=1" 7 | ./IS 8 | 9 | make clean 10 | make -j4 CERE_REPLAY_REPETITIONS=1 CERE_MODE="replay --region=__cere__is_main_724 --static" 11 | ./IS > $TMPDIR/test.replay.out 12 | 13 | cat $TMPDIR/test.replay.out | head -10 > $TMPDIR/test.a 14 | 15 | diff $TMPDIR/test.a verif 16 | } 17 | 18 | source ../source.sh 19 | -------------------------------------------------------------------------------- /tests/test_03/verif: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 4 | 4 5 | 5 6 | 6 7 | 7 8 | 8 9 | 9 10 | 10 11 | -------------------------------------------------------------------------------- /tests/test_03/wtime.c: -------------------------------------------------------------------------------- 1 | #include "wtime.h" 2 | #include 3 | 4 | void wtime(double *t) 5 | { 6 | static int sec = -1; 7 | struct timeval tv; 8 | gettimeofday(&tv, (void *)0); 9 | if (sec < 0) sec = tv.tv_sec; 10 | *t = (tv.tv_sec - sec) + 1.0e-6*tv.tv_usec; 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/test_03/wtime.h: -------------------------------------------------------------------------------- 1 | /* C/Fortran interface is different on different machines. 2 | * You may need to tweak this. 3 | */ 4 | 5 | 6 | #if defined(IBM) 7 | #define wtime wtime 8 | #elif defined(CRAY) 9 | #define wtime WTIME 10 | #else 11 | #define wtime wtime_ 12 | #endif 13 | -------------------------------------------------------------------------------- /tests/test_04/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | BENCHMARK=bt 3 | BENCHMARKU=BT 4 | PROJECT_ROOT=../../ 5 | include make.def 6 | CC=../../src/cerec 7 | F77=../../src/cerec 8 | FLINK=../../src/cerec 9 | FLAGS=-g 10 | 11 | OBJS = bt.o initialize.o exact_solution.o exact_rhs.o \ 12 | set_constants.o adi.o rhs.o \ 13 | x_solve.o y_solve.o \ 14 | z_solve.o add.o error.o verify.o \ 15 | print_results.o timers.o wtime.o 16 | 17 | PROGRAM=BT 18 | 19 | ${PROGRAM}: ${OBJS} 20 | ${FLINK} ${INSTRU} ${FLINKFLAGS} ${FLAGS} -o ${PROGRAM} ${OBJS} ${F_LIB} -lgfortran 21 | 22 | %.o: %.c 23 | ${CC} ${INSTRU} ${FLAGS} -c $< 24 | 25 | %.o: %.f 26 | ${F77} ${INSTRU} ${FLAGS} -c $< 27 | 28 | clean: 29 | - rm -f *.o *.s *.ll *~ mputil* 30 | - rm -f core BT 31 | - rm -f dump.c 32 | 33 | veryclean: clean 34 | - rm -rf .cere/ 35 | - rm -f lel_bin realmain.c dump.c *.csv 36 | -------------------------------------------------------------------------------- /tests/test_04/add.f: -------------------------------------------------------------------------------- 1 | c--------------------------------------------------------------------- 2 | c--------------------------------------------------------------------- 3 | 4 | subroutine add 5 | 6 | c--------------------------------------------------------------------- 7 | c--------------------------------------------------------------------- 8 | 9 | c--------------------------------------------------------------------- 10 | c addition of update to the vector u 11 | c--------------------------------------------------------------------- 12 | 13 | include 'header.h' 14 | 15 | integer i, j, k, m 16 | 17 | if (timeron) call timer_start(t_add) 18 | do k = 1, grid_points(3)-2 19 | do j = 1, grid_points(2)-2 20 | do i = 1, grid_points(1)-2 21 | do m = 1, 5 22 | u(m,i,j,k) = u(m,i,j,k) + rhs(m,i,j,k) 23 | enddo 24 | enddo 25 | enddo 26 | enddo 27 | if (timeron) call timer_stop(t_add) 28 | 29 | return 30 | end 31 | -------------------------------------------------------------------------------- /tests/test_04/adi.f: -------------------------------------------------------------------------------- 1 | c--------------------------------------------------------------------- 2 | c--------------------------------------------------------------------- 3 | 4 | subroutine adi 5 | 6 | c--------------------------------------------------------------------- 7 | c--------------------------------------------------------------------- 8 | 9 | call compute_rhs 10 | 11 | call x_solve 12 | 13 | call y_solve 14 | 15 | call z_solve 16 | 17 | call add 18 | 19 | return 20 | end 21 | 22 | -------------------------------------------------------------------------------- /tests/test_04/exact_solution.f: -------------------------------------------------------------------------------- 1 | c--------------------------------------------------------------------- 2 | c--------------------------------------------------------------------- 3 | 4 | subroutine exact_solution(xi,eta,zeta,dtemp) 5 | 6 | c--------------------------------------------------------------------- 7 | c--------------------------------------------------------------------- 8 | 9 | c--------------------------------------------------------------------- 10 | c this function returns the exact solution at point xi, eta, zeta 11 | c--------------------------------------------------------------------- 12 | 13 | include 'header.h' 14 | 15 | double precision xi, eta, zeta, dtemp(5) 16 | integer m 17 | 18 | do m = 1, 5 19 | dtemp(m) = ce(m,1) + 20 | > xi*(ce(m,2) + xi*(ce(m,5) + xi*(ce(m,8) + xi*ce(m,11)))) + 21 | > eta*(ce(m,3) + eta*(ce(m,6) + eta*(ce(m,9) + eta*ce(m,12))))+ 22 | > zeta*(ce(m,4) + zeta*(ce(m,7) + zeta*(ce(m,10) + 23 | > zeta*ce(m,13)))) 24 | enddo 25 | 26 | return 27 | end 28 | 29 | 30 | -------------------------------------------------------------------------------- /tests/test_04/fortran_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_04/fortran_test -------------------------------------------------------------------------------- /tests/test_04/inputbt.data.sample: -------------------------------------------------------------------------------- 1 | 60 number of time steps 2 | 0.01d0 dt for class A = 0.0008d0. class B = 0.0003d0 class C = 0.0001d0 3 | 12 12 12 4 | -------------------------------------------------------------------------------- /tests/test_04/npbparams.h: -------------------------------------------------------------------------------- 1 | c CLASS = B 2 | c 3 | c 4 | c This file is generated automatically by the setparams utility. 5 | c It sets the number of processors and the class of the NPB 6 | c in this directory. Do not modify it by hand. 7 | c 8 | integer problem_size, niter_default 9 | parameter (problem_size=10, niter_default=2) 10 | double precision dt_default 11 | parameter (dt_default = 0.0003d0) 12 | logical convertdouble 13 | parameter (convertdouble = .false.) 14 | character*11 compiletime 15 | parameter (compiletime='10 Oct 2013') 16 | character*3 npbversion 17 | parameter (npbversion='3.0') 18 | character*8 cs1 19 | parameter (cs1='gfortran') 20 | character*5 cs2 21 | parameter (cs2='clang') 22 | character*6 cs3 23 | parameter (cs3='(none)') 24 | character*6 cs4 25 | parameter (cs4='(none)') 26 | character*6 cs5 27 | parameter (cs5='(none)') 28 | character*6 cs6 29 | parameter (cs6='(none)') 30 | character*6 cs7 31 | parameter (cs7='randi8') 32 | -------------------------------------------------------------------------------- /tests/test_04/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | make veryclean 6 | make -j4 CERE_MODE="dump --region=__cere__verify_verify__265" 7 | ./BT 8 | 9 | make clean 10 | make -j4 CERE_REPLAY_REPETITIONS=2 CERE_MODE="replay --region=__cere__verify_verify__265 --instrument --wrapper=-lcere_rdtsc" 11 | ./BT 12 | 13 | rm -rf "$TMPDIR" 14 | if grep "__cere__verify_verify__265,2" __cere__verify_verify__265.csv ; then 15 | return 0 16 | else 17 | return 1 18 | fi 19 | } 20 | 21 | source ../source.sh 22 | -------------------------------------------------------------------------------- /tests/test_04/wtime.c: -------------------------------------------------------------------------------- 1 | #include "wtime.h" 2 | #include 3 | 4 | void wtime(double *t) 5 | { 6 | static int sec = -1; 7 | struct timeval tv; 8 | gettimeofday(&tv, (void *)0); 9 | if (sec < 0) sec = tv.tv_sec; 10 | *t = (tv.tv_sec - sec) + 1.0e-6*tv.tv_usec; 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/test_04/wtime.h: -------------------------------------------------------------------------------- 1 | /* C/Fortran interface is different on different machines. 2 | * You may need to tweak this. 3 | */ 4 | 5 | 6 | #if defined(IBM) 7 | #define wtime wtime 8 | #elif defined(CRAY) 9 | #define wtime WTIME 10 | #else 11 | #define wtime wtime_ 12 | #endif 13 | -------------------------------------------------------------------------------- /tests/test_05/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | BENCHMARK=is 3 | BENCHMARKU=IS 4 | PROJECT_ROOT=../../ 5 | 6 | include make.def 7 | 8 | CC=../../src/cerec 9 | CLINK=../../src/cerec 10 | 11 | FLAGS=-g 12 | 13 | PROGRAM=IS 14 | 15 | OBJS = is.o \ 16 | c_print_results.o \ 17 | c_timers.o \ 18 | wtime.o 19 | 20 | 21 | ${PROGRAM}: ${OBJS} 22 | ${CLINK} ${CLINKFLAGS} ${FLAGS} -o ${PROGRAM} ${OBJS} ${C_LIB} 23 | 24 | .c.o: 25 | ${CC} ${INSTRU} ${INSTRU_OPTS} ${FLAGS} -c $< 26 | 27 | is.o: is.c npbparams.h 28 | 29 | clean: 30 | - rm -f *.o *.s *.ll *~ mputil* 31 | - rm -f IS core 32 | 33 | veryclean: clean 34 | - rm -rf .cere/ regions.csv 35 | - rm -f realmain.c cere.* *.html 36 | -------------------------------------------------------------------------------- /tests/test_05/npbparams.h: -------------------------------------------------------------------------------- 1 | #define CLASS 'W' 2 | /* 3 | This file is generated automatically by the setparams utility. 4 | It sets the number of processors and the class of the NPB 5 | in this directory. Do not modify it by hand. */ 6 | 7 | #define COMPILETIME "10 Oct 2013" 8 | #define NPBVERSION "3.0" 9 | #define CC "clang" 10 | #define CFLAGS "(none)" 11 | #define CLINK "clang" 12 | #define CLINKFLAGS "(none)" 13 | #define C_LIB "(none)" 14 | #define C_INC "(none)" 15 | -------------------------------------------------------------------------------- /tests/test_05/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | make veryclean 6 | cere configure --build-cmd="make" --clean-cmd="make clean" --run-cmd="./IS" 7 | cere profile --regions 8 | exit $? 9 | } 10 | 11 | source ../source.sh 12 | -------------------------------------------------------------------------------- /tests/test_05/wtime.c: -------------------------------------------------------------------------------- 1 | #include "wtime.h" 2 | #include 3 | 4 | void wtime(double *t) 5 | { 6 | static int sec = -1; 7 | struct timeval tv; 8 | gettimeofday(&tv, (void *)0); 9 | if (sec < 0) sec = tv.tv_sec; 10 | *t = (tv.tv_sec - sec) + 1.0e-6*tv.tv_usec; 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/test_05/wtime.h: -------------------------------------------------------------------------------- 1 | /* C/Fortran interface is different on different machines. 2 | * You may need to tweak this. 3 | */ 4 | 5 | 6 | #if defined(IBM) 7 | #define wtime wtime 8 | #elif defined(CRAY) 9 | #define wtime WTIME 10 | #else 11 | #define wtime wtime_ 12 | #endif 13 | -------------------------------------------------------------------------------- /tests/test_06/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | BENCHMARK=ft 3 | BENCHMARKU=FT 4 | PROJECT_ROOT=../../ 5 | include make.def 6 | CC=../../src/cerec 7 | F77=../../src/cerec 8 | FLINK=../../src/cerec 9 | FLAGS=-g -mcmodel=large 10 | 11 | OBJS = appft.o auxfnct.o fft3d.o mainft.o verify.o \ 12 | randi8.o print_results.o \ 13 | timers.o wtime.o 14 | 15 | PROGRAM=FT 16 | 17 | ${PROGRAM}: ${OBJS} 18 | ${FLINK} ${FLINKFLAGS} ${FLAGS} -o ${PROGRAM} ${OBJS} ${F_LIB} -lm -lgfortran 19 | 20 | %.o: %.c 21 | ${CC} ${FLAGS} -c $< 22 | 23 | .f.o: 24 | ${F77} ${FLAGS} -c $< 25 | 26 | appft.o: appft.f global.h npbparams.h 27 | auxfnct.o: auxfnct.f global.h npbparams.h 28 | fft3d.o: fft3d.f global.h npbparams.h 29 | mainft.o: mainft.f global.h npbparams.h 30 | verify.o: verify.f global.h npbparams.h 31 | 32 | clean: 33 | - rm -f *.o *~ mputil* *.s *.ll 34 | - rm -f ft core 35 | 36 | veryclean: clean 37 | - rm -rf .cere/ 38 | - rm -f realmain.c regions.csv 39 | -------------------------------------------------------------------------------- /tests/test_06/fortran_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_06/fortran_test -------------------------------------------------------------------------------- /tests/test_06/global.h: -------------------------------------------------------------------------------- 1 | include 'npbparams.h' 2 | 3 | c Cache blocking params. These values are good for most 4 | c RISC processors. 5 | c FFT parameters: 6 | c fftblock controls how many ffts are done at a time. 7 | c The default is appropriate for most cache-based machines 8 | c On vector machines, the FFT can be vectorized with vector 9 | c length equal to the block size, so the block size should 10 | c be as large as possible. This is the size of the smallest 11 | c dimension of the problem: 128 for class A, 256 for class B and 12 | c 512 for class C. 13 | 14 | integer fftblock_default, fftblockpad_default, 15 | & CacheSize,BlockMax 16 | parameter (fftblock_default=16, 17 | & fftblockpad_default=18, 18 | & CacheSize=8192, 19 | & BlockMax=32) 20 | 21 | integer fftblock, fftblockpad 22 | common /blockinfo/ fftblock, fftblockpad 23 | 24 | external timer_read 25 | double precision timer_read 26 | external ilog2 27 | integer ilog2 28 | 29 | external randlc 30 | double precision randlc 31 | 32 | double complex plane((BlockMax+1)*maxdim),pad(128), 33 | & scr(BlockMax+1,maxdim) 34 | common /workarr/ plane,pad,scr 35 | 36 | double precision seed, a, pi, alpha 37 | parameter (seed = 314159265.d0, a = 1220703125.d0, 38 | . pi = 3.141592653589793238d0, alpha=1.0d-6) 39 | 40 | c for checksum data 41 | double complex sums(0:niter_default) 42 | common /sumcomm/ sums 43 | 44 | logical timers_enabled 45 | common /timerscomm/ timers_enabled 46 | -------------------------------------------------------------------------------- /tests/test_06/npbparams.h: -------------------------------------------------------------------------------- 1 | c CLASS = B 2 | c 3 | c 4 | c This file is generated automatically by the setparams utility. 5 | c It sets the number of processors and the class of the NPB 6 | c in this directory. Do not modify it by hand. 7 | c 8 | integer nx, ny, nz, maxdim, niter_default, ntotal 9 | parameter (nx=128, ny=64, nz=64, maxdim=128) 10 | parameter (niter_default=20) 11 | parameter (ntotal=nx*ny*nz) 12 | logical convertdouble 13 | parameter (convertdouble = .false.) 14 | character*11 compiletime 15 | parameter (compiletime='22 Nov 2013') 16 | character*3 npbversion 17 | parameter (npbversion='3.0') 18 | character*3 cs1 19 | parameter (cs1='lec') 20 | character*3 cs2 21 | parameter (cs2='lel') 22 | character*6 cs3 23 | parameter (cs3='(none)') 24 | character*6 cs4 25 | parameter (cs4='(none)') 26 | character*3 cs5 27 | parameter (cs5='-O3') 28 | character*10 cs6 29 | parameter (cs6='-lgfortran') 30 | character*6 cs7 31 | parameter (cs7='randi8') 32 | -------------------------------------------------------------------------------- /tests/test_06/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | make veryclean 3 | make -j4 CERE_MODE="dump --region=__cere__auxfnct_ilog2__48" 4 | ./FT 5 | 6 | make clean 7 | make CERE_MODE="replay --region=__cere__auxfnct_ilog2__48" 8 | ./FT | grep '128 128' 9 | exit $? 10 | -------------------------------------------------------------------------------- /tests/test_06/wtime.c: -------------------------------------------------------------------------------- 1 | #include "wtime.h" 2 | #include 3 | 4 | void wtime(double *t) 5 | { 6 | static int sec = -1; 7 | struct timeval tv; 8 | gettimeofday(&tv, (void *)0); 9 | if (sec < 0) sec = tv.tv_sec; 10 | *t = (tv.tv_sec - sec) + 1.0e-6*tv.tv_usec; 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/test_06/wtime.h: -------------------------------------------------------------------------------- 1 | /* C/Fortran interface is different on different machines. 2 | * You may need to tweak this. 3 | */ 4 | 5 | 6 | #if defined(IBM) 7 | #define wtime wtime 8 | #elif defined(CRAY) 9 | #define wtime WTIME 10 | #else 11 | #define wtime wtime_ 12 | #endif 13 | -------------------------------------------------------------------------------- /tests/test_07/Makefile: -------------------------------------------------------------------------------- 1 | # Include standard template for this suite 2 | -include Makefile.defaults 3 | 4 | run: 5 | ./gromacs -silent -deffnm gromacs -nice 0 6 | 7 | nomakefiles: 8 | @echo "*** Whoops! I didn't find a Makefile.defaults file." 9 | @echo "*** Your distribution is probably corrupt." 10 | @echo 11 | -------------------------------------------------------------------------------- /tests/test_07/Makefile.deps: -------------------------------------------------------------------------------- 1 | 2 | # These are the build dependencies 3 | 4 | # End dependencies 5 | -------------------------------------------------------------------------------- /tests/test_07/ffscanf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id: ffscanf.h,v 1.7 2002/02/28 21:55:49 spoel Exp $ 3 | * 4 | * This source code is part of 5 | * 6 | * G R O M A C S 7 | * 8 | * GROningen MAchine for Chemical Simulations 9 | * 10 | * VERSION 3.1 11 | * Copyright (c) 1991-2001, University of Groningen, The Netherlands 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU General Public License 14 | * as published by the Free Software Foundation; either version 2 15 | * of the License, or (at your option) any later version. 16 | * 17 | * If you want to redistribute modifications, please consider that 18 | * scientific software is very special. Version control is crucial - 19 | * bugs must be traceable. We will be happy to consider code for 20 | * inclusion in the official distribution, but derived work must not 21 | * be called official GROMACS. Details are found in the README & COPYING 22 | * files - if they are missing, get the official version at www.gromacs.org. 23 | * 24 | * To help us fund GROMACS development, we humbly ask that you cite 25 | * the papers on the package - you can find them in the top README file. 26 | * 27 | * For more info, check our website at http://www.gromacs.org 28 | * 29 | * And Hey: 30 | * Grunge ROck MAChoS 31 | */ 32 | static char *SRCID_ffscanf_h = "$Id: ffscanf.h,v 1.7 2002/02/28 21:55:49 spoel Exp $"; 33 | #ifdef HAVE_CONFIG_H 34 | #include 35 | #endif 36 | 37 | extern void ffscanf(FILE *in,char *fmt, ...); 38 | 39 | -------------------------------------------------------------------------------- /tests/test_07/fortran_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_07/fortran_test -------------------------------------------------------------------------------- /tests/test_07/glaasje.h: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id: glaasje.h,v 1.2 2002/02/28 10:54:42 spoel Exp $ 3 | * 4 | * This source code is part of 5 | * 6 | * G R O M A C S 7 | * 8 | * GROningen MAchine for Chemical Simulations 9 | * 10 | * VERSION 3.1 11 | * Copyright (c) 1991-2001, University of Groningen, The Netherlands 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU General Public License 14 | * as published by the Free Software Foundation; either version 2 15 | * of the License, or (at your option) any later version. 16 | * 17 | * If you want to redistribute modifications, please consider that 18 | * scientific software is very special. Version control is crucial - 19 | * bugs must be traceable. We will be happy to consider code for 20 | * inclusion in the official distribution, but derived work must not 21 | * be called official GROMACS. Details are found in the README & COPYING 22 | * files - if they are missing, get the official version at www.gromacs.org. 23 | * 24 | * To help us fund GROMACS development, we humbly ask that you cite 25 | * the papers on the package - you can find them in the top README file. 26 | * 27 | * For more info, check our website at http://www.gromacs.org 28 | * 29 | * And Hey: 30 | * GROningen Mixture of Alchemy and Childrens' Stories 31 | */ 32 | static char *SRCID_glaasje_h = "$Id: glaasje.h,v 1.2 2002/02/28 10:54:42 spoel Exp $"; 33 | extern void do_glas(FILE *log,int start,int homenr,rvec x[],rvec f[], 34 | t_forcerec *fr,t_mdatoms *md,int atnr,t_inputrec *ir, 35 | real ener[]); 36 | -------------------------------------------------------------------------------- /tests/test_07/gromacs.tpr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_07/gromacs.tpr -------------------------------------------------------------------------------- /tests/test_07/splittop.h: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id: splittop.h,v 1.5 2002/02/28 10:32:06 spoel Exp $ 3 | * 4 | * This source code is part of 5 | * 6 | * G R O M A C S 7 | * 8 | * GROningen MAchine for Chemical Simulations 9 | * 10 | * VERSION 3.1 11 | * Copyright (c) 1991-2001, University of Groningen, The Netherlands 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU General Public License 14 | * as published by the Free Software Foundation; either version 2 15 | * of the License, or (at your option) any later version. 16 | * 17 | * If you want to redistribute modifications, please consider that 18 | * scientific software is very special. Version control is crucial - 19 | * bugs must be traceable. We will be happy to consider code for 20 | * inclusion in the official distribution, but derived work must not 21 | * be called official GROMACS. Details are found in the README & COPYING 22 | * files - if they are missing, get the official version at www.gromacs.org. 23 | * 24 | * To help us fund GROMACS development, we humbly ask that you cite 25 | * the papers on the package - you can find them in the top README file. 26 | * 27 | * For more info, check our website at http://www.gromacs.org 28 | * 29 | * And Hey: 30 | * GROup of MAchos and Cynical Suckers 31 | */ 32 | static char *SRCID_splittop_h = "$Id: splittop.h,v 1.5 2002/02/28 10:32:06 spoel Exp $"; 33 | #include "dummies.h" 34 | 35 | extern void mdsplit_top(FILE *log,t_topology *top,t_commrec *cr, 36 | t_nsborder *nsb, bool *bParallelDummies, 37 | t_comm_dummies *dummycomm); 38 | 39 | 40 | -------------------------------------------------------------------------------- /tests/test_07/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | rm -rf ./cere/dumps/ *.ll 6 | make clean 7 | make -j4 CERE_MODE="dump --region=__cere__fnbf_do_fnbf_232 --invocation=7948" 8 | ./gromacs -silent -deffnm gromacs -nice 0 9 | 10 | make clean 11 | make -j4 CERE_REPLAY_REPETITIONS=1 CERE_MODE="replay --region=__cere__fnbf_do_fnbf_232 --invocation=7948 --instrument --wrapper=-lcere_rdtsc" 12 | ./gromacs -silent -deffnm gromacs -nice 0 > $TMPDIR/test.replay.out 2>&1 13 | 14 | #diff -u $TMPDIR/test.replay.out verif 15 | } 16 | 17 | source ../source.sh 18 | -------------------------------------------------------------------------------- /tests/test_07/types/symtab.h: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id: symtab.h,v 1.5 2002/02/28 21:55:53 spoel Exp $ 3 | * 4 | * This source code is part of 5 | * 6 | * G R O M A C S 7 | * 8 | * GROningen MAchine for Chemical Simulations 9 | * 10 | * VERSION 3.1 11 | * Copyright (c) 1991-2001, University of Groningen, The Netherlands 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU General Public License 14 | * as published by the Free Software Foundation; either version 2 15 | * of the License, or (at your option) any later version. 16 | * 17 | * If you want to redistribute modifications, please consider that 18 | * scientific software is very special. Version control is crucial - 19 | * bugs must be traceable. We will be happy to consider code for 20 | * inclusion in the official distribution, but derived work must not 21 | * be called official GROMACS. Details are found in the README & COPYING 22 | * files - if they are missing, get the official version at www.gromacs.org. 23 | * 24 | * To help us fund GROMACS development, we humbly ask that you cite 25 | * the papers on the package - you can find them in the top README file. 26 | * 27 | * For more info, check our website at http://www.gromacs.org 28 | * 29 | * And Hey: 30 | * Gnomes, ROck Monsters And Chili Sauce 31 | */ 32 | #ifdef HAVE_CONFIG_H 33 | #include 34 | #endif 35 | 36 | typedef struct symbuf { 37 | int bufsize; 38 | char **buf; 39 | struct symbuf *next; 40 | } t_symbuf; 41 | 42 | typedef struct 43 | { 44 | int nr; 45 | t_symbuf *symbuf; 46 | } t_symtab; 47 | 48 | -------------------------------------------------------------------------------- /tests/test_08/Makefile: -------------------------------------------------------------------------------- 1 | # Include standard template for this suite 2 | -include Makefile.defaults 3 | 4 | run: 5 | ./zeusmp 6 | 7 | nomakefiles: 8 | @echo "*** Whoops! I didn't find a Makefile.defaults file." 9 | @echo "*** Your distribution is probably corrupt." 10 | @echo 11 | -------------------------------------------------------------------------------- /tests/test_08/Makefile.deps: -------------------------------------------------------------------------------- 1 | 2 | # These are the build dependencies 3 | 4 | # End dependencies 5 | -------------------------------------------------------------------------------- /tests/test_08/empty.f: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | subroutine empty 79 | implicit NONE 80 | return 81 | end 82 | -------------------------------------------------------------------------------- /tests/test_08/fort.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_08/fort.1 -------------------------------------------------------------------------------- /tests/test_08/fortran_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_08/fortran_test -------------------------------------------------------------------------------- /tests/test_08/gpbv.f: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | c======================================================================= 79 | c 80 | c Developed by 81 | c Laboratory of Computational Astrophysics 82 | c University of Illinois at Urbana-Champaign 83 | c 84 | subroutine gpbv 85 | 86 | 87 | return 88 | end 89 | 90 | -------------------------------------------------------------------------------- /tests/test_08/grdv.f: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | c======================================================================= 79 | c 80 | c \\\\\\\\\\ B E G I N S U B R O U T I N E ////////// 81 | c ////////// G R D V \\\\\\\\\\ 82 | c 83 | c Developed by 84 | c Laboratory of Computational Astrophysics 85 | c University of Illinois at Urbana-Champaign 86 | c 87 | c======================================================================= 88 | subroutine grdv (ibeg,iend,jbeg,jend,kbeg,kend, 89 | . erold,gvcf,deldotv) 90 | 91 | return 92 | end 93 | c======================================================================= 94 | c 95 | c \\\\\\\\\\ E N D S U B R O U T I N E ////////// 96 | c ////////// G R D V \\\\\\\\\\ 97 | c 98 | c======================================================================= 99 | -------------------------------------------------------------------------------- /tests/test_08/hdfall.f: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | c======================================================================= 79 | c 80 | c Developed by 81 | c Laboratory of Computational Astrophysics 82 | c University of Illinois at Urbana-Champaign 83 | c 84 | subroutine hdfall(filename) 85 | c 86 | c PURPOSE: Makes an hdf dump of all the active field variables. The 87 | c set of field variables dumped is problem specific (depends on what 88 | c physics is defined). Data is written in the Scientific Data Set 89 | c format to the file zhzXXNNNNNN.MMM. 90 | c Note that data must be stored column major and contiguously in order 91 | c to interface correctly to the C hdf routines. All variables are 92 | c dumped as zone centered quantities. 93 | c 94 | c EXTERNALS: HDF library routines 95 | c 96 | c LOCALS: 97 | c 98 | c LAST MODIFIED: by JCH; 3/12/97. 99 | c----------------------------------------------------------------------- 100 | implicit NONE 101 | c 102 | character*15 filename 103 | 104 | return 105 | end 106 | -------------------------------------------------------------------------------- /tests/test_08/movie.f: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | c======================================================================= 79 | c 80 | c Developed by 81 | c Laboratory of Computational Astrophysics 82 | c University of Illinois at Urbana-Champaign 83 | c 84 | subroutine movie 85 | 86 | return 87 | end 88 | -------------------------------------------------------------------------------- /tests/test_08/newgrid.f: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | c======================================================================= 79 | c 80 | c Developed by 81 | c Laboratory of Computational Astrophysics 82 | c University of Illinois at Urbana-Champaign 83 | c 84 | subroutine newgrid 85 | 86 | return 87 | end 88 | -------------------------------------------------------------------------------- /tests/test_08/newvg.f: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | c======================================================================= 79 | c 80 | c Developed by 81 | c Laboratory of Computational Astrophysics 82 | c University of Illinois at Urbana-Champaign 83 | c 84 | subroutine newvg 85 | 86 | return 87 | end 88 | -------------------------------------------------------------------------------- /tests/test_08/newx1.f: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | c======================================================================= 79 | c 80 | c Developed by 81 | c Laboratory of Computational Astrophysics 82 | c University of Illinois at Urbana-Champaign 83 | c 84 | subroutine newx1 85 | 86 | return 87 | end 88 | -------------------------------------------------------------------------------- /tests/test_08/newx2.f: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | c======================================================================= 79 | c 80 | c Developed by 81 | c Laboratory of Computational Astrophysics 82 | c University of Illinois at Urbana-Champaign 83 | c 84 | subroutine newx2 85 | 86 | return 87 | end 88 | -------------------------------------------------------------------------------- /tests/test_08/strtoi.f: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | c======================================================================= 79 | c 80 | c Developed by 81 | c Laboratory of Computational Astrophysics 82 | c University of Illinois at Urbana-Champaign 83 | c 84 | integer function strtoi(string,istrt,iend) 85 | c 86 | c CONVERTS A SEGMENT OF A CHARACTER*8 STRING INTO AN INTEGER NUMBER 87 | c 88 | c----------------------------------------------------------------------- 89 | implicit NONE 90 | c 91 | character*15 string 92 | integer istrt,iend,asciic(48:57),ishift,ival,i 93 | data asciic / 0,1,2,3,4,5,6,7,8,9 / 94 | save asciic 95 | c 96 | c======================================================================= 97 | c 98 | ishift = 1 99 | ival = 0 100 | do 10 i=iend,istrt,-1 101 | ival = ival + ishift*asciic(ichar(string(i:i))) 102 | ishift = ishift*10 103 | 10 continue 104 | strtoi = ival 105 | c 106 | return 107 | end 108 | -------------------------------------------------------------------------------- /tests/test_08/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | # disabling test, since newer dragonegg versions cannot compile linpck.ll, this is not a bug with CERE, 6 | # 7 | #/usr/lib/llvm-3.4/bin/opt: linpck.ll:1946:69: error: referenced value is not a basic block 8 | # %6 = phi i8* [ %151, %"35.5_crit_edge" ], [ blockaddress(@snrm2_, %"9"), %newFuncRoot ], !dbg !177 9 | # ^ 10 | #linpck.ll:1946:69: error: referenced value is not a basic block 11 | # %6 = phi i8* [ %151, %"35.5_crit_edge" ], [ blockaddress(@snrm2_, %"9"), %newFuncRoot ], !dbg !177 12 | # 13 | echo "disabled" 14 | # rm -rf .cere/ *.ll 15 | # make clean 16 | # make -j4 CERE_MODE="dump --region=__cere__advx1_advx1__622 --invocation=1" 17 | # ./zeusmp 18 | # 19 | # make clean 20 | # make -j4 CERE_REPLAY_REPETITIONS=1 CERE_MODE="replay --region=__cere__advx1_advx1__622 --invocation=1 --instrument --wrapper=-lcere_rdtsc" 21 | # ./zeusmp > $TMPDIR/test.replay.out 2>&1 22 | } 23 | 24 | source ../source.sh 25 | -------------------------------------------------------------------------------- /tests/test_08/zmp_inp: -------------------------------------------------------------------------------- 1 | &mpitop ntiles(1)=1,ntiles(2)=1,ntiles(3)=1,periodic=3*.false. / 2 | &rescon / 3 | &pcon nlim=30, tlim=1.e-1, cpulim= 100000.0, mbatch=1 / 4 | &hycon qcon=0.2,courno=0.5 / 5 | &iib niis(1)=2 / 6 | &oib nois(1)=2 / 7 | &ijb nijs(1)=2 / 8 | &ojb nojs(1)=2 / 9 | &ikb niks(1)=2 / 10 | &okb noks(1)=2 / 11 | &ggen1 nbl=64,x1min=-1.0,x1max=1.0,igrid=1,x1rat=1.,lgrid=.true. / 12 | &ggen2 nbl=64,x2min=-1.0,x2max=1.0,igrid=1,x2rat=1.,lgrid=.true. / 13 | &ggen3 nbl=64,x3min=-1.0,x3max=1.0,igrid=1,x3rat=1.,lgrid=.true. / 14 | &grvcon / 15 | &radcon / 16 | &radexp / 17 | &eqos gamma=1.6666667 / 18 | &pgen r=0.20, x10=0.0, x20=0.0, x30=0.0, d0=1.0, drat=100.0 19 | , p0=0.6, prat=1.0e6, b10=140.0, b20=0.0, b30=0.0 / 20 | &gcon / 21 | &iocon ttsl=0.0, dttsl=1.e-1 / 22 | -------------------------------------------------------------------------------- /tests/test_09/Makefile: -------------------------------------------------------------------------------- 1 | # Include standard template for this suite 2 | -include Makefile.defaults 3 | 4 | run: 5 | ./bwaves 6 | 7 | nomakefiles: 8 | @echo "*** Whoops! I didn't find a Makefile.defaults file." 9 | @echo "*** Your distribution is probably corrupt." 10 | @echo 11 | -------------------------------------------------------------------------------- /tests/test_09/Makefile.deps: -------------------------------------------------------------------------------- 1 | 2 | # These are the build dependencies 3 | 4 | # End dependencies 5 | -------------------------------------------------------------------------------- /tests/test_09/bwaves.in: -------------------------------------------------------------------------------- 1 | 'Re Pr' 2 | 1d5 .72d0 3 | 'nx ny nz' 4 | 33 33 16 5 | 'CFL nuim nuex2 nuex4' 6 | 2.d0 0.1d0 0.1d0 0.05d0 7 | 'Method: explicit(0) Implicit(1)' 8 | 1 9 | 'Configuration: cubuc(0) sphere(1)' 10 | 0 11 | 'Number of Time Steps' 12 | 25 13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/test_09/fortran_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_09/fortran_test -------------------------------------------------------------------------------- /tests/test_09/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | rm -rf .cere/ *.ll 6 | make clean 7 | make -j4 CERE_MODE="dump --region=__cere__block_solver_bi_cgstab_block__52 --invocation=6" 8 | ./bwaves 9 | 10 | make clean 11 | make -j4 CERE_REPLAY_REPETITIONS=1 CERE_MODE="replay --region=__cere__block_solver_bi_cgstab_block__52 --invocation=6 --instrument --wrapper=-lcere_rdtsc" 12 | ./bwaves > $TMPDIR/test.replay.out 2>&1 13 | } 14 | 15 | source ../source.sh 16 | -------------------------------------------------------------------------------- /tests/test_10/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | PROJECT_ROOT=../../ 3 | CC=../../src/cerec 4 | FLINK=../../src/cerec 5 | 6 | FLAGS=-O3 -g 7 | 8 | OBJS = test.o 9 | 10 | PROGRAM=test 11 | 12 | ${PROGRAM}: ${OBJS} 13 | ${FLINK} ${FLAGS} -o ${PROGRAM} ${OBJS} ${F_LIB} 14 | 15 | %.o: %.c 16 | ${CC} ${FLAGS} -c $< 17 | 18 | clean: 19 | - rm -f *.o *.s *.ll 20 | - rm -f test 21 | 22 | veryclean: clean 23 | - rm -rf .cere/ 24 | - rm -f *.o realmain.c 25 | -------------------------------------------------------------------------------- /tests/test_10/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define stderr_print(fmt, ...) fprintf(stderr, fmt, __VA_ARGS__) 5 | 6 | static int value = 10; 7 | 8 | void check(void) 9 | { 10 | int i; 11 | for (i = 0; i < 10; i++) { 12 | stderr_print("value = %d\n", value); 13 | } 14 | } 15 | 16 | void init(void) 17 | { 18 | value = 42; 19 | } 20 | 21 | int main(int argc, char **argv) 22 | { 23 | init(); 24 | check(); 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /tests/test_10/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | make veryclean 6 | make -j4 CERE_MODE="dump --region=__cere__test_check_11" 7 | ./test > $TMPDIR/test.dump.out 2>&1 8 | 9 | make clean 10 | make -j4 CERE_MODE="replay --region=__cere__test_check_11" 11 | ./test > $TMPDIR/test.replay.out 2>&1 12 | 13 | cat $TMPDIR/test.dump.out | grep "value =" | head -n1 > $TMPDIR/test.a 14 | cat $TMPDIR/test.replay.out | grep "value =" | head -n1 > $TMPDIR/test.b 15 | 16 | if [ ! -s $TMPDIR/test.a ]; then 17 | return 1 18 | fi 19 | 20 | cat $TMPDIR/test.a 21 | cat $TMPDIR/test.b 22 | 23 | diff $TMPDIR/test.a $TMPDIR/test.b 24 | } 25 | 26 | source ../source.sh 27 | -------------------------------------------------------------------------------- /tests/test_11/Makefile: -------------------------------------------------------------------------------- 1 | # Include standard template for this suite 2 | -include Makefile.defaults 3 | 4 | run: 5 | ./lbm 20 reference.dat 0 1 100_100_130_ldc.of 6 | 7 | nomakefiles: 8 | @echo "*** Whoops! I didn't find a Makefile.defaults file." 9 | @echo "*** Your distribution is probably corrupt." 10 | @echo 11 | -------------------------------------------------------------------------------- /tests/test_11/Makefile.deps: -------------------------------------------------------------------------------- 1 | 2 | # These are the build dependencies 3 | 4 | # End dependencies 5 | -------------------------------------------------------------------------------- /tests/test_11/config.h: -------------------------------------------------------------------------------- 1 | /* $Id: config.h,v 1.5 2004/04/20 14:42:56 pohlt Exp $ */ 2 | 3 | /*############################################################################*/ 4 | 5 | #ifndef _CONFIG_H_ 6 | #define _CONFIG_H_ 7 | 8 | /*############################################################################*/ 9 | 10 | #define SIZE (100) 11 | #define SIZE_X (1*SIZE) 12 | #define SIZE_Y (1*SIZE) 13 | #define SIZE_Z (130) 14 | 15 | #define OMEGA (1.95) 16 | 17 | #define OUTPUT_PRECISION float 18 | 19 | #define BOOL int 20 | #define TRUE (-1) 21 | #define FALSE (0) 22 | 23 | /*############################################################################*/ 24 | 25 | #endif /* _CONFIG_H_ */ 26 | -------------------------------------------------------------------------------- /tests/test_11/lbm.in: -------------------------------------------------------------------------------- 1 | 3000 reference.dat 0 0 100_100_130_ldc.of 2 | -------------------------------------------------------------------------------- /tests/test_11/main.h: -------------------------------------------------------------------------------- 1 | /* $Id: main.h,v 1.4 2004/04/21 04:23:43 pohlt Exp $ */ 2 | 3 | /*############################################################################*/ 4 | 5 | #ifndef _MAIN_H_ 6 | #define _MAIN_H_ 7 | 8 | /*############################################################################*/ 9 | 10 | #include "config.h" 11 | 12 | #if !defined(SPEC_CPU) 13 | #include 14 | #endif 15 | 16 | /*############################################################################*/ 17 | 18 | #if !defined(SPEC_CPU) 19 | typedef struct { 20 | double timeScale; 21 | clock_t tickStart, tickStop; 22 | struct tms timeStart, timeStop; 23 | 24 | } MAIN_Time; 25 | #endif 26 | 27 | typedef enum {NOTHING = 0, COMPARE, STORE} MAIN_Action; 28 | typedef enum {LDC = 0, CHANNEL} MAIN_SimType; 29 | 30 | typedef struct { 31 | int nTimeSteps; 32 | char* resultFilename; 33 | MAIN_Action action; 34 | MAIN_SimType simType; 35 | char* obstacleFilename; 36 | } MAIN_Param; 37 | 38 | /*############################################################################*/ 39 | 40 | void MAIN_parseCommandLine( int nArgs, char* arg[], MAIN_Param* param ); 41 | void MAIN_printInfo( const MAIN_Param* param ); 42 | void MAIN_initialize( const MAIN_Param* param ); 43 | void MAIN_finalize( const MAIN_Param* param ); 44 | 45 | #if !defined(SPEC_CPU) 46 | void MAIN_startClock( MAIN_Time* time ); 47 | void MAIN_stopClock( MAIN_Time* time, const MAIN_Param* param ); 48 | #endif 49 | 50 | /*############################################################################*/ 51 | 52 | #endif /* _MAIN_H_ */ 53 | -------------------------------------------------------------------------------- /tests/test_11/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | #make clean && rm -r dump/ 6 | #make -j4 MODE="dump" 7 | #./lbm 20 reference.dat 0 1 100_100_130_ldc.of 8 | true 9 | } 10 | 11 | source ../source.sh 12 | -------------------------------------------------------------------------------- /tests/test_12/Makefile: -------------------------------------------------------------------------------- 1 | # Include standard template for this suite 2 | -include Makefile.defaults 3 | 4 | run: 5 | cat leslie3d.in |./leslie3d 6 | 7 | nomakefiles: 8 | @echo "*** Whoops! I didn't find a Makefile.defaults file." 9 | @echo "*** Your distribution is probably corrupt." 10 | @echo 11 | -------------------------------------------------------------------------------- /tests/test_12/Makefile.deps: -------------------------------------------------------------------------------- 1 | 2 | # These are the build dependencies 3 | 4 | # End dependencies 5 | -------------------------------------------------------------------------------- /tests/test_12/fortran_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_12/fortran_test -------------------------------------------------------------------------------- /tests/test_12/leslie3d.in: -------------------------------------------------------------------------------- 1 | c---- 2 | c----prefix NTHREADS 3 | './' 2 4 | c 5 | c----imax jmax kmax taumax 6 | 121 121 15 10.0 7 | c 8 | c----irstrt nend nprnt iflprnt itime nstat 9 | 0 100000 0 0 10 0 10 | c 11 | c----xlen ylen zlen 12 | 12.56 12.56 1.57 13 | c 14 | c----cfl uref tref pref pexit 15 | 0.25 10.0 2.98 1.01325e3 1.012325e4 16 | c 17 | c----tstnd NUREF ALREF 18 | 0.00 0.002 1.0 19 | c 20 | c----cnuk ce cepsk cprod ekfac 21 | 0.0667 1.0 0.916 1.0 0.001 22 | c 23 | c----iprint itpts jtpts ktpts 24 | 0 7 7 7 25 | c 26 | c----I-Coords of Trace Data Collection Points 27 | 1 10 20 30 40 50 60 28 | c 29 | c----J-Coords of Trace Data Collection Points 30 | 1 10 20 30 40 50 60 31 | c 32 | c----K-Coords of Trace Data Collection Points 33 | 1 10 20 30 40 50 60 34 | c 35 | c---------------------------------------------------------------- 36 | CONC0 RMWT CPK HFK 37 | c---------------------------------------------------------------- 38 | 0.50 32.00 916.60 0.0 39 | 0.50 32.00 916.60 0.0 40 | c---------------------------------------------------------------- 41 | -------------------------------------------------------------------------------- /tests/test_12/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | make veryclean 6 | make -j4 CERE_MODE="dump --region=__cere__tml_fluxk__1268" 7 | ./leslie3d < leslie3d.in 8 | 9 | make clean 10 | make -j4 CERE_REPLAY_REPETITIONS=1 CERE_MODE="replay --region=__cere__tml_fluxk__1268" 11 | ./leslie3d < leslie3d.in 12 | } 13 | 14 | source ../source.sh 15 | -------------------------------------------------------------------------------- /tests/test_13/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | PROJECT_ROOT=../../ 3 | CC=../../src/cerec 4 | FLINK=../../src/cerec 5 | 6 | FLAGS=-O0 7 | 8 | OBJS = test.o 9 | 10 | PROGRAM=test 11 | 12 | ${PROGRAM}: ${OBJS} 13 | ${FLINK} ${MODE} ${FLAGS} -o ${PROGRAM} ${OBJS} ${F_LIB} 14 | 15 | %.o: %.c 16 | ${CC} ${MODE} -c ${FLAGS} $< 17 | 18 | clean: 19 | - rm -f *.o *.s *.ll *.bin *.csv 20 | - rm -f test 21 | 22 | veryclean: clean 23 | - rm -rf .cere/ 24 | - rm -f *.o realmain.c regions.csv 25 | -------------------------------------------------------------------------------- /tests/test_13/iter.R: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env Rscript 2 | 3 | args <- commandArgs(trailingOnly = TRUE) 4 | 5 | options(warn=-1) 6 | options(error=traceback) 7 | 8 | CodeletName = args[1] 9 | invocation = as.integer(args[2]) 10 | binFile = paste(CodeletName, ".bin", sep="") 11 | 12 | nbValues=invocation 13 | to.read=file(binFile, "rb") 14 | tracedLoop=readBin(to.read, double(), n=nbValues*2) 15 | cat((tracedLoop[seq(1,nbValues*2, 2)])[invocation], "\n") 16 | -------------------------------------------------------------------------------- /tests/test_13/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #define PAGESIZE 4096 5 | #define round_to_page(addr) ((char *)(((long unsigned)(addr)) & ~(PAGESIZE-1))) 6 | #define WIDTH 4096*10 7 | #define CACHE_SIZE_MB 20 8 | 9 | void cacheflush(void) { 10 | const size_t size = CACHE_SIZE_MB*1024*1024; 11 | int i, j; 12 | char *c = malloc(size); 13 | for (i = 0; i < 5; i++) 14 | for (j = 0; j < size; j++) 15 | c[j] = i*j; 16 | } 17 | 18 | 19 | int loop(int *a, int size) 20 | { 21 | int i; 22 | int n = a[0]; 23 | for (i = 1; i < 1000; i++) { 24 | //fprintf(stderr, "touched %p\n", round_to_page(&a[n])); 25 | n=a[n]; 26 | } 27 | return n; 28 | } 29 | 30 | void init(int *a, int size) 31 | { 32 | int i; 33 | srand(1); 34 | for (i= 0; i < size; i++) { 35 | a[i] = rand()%(size); 36 | } 37 | } 38 | 39 | 40 | 41 | int main(int argc, char **argv) 42 | { 43 | int c = 0; 44 | int k; 45 | 46 | int * a = malloc(sizeof(int)*WIDTH); 47 | int * d = malloc(sizeof(int)*4096*10); 48 | int * b = malloc(sizeof(int)*WIDTH); 49 | 50 | init(a, WIDTH); 51 | init(b, WIDTH); 52 | 53 | cacheflush(); 54 | 55 | printf("a: %p -> %p\n", &a[0], &a[WIDTH]); 56 | printf("b: %p -> %p\n", &b[0], &b[WIDTH]); 57 | 58 | fprintf(stderr, "ITERATION = 1\n"); 59 | c += loop(a, WIDTH); 60 | 61 | fprintf(stderr, "ITERATION = 2\n"); 62 | c += loop(b, WIDTH); 63 | 64 | fprintf(stderr, "ITERATION = 3\n"); 65 | c += loop(a, WIDTH); 66 | 67 | fprintf(stderr, "ITERATION = 4\n"); 68 | c += loop(b, WIDTH); 69 | printf("%d\n", c); 70 | 71 | return 0; 72 | } 73 | -------------------------------------------------------------------------------- /tests/test_14/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | PROJECT_ROOT=../../ 3 | CC=../../src/cerec 4 | FLINK=../../src/cerec 5 | 6 | FLAGS=-O0 7 | 8 | OBJS = test.o 9 | 10 | PROGRAM=test 11 | 12 | ${PROGRAM}: ${OBJS} 13 | ${FLINK} ${MODE} ${FLAGS} -o ${PROGRAM} ${OBJS} ${F_LIB} 14 | 15 | %.o: %.c 16 | ${CC} ${MODE} -c ${FLAGS} $< 17 | 18 | clean: 19 | - rm -f *.o *.s *.ll *.bin *.csv 20 | - rm -f test 21 | 22 | veryclean: clean 23 | - rm -rf .cere/ 24 | - rm -f *.o realmain.c regions.csv 25 | -------------------------------------------------------------------------------- /tests/test_14/iter.R: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env Rscript 2 | 3 | args <- commandArgs(trailingOnly = TRUE) 4 | 5 | options(warn=-1) 6 | options(error=traceback) 7 | 8 | CodeletName = args[1] 9 | invocation = as.integer(args[2]) 10 | binFile = paste(CodeletName, ".bin", sep="") 11 | 12 | nbValues=invocation 13 | to.read=file(binFile, "rb") 14 | tracedLoop=readBin(to.read, double(), n=nbValues*2) 15 | cat((tracedLoop[seq(1,nbValues*2, 2)])[invocation], "\n") 16 | -------------------------------------------------------------------------------- /tests/test_14/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #define PAGESIZE 4096 5 | #define round_to_page(addr) ((char *)(((long unsigned)(addr)) & ~(PAGESIZE-1))) 6 | #define WIDTH 4096*32 7 | #define CACHE_SIZE_MB 20 8 | 9 | void cacheflush(void) { 10 | const size_t size = CACHE_SIZE_MB*1024*1024; 11 | int i, j; 12 | char *c = malloc(size); 13 | for (i = 0; i < 5; i++) 14 | for (j = 0; j < size; j++) 15 | c[j] = i*j; 16 | } 17 | 18 | 19 | int loop(int *a, int size) 20 | { 21 | int i; 22 | int n = a[0]; 23 | for (i = 1; i < 1000; i++) { 24 | //fprintf(stderr, "touched %p\n", round_to_page(&a[n])); 25 | n=a[n]; 26 | } 27 | return n; 28 | } 29 | 30 | void init(int *a, int size) 31 | { 32 | int i; 33 | srand(1); 34 | for (i= 0; i < size; i++) { 35 | a[i] = rand()%(size); 36 | } 37 | } 38 | 39 | 40 | 41 | int main(int argc, char **argv) 42 | { 43 | int c = 0; 44 | int k; 45 | 46 | int * a = malloc(sizeof(int)*WIDTH); 47 | int * d = malloc(sizeof(int)*4096*10); 48 | int * b = malloc(sizeof(int)*WIDTH); 49 | 50 | init(a, WIDTH); 51 | init(b, WIDTH); 52 | 53 | cacheflush(); 54 | 55 | printf("a: %p -> %p\n", &a[0], &a[WIDTH]); 56 | printf("b: %p -> %p\n", &b[0], &b[WIDTH]); 57 | 58 | fprintf(stderr, "ITERATION = 1\n"); 59 | c += loop(a, WIDTH); 60 | 61 | fprintf(stderr, "ITERATION = 2\n"); 62 | c += loop(a, WIDTH); 63 | 64 | fprintf(stderr, "ITERATION = 3\n"); 65 | c += loop(a, WIDTH); 66 | 67 | fprintf(stderr, "ITERATION = 4\n"); 68 | c += loop(b, WIDTH); 69 | printf("%d\n", c); 70 | 71 | return 0; 72 | } 73 | -------------------------------------------------------------------------------- /tests/test_15/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | PROJECT_ROOT=../../ 3 | CC=../../src/cerec 4 | FLINK=../../src/cerec 5 | 6 | FLAGS=-O0 7 | 8 | OBJS = test.o 9 | 10 | PROGRAM=test 11 | 12 | ${PROGRAM}: ${OBJS} 13 | ${FLINK} ${MODE} ${FLAGS} -o ${PROGRAM} ${OBJS} ${F_LIB} 14 | 15 | %.o: %.c 16 | ${CC} ${MODE} ${FLAGS} -c $< 17 | 18 | clean: 19 | - rm -f *.o *.s *.ll *.bin *.csv 20 | - rm -f test 21 | 22 | veryclean: clean 23 | - rm -rf .cere/ 24 | - rm -f *.o realmain.c regions.csv 25 | -------------------------------------------------------------------------------- /tests/test_15/iter.R: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env Rscript 2 | 3 | args <- commandArgs(trailingOnly = TRUE) 4 | 5 | options(warn=-1) 6 | options(error=traceback) 7 | 8 | CodeletName = args[1] 9 | invocation = as.integer(args[2]) 10 | binFile = paste(CodeletName, ".bin", sep="") 11 | 12 | nbValues=invocation 13 | to.read=file(binFile, "rb") 14 | tracedLoop=readBin(to.read, double(), n=nbValues*2) 15 | cat((tracedLoop[seq(1,nbValues*2, 2)])[invocation], "\n") 16 | -------------------------------------------------------------------------------- /tests/test_15/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #define PAGESIZE 4096 5 | #define round_to_page(addr) ((char *)(((long unsigned)(addr)) & ~(PAGESIZE-1))) 6 | #define WIDTH 4096*32 7 | #define CACHE_SIZE_MB 20 8 | 9 | void cacheflush(void) { 10 | const size_t size = CACHE_SIZE_MB*1024*1024; 11 | int i, j; 12 | char *c = malloc(size); 13 | for (i = 0; i < 5; i++) 14 | for (j = 0; j < size; j++) 15 | c[j] = i*j; 16 | } 17 | 18 | 19 | int loop(int *a, int size) 20 | { 21 | int i; 22 | int n = a[0]; 23 | for (i = 1; i < 1000; i++) { 24 | //fprintf(stderr, "touched %p\n", round_to_page(&a[n])); 25 | n=a[n]; 26 | } 27 | return n; 28 | } 29 | 30 | void init(int *a, int size) 31 | { 32 | int i; 33 | srand(1); 34 | for (i= 0; i < size; i++) { 35 | a[i] = rand()%(size); 36 | } 37 | } 38 | 39 | 40 | 41 | int main(int argc, char **argv) 42 | { 43 | int c = 0; 44 | int k; 45 | 46 | int * a = malloc(sizeof(int)*WIDTH); 47 | int * d = malloc(sizeof(int)*4096*10); 48 | int * b = malloc(sizeof(int)*WIDTH); 49 | 50 | init(a, WIDTH); 51 | init(b, WIDTH); 52 | 53 | cacheflush(); 54 | 55 | printf("a: %p -> %p\n", &a[0], &a[WIDTH]); 56 | printf("b: %p -> %p\n", &b[0], &b[WIDTH]); 57 | 58 | fprintf(stderr, "ITERATION = 1\n"); 59 | c += loop(b, WIDTH); 60 | 61 | fprintf(stderr, "ITERATION = 2\n"); 62 | c += loop(a, WIDTH); 63 | 64 | fprintf(stderr, "ITERATION = 3\n"); 65 | c += loop(a, WIDTH); 66 | 67 | fprintf(stderr, "ITERATION = 4\n"); 68 | c += loop(b, WIDTH); 69 | printf("%d\n", c); 70 | 71 | return 0; 72 | } 73 | -------------------------------------------------------------------------------- /tests/test_16/.cere/traces/__cere__randi8_vranlc__69.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_16/.cere/traces/__cere__randi8_vranlc__69.bin -------------------------------------------------------------------------------- /tests/test_16/.cere/traces/__cere__randi8_vranlc__69.csv: -------------------------------------------------------------------------------- 1 | Codelet Name,Call Count,CPU_CLK_UNHALTED_CORE 2 | __cere__randi8_vranlc__69,131072,117896575 3 | -------------------------------------------------------------------------------- /tests/test_16/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | function do_test() 5 | { 6 | cere configure --run-cmd="" --build-cmd="" --clean-cmd="" 7 | cere selectinv --region=__cere__randi8_vranlc__69 8 | exit $? 9 | } 10 | 11 | source ../source.sh 12 | -------------------------------------------------------------------------------- /tests/test_Omp_Blackscholes/Makefile: -------------------------------------------------------------------------------- 1 | CC = cerec 2 | 3 | CFLAGS = -O3 -g -funroll-loops -fprefetch-loop-arrays -fpermissive -fno-exceptions -DPARSEC_VERSION=3.0-beta-20150206 -fopenmp -DNCO=4 -c blackscholes.m4.cpp -o blackscholes.m4.o 4 | LFLAGS = -fopenmp -lprofiler -lm -L/usr/lib64 -L/usr/lib -Wl,--hash-style=both,--as-needed ./blackscholes.m4.o -o blackscholes 5 | 6 | 7 | all: 8 | $(CC) ${MODE} $(CFLAGS) 9 | $(CC) ${MODE} $(LFLAGS) 10 | 11 | clean: 12 | rm -rf blackscholes blackscholes.m4.o 13 | 14 | veryclean: clean 15 | - rm -rf .cere/ 16 | - rm -f *.o realmain.c cere.log *.csv lel_bin test.log out cere.json *.ll 17 | -------------------------------------------------------------------------------- /tests/test_Omp_Blackscholes/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | rm -rf .cere/ blackscholes *.csv 6 | export OMP_NUM_THREADS=4 7 | cere configure --build-cmd="make" --run-cmd="./blackscholes $OMP_NUM_THREADS in_64K.txt out" --clean-cmd="make clean" --omp 8 | cere capture --region=__cere__blackscholes_m4__Z9bs_threadPv_368 --invocation=10 9 | export OMP_NUM_THREADS=2 10 | cere replay --region=__cere__blackscholes_m4__Z9bs_threadPv_368 --invocation=10 11 | if [ ! -f __cere__blackscholes_m4__Z9bs_threadPv_368.csv ] 12 | then 13 | exit 1 14 | fi 15 | exit 0 16 | } 17 | 18 | source ../source.sh 19 | -------------------------------------------------------------------------------- /tests/test_Omp_Capture_Replay/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | CC=cerec 3 | FLINK=cerec 4 | 5 | FLAGS=-g -O0 -fopenmp 6 | 7 | OBJS = test.o 8 | 9 | PROGRAM=test 10 | 11 | ${PROGRAM}: ${OBJS} 12 | ${FLINK} ${MODE} ${FLAGS} -o ${PROGRAM} ${OBJS} ${F_LIB} 13 | 14 | %.o: %.c 15 | ${CC} ${MODE} ${FLAGS} -c $< 16 | 17 | clean: 18 | - rm -f *.o *.s *.ll 19 | - rm -f test 20 | 21 | veryclean: clean 22 | - rm -rf .cere/ 23 | - rm -f *.o realmain.c cere.log *.csv lel_bin test.log out cere.json *.ll 24 | -------------------------------------------------------------------------------- /tests/test_Omp_Capture_Replay/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | 5 | void fct1(int k,int l[]) 6 | { 7 | 8 | int i; 9 | int p; printf("Start\n"); 10 | 11 | #pragma omp parallel for 12 | for(i=0;i<4;i++) 13 | { 14 | printf("LOOPA%d\n",i); 15 | p+=i; 16 | } 17 | 18 | 19 | for(i=0;i<4;i++) 20 | { 21 | printf("LOOPB%d\n",i); 22 | p+=i; 23 | } 24 | 25 | #pragma omp parallel for 26 | for(i=0;i<4;i++) 27 | { 28 | p+=i;printf("LOOPC%d thread__%d\n",i,omp_get_thread_num()); 29 | } 30 | printf("End\n"); 31 | } 32 | 33 | 34 | int main() 35 | { 36 | int k; 37 | int l[100]; 38 | printf("Only in vivo\n"); 39 | int i; 40 | for(i=0;i<30;i++) 41 | fct1(k,l); 42 | } 43 | -------------------------------------------------------------------------------- /tests/test_Omp_Capture_Replay/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | rm -f *.csv 6 | make veryclean 7 | cere configure --build-cmd="make" --run-cmd=./test --clean-cmd="make clean" --omp 8 | export OMP_NUM_THREADS=4 9 | cere capture --region=__cere__test_fct1_25 --invocation=2 10 | export OMP_NUM_THREADS=4 11 | cere replay --region=__cere__test_fct1_25 --invocation=2 12 | if [ ! -f __cere__test_fct1_25.csv ] 13 | then 14 | exit 1 15 | fi 16 | exit 0 17 | } 18 | 19 | source ../source.sh 20 | -------------------------------------------------------------------------------- /tests/test_Omp_Instrument/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | PROJECT_ROOT=../../ 3 | CC=cerec 4 | FLINK=cerec 5 | 6 | FLAGS=-g -O0 -fopenmp 7 | 8 | OBJS = test.o 9 | 10 | PROGRAM=test 11 | 12 | ${PROGRAM}: ${OBJS} 13 | ${FLINK} ${MODE} ${FLAGS} -o ${PROGRAM} ${OBJS} ${F_LIB} 14 | 15 | %.o: %.c 16 | ${CC} ${MODE} ${FLAGS} -c $< 17 | 18 | clean: 19 | - rm -f *.o *.s *.ll 20 | - rm -f test 21 | 22 | veryclean: clean 23 | - rm -rf .cere/ 24 | - rm -f *.o realmain.c cere.log *.csv lel_bin test.log out cere.json *.ll 25 | -------------------------------------------------------------------------------- /tests/test_Omp_Instrument/reg: -------------------------------------------------------------------------------- 1 | __cere__test_fct1_25 2 | __cere__test_fct1_11 3 | -------------------------------------------------------------------------------- /tests/test_Omp_Instrument/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | 5 | void fct1(int k,int l[]) 6 | { 7 | 8 | int i; 9 | int p; printf("Start\n"); 10 | 11 | #pragma omp parallel for 12 | for(i=0;i<4;i++) 13 | { 14 | printf("LOOPA%d\n",i); 15 | p+=i; 16 | } 17 | 18 | 19 | for(i=0;i<4;i++) 20 | { 21 | printf("LOOPB%d\n",i); 22 | p+=i; 23 | } 24 | 25 | #pragma omp parallel for 26 | for(i=0;i<4;i++) 27 | { 28 | p+=i;printf("LOOPC%d thread__%d\n",i,omp_get_thread_num()); 29 | } 30 | printf("End\n"); 31 | } 32 | 33 | 34 | int main() 35 | { 36 | int k; 37 | int l[100]; 38 | printf("Only in vivo\n"); 39 | int i; 40 | for(i=0;i<3;i++) 41 | fct1(k,l); 42 | } 43 | 44 | -------------------------------------------------------------------------------- /tests/test_Omp_Instrument/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | rm -f *.csv 6 | make veryclean 7 | cere configure --build-cmd="make" --run-cmd=./test --clean-cmd="make clean" --omp 8 | export OMP_NUM_THREADS=4 9 | cere instrument --regions-file=reg 10 | if [ ! -f __cere__test_fct1_25.csv ] 11 | then 12 | exit 1 13 | fi 14 | if [ ! -f __cere__test_fct1_11.csv ] 15 | then 16 | exit 1 17 | fi 18 | exit 0 19 | } 20 | 21 | 22 | source ../source.sh 23 | -------------------------------------------------------------------------------- /tests/test_Remove_Graph_Cycles/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | cere configure --build-cmd="" --run-cmd="" --clean-cmd="" 6 | python test.py 7 | } 8 | 9 | source ../source.sh 10 | -------------------------------------------------------------------------------- /tests/test_UI_Capture_Repr/.cere/io_traces/__cere__rhs_compute_rhs__59/1/__cere__rhs_compute_rhs__59: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Capture_Repr/.cere/io_traces/__cere__rhs_compute_rhs__59/1/__cere__rhs_compute_rhs__59 -------------------------------------------------------------------------------- /tests/test_UI_Capture_Repr/.cere/io_traces/__cere__rhs_compute_rhs__59/2/__cere__rhs_compute_rhs__59: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Capture_Repr/.cere/io_traces/__cere__rhs_compute_rhs__59/2/__cere__rhs_compute_rhs__59 -------------------------------------------------------------------------------- /tests/test_UI_Capture_Repr/.cere/io_traces/__cere__rhs_compute_rhs__59/4/__cere__rhs_compute_rhs__59: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Capture_Repr/.cere/io_traces/__cere__rhs_compute_rhs__59/4/__cere__rhs_compute_rhs__59 -------------------------------------------------------------------------------- /tests/test_UI_Capture_Repr/.cere/traces/__cere__rhs_compute_rhs__59.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Capture_Repr/.cere/traces/__cere__rhs_compute_rhs__59.bin -------------------------------------------------------------------------------- /tests/test_UI_Capture_Repr/.cere/traces/__cere__rhs_compute_rhs__59.csv: -------------------------------------------------------------------------------- 1 | Codelet Name,Call Count,CPU_CLK_UNHALTED_CORE 2 | __cere__rhs_compute_rhs__59,4,248403 3 | -------------------------------------------------------------------------------- /tests/test_UI_Capture_Repr/.cere/traces/__cere__rhs_compute_rhs__59.invocations: -------------------------------------------------------------------------------- 1 | 2 2.00360660758 58781.0 2 | 1 1.0 64325.0 3 | 4 1.0 66304.0 4 | -------------------------------------------------------------------------------- /tests/test_UI_Capture_Repr/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | BENCHMARK=bt 3 | BENCHMARKU=BT 4 | PROJECT_ROOT=../../ 5 | include make.def 6 | CC=../../src/cerec 7 | F77=../../src/cerec 8 | FLINK=../../src/cerec 9 | 10 | FLAGS=-g 11 | 12 | OBJS = bt.o initialize.o exact_solution.o exact_rhs.o \ 13 | set_constants.o adi.o rhs.o \ 14 | x_solve.o y_solve.o \ 15 | z_solve.o add.o error.o verify.o \ 16 | print_results.o timers.o wtime.o 17 | 18 | PROGRAM=BT 19 | 20 | ${PROGRAM}: ${OBJS} 21 | ${FLINK} ${FLINKFLAGS} ${FLAGS} -o ${PROGRAM} ${OBJS} ${F_LIB} -lgfortran 22 | 23 | %.o: %.c 24 | ${CC} ${FLAGS} -c $< 25 | 26 | %.o: %.f 27 | ${F77} ${FLAGS} -c $< 28 | 29 | clean: 30 | - rm -f *.o *.s *.ll *~ mputil* 31 | - rm -f core BT 32 | 33 | veryclean: clean 34 | - rm -rf .cere/dumps/* 35 | - rm -f realmain.c 36 | -------------------------------------------------------------------------------- /tests/test_UI_Capture_Repr/add.f: -------------------------------------------------------------------------------- 1 | c--------------------------------------------------------------------- 2 | c--------------------------------------------------------------------- 3 | 4 | subroutine add 5 | 6 | c--------------------------------------------------------------------- 7 | c--------------------------------------------------------------------- 8 | 9 | c--------------------------------------------------------------------- 10 | c addition of update to the vector u 11 | c--------------------------------------------------------------------- 12 | 13 | include 'header.h' 14 | 15 | integer i, j, k, m 16 | 17 | if (timeron) call timer_start(t_add) 18 | do k = 1, grid_points(3)-2 19 | do j = 1, grid_points(2)-2 20 | do i = 1, grid_points(1)-2 21 | do m = 1, 5 22 | u(m,i,j,k) = u(m,i,j,k) + rhs(m,i,j,k) 23 | enddo 24 | enddo 25 | enddo 26 | enddo 27 | if (timeron) call timer_stop(t_add) 28 | 29 | return 30 | end 31 | -------------------------------------------------------------------------------- /tests/test_UI_Capture_Repr/adi.f: -------------------------------------------------------------------------------- 1 | c--------------------------------------------------------------------- 2 | c--------------------------------------------------------------------- 3 | 4 | subroutine adi 5 | 6 | c--------------------------------------------------------------------- 7 | c--------------------------------------------------------------------- 8 | 9 | call compute_rhs 10 | 11 | call x_solve 12 | 13 | call y_solve 14 | 15 | call z_solve 16 | 17 | call add 18 | 19 | return 20 | end 21 | 22 | -------------------------------------------------------------------------------- /tests/test_UI_Capture_Repr/exact_solution.f: -------------------------------------------------------------------------------- 1 | c--------------------------------------------------------------------- 2 | c--------------------------------------------------------------------- 3 | 4 | subroutine exact_solution(xi,eta,zeta,dtemp) 5 | 6 | c--------------------------------------------------------------------- 7 | c--------------------------------------------------------------------- 8 | 9 | c--------------------------------------------------------------------- 10 | c this function returns the exact solution at point xi, eta, zeta 11 | c--------------------------------------------------------------------- 12 | 13 | include 'header.h' 14 | 15 | double precision xi, eta, zeta, dtemp(5) 16 | integer m 17 | 18 | do m = 1, 5 19 | dtemp(m) = ce(m,1) + 20 | > xi*(ce(m,2) + xi*(ce(m,5) + xi*(ce(m,8) + xi*ce(m,11)))) + 21 | > eta*(ce(m,3) + eta*(ce(m,6) + eta*(ce(m,9) + eta*ce(m,12))))+ 22 | > zeta*(ce(m,4) + zeta*(ce(m,7) + zeta*(ce(m,10) + 23 | > zeta*ce(m,13)))) 24 | enddo 25 | 26 | return 27 | end 28 | 29 | 30 | -------------------------------------------------------------------------------- /tests/test_UI_Capture_Repr/fortran_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Capture_Repr/fortran_test -------------------------------------------------------------------------------- /tests/test_UI_Capture_Repr/inputbt.data.sample: -------------------------------------------------------------------------------- 1 | 60 number of time steps 2 | 0.01d0 dt for class A = 0.0008d0. class B = 0.0003d0 class C = 0.0001d0 3 | 12 12 12 4 | -------------------------------------------------------------------------------- /tests/test_UI_Capture_Repr/npbparams.h: -------------------------------------------------------------------------------- 1 | c CLASS = B 2 | c 3 | c 4 | c This file is generated automatically by the setparams utility. 5 | c It sets the number of processors and the class of the NPB 6 | c in this directory. Do not modify it by hand. 7 | c 8 | integer problem_size, niter_default 9 | parameter (problem_size=10, niter_default=2) 10 | double precision dt_default 11 | parameter (dt_default = 0.0003d0) 12 | logical convertdouble 13 | parameter (convertdouble = .false.) 14 | character*11 compiletime 15 | parameter (compiletime='10 Oct 2013') 16 | character*3 npbversion 17 | parameter (npbversion='3.0') 18 | character*8 cs1 19 | parameter (cs1='gfortran') 20 | character*5 cs2 21 | parameter (cs2='clang') 22 | character*6 cs3 23 | parameter (cs3='(none)') 24 | character*6 cs4 25 | parameter (cs4='(none)') 26 | character*6 cs5 27 | parameter (cs5='(none)') 28 | character*6 cs6 29 | parameter (cs6='(none)') 30 | character*6 cs7 31 | parameter (cs7='randi8') 32 | -------------------------------------------------------------------------------- /tests/test_UI_Capture_Repr/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | make veryclean 6 | cere configure --build-cmd="make -j2" --run-cmd="./BT" --clean-cmd="make veryclean" 7 | cere capture --region="__cere__rhs_compute_rhs__59" -f 8 | } 9 | 10 | source ../source.sh 11 | -------------------------------------------------------------------------------- /tests/test_UI_Capture_Repr/wtime.c: -------------------------------------------------------------------------------- 1 | #include "wtime.h" 2 | #include 3 | 4 | void wtime(double *t) 5 | { 6 | static int sec = -1; 7 | struct timeval tv; 8 | gettimeofday(&tv, (void *)0); 9 | if (sec < 0) sec = tv.tv_sec; 10 | *t = (tv.tv_sec - sec) + 1.0e-6*tv.tv_usec; 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/test_UI_Capture_Repr/wtime.h: -------------------------------------------------------------------------------- 1 | /* C/Fortran interface is different on different machines. 2 | * You may need to tweak this. 3 | */ 4 | 5 | 6 | #if defined(IBM) 7 | #define wtime wtime 8 | #elif defined(CRAY) 9 | #define wtime WTIME 10 | #else 11 | #define wtime wtime_ 12 | #endif 13 | -------------------------------------------------------------------------------- /tests/test_UI_Cluster/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | BENCHMARK=ft 3 | BENCHMARKU=FT 4 | PROJECT_ROOT=../../ 5 | include make.def 6 | CC=../../src/cerec 7 | F77=../../src/cerec 8 | FLINK=../../src/cerec 9 | FLAGS=-g -mcmodel=large 10 | 11 | OBJS = appft.o auxfnct.o fft3d.o mainft.o verify.o \ 12 | randi8.o print_results.o \ 13 | timers.o wtime.o 14 | 15 | PROGRAM=FT 16 | 17 | ${PROGRAM}: ${OBJS} 18 | ${FLINK} ${FLINKFLAGS} ${FLAGS} -o ${PROGRAM} ${OBJS} ${F_LIB} -lm -lgfortran 19 | 20 | %.o: %.c 21 | ${CC} ${FLAGS} -c $< 22 | 23 | .f.o: 24 | ${F77} ${FLAGS} -c $< 25 | 26 | appft.o: appft.f global.h npbparams.h 27 | auxfnct.o: auxfnct.f global.h npbparams.h 28 | fft3d.o: fft3d.f global.h npbparams.h 29 | mainft.o: mainft.f global.h npbparams.h 30 | verify.o: verify.f global.h npbparams.h 31 | 32 | clean: 33 | - rm -f *.o *~ mputil* *.s *.ll 34 | - rm -f ft core 35 | 36 | veryclean: clean 37 | - rm -rf .cere/ 38 | - rm -f realmain.c regions.csv 39 | -------------------------------------------------------------------------------- /tests/test_UI_Cluster/fortran_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Cluster/fortran_test -------------------------------------------------------------------------------- /tests/test_UI_Cluster/global.h: -------------------------------------------------------------------------------- 1 | include 'npbparams.h' 2 | 3 | c Cache blocking params. These values are good for most 4 | c RISC processors. 5 | c FFT parameters: 6 | c fftblock controls how many ffts are done at a time. 7 | c The default is appropriate for most cache-based machines 8 | c On vector machines, the FFT can be vectorized with vector 9 | c length equal to the block size, so the block size should 10 | c be as large as possible. This is the size of the smallest 11 | c dimension of the problem: 128 for class A, 256 for class B and 12 | c 512 for class C. 13 | 14 | integer fftblock_default, fftblockpad_default, 15 | & CacheSize,BlockMax 16 | parameter (fftblock_default=16, 17 | & fftblockpad_default=18, 18 | & CacheSize=8192, 19 | & BlockMax=32) 20 | 21 | integer fftblock, fftblockpad 22 | common /blockinfo/ fftblock, fftblockpad 23 | 24 | external timer_read 25 | double precision timer_read 26 | external ilog2 27 | integer ilog2 28 | 29 | external randlc 30 | double precision randlc 31 | 32 | double complex plane((BlockMax+1)*maxdim),pad(128), 33 | & scr(BlockMax+1,maxdim) 34 | common /workarr/ plane,pad,scr 35 | 36 | double precision seed, a, pi, alpha 37 | parameter (seed = 314159265.d0, a = 1220703125.d0, 38 | . pi = 3.141592653589793238d0, alpha=1.0d-6) 39 | 40 | c for checksum data 41 | double complex sums(0:niter_default) 42 | common /sumcomm/ sums 43 | 44 | logical timers_enabled 45 | common /timerscomm/ timers_enabled 46 | -------------------------------------------------------------------------------- /tests/test_UI_Cluster/loops: -------------------------------------------------------------------------------- 1 | __cere__fft3d_swarztrauber__27 2 | -------------------------------------------------------------------------------- /tests/test_UI_Cluster/npbparams.h: -------------------------------------------------------------------------------- 1 | c CLASS = B 2 | c 3 | c 4 | c This file is generated automatically by the setparams utility. 5 | c It sets the number of processors and the class of the NPB 6 | c in this directory. Do not modify it by hand. 7 | c 8 | integer nx, ny, nz, maxdim, niter_default, ntotal 9 | parameter (nx=128, ny=64, nz=64, maxdim=128) 10 | parameter (niter_default=20) 11 | parameter (ntotal=nx*ny*nz) 12 | logical convertdouble 13 | parameter (convertdouble = .false.) 14 | character*11 compiletime 15 | parameter (compiletime='22 Nov 2013') 16 | character*3 npbversion 17 | parameter (npbversion='3.0') 18 | character*3 cs1 19 | parameter (cs1='lec') 20 | character*3 cs2 21 | parameter (cs2='lel') 22 | character*6 cs3 23 | parameter (cs3='(none)') 24 | character*6 cs4 25 | parameter (cs4='(none)') 26 | character*3 cs5 27 | parameter (cs5='-O3') 28 | character*10 cs6 29 | parameter (cs6='-lgfortran') 30 | character*6 cs7 31 | parameter (cs7='randi8') 32 | -------------------------------------------------------------------------------- /tests/test_UI_Cluster/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | make veryclean 6 | echo "__cere__fft3d_swarztrauber__27" > loops 7 | cere configure --build-cmd="make -j4" --clean-cmd="make clean" --run-cmd="./FT" 8 | cere check-matching --regions-file=loops 9 | # ensure cluster output exist 10 | test -e .cere/traces/__cere__fft3d_swarztrauber__27.invocations && \ 11 | test -e .cere/plots/__cere__fft3d_swarztrauber__27_byPhase.png 12 | } 13 | 14 | 15 | source ../source.sh 16 | -------------------------------------------------------------------------------- /tests/test_UI_Cluster/wtime.c: -------------------------------------------------------------------------------- 1 | #include "wtime.h" 2 | #include 3 | 4 | void wtime(double *t) 5 | { 6 | static int sec = -1; 7 | struct timeval tv; 8 | gettimeofday(&tv, (void *)0); 9 | if (sec < 0) sec = tv.tv_sec; 10 | *t = (tv.tv_sec - sec) + 1.0e-6*tv.tv_usec; 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/test_UI_Cluster/wtime.h: -------------------------------------------------------------------------------- 1 | /* C/Fortran interface is different on different machines. 2 | * You may need to tweak this. 3 | */ 4 | 5 | 6 | #if defined(IBM) 7 | #define wtime wtime 8 | #elif defined(CRAY) 9 | #define wtime WTIME 10 | #else 11 | #define wtime wtime_ 12 | #endif 13 | -------------------------------------------------------------------------------- /tests/test_UI_Configure/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | cd ../test_07 6 | cere configure --build-cmd="make -j2" --clean-cmd="make clean" --run-cmd="./gromacs -silent -deffnm gromacs -nice 0" 7 | } 8 | 9 | source ../source.sh 10 | -------------------------------------------------------------------------------- /tests/test_UI_Dump/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | BENCHMARK=is 3 | BENCHMARKU=IS 4 | PROJECT_ROOT=../../ 5 | 6 | include make.def 7 | 8 | CC=../../src/cerec 9 | CLINK=../../src/cerec 10 | 11 | FLAGS=-g 12 | 13 | PROGRAM=IS 14 | 15 | OBJS = is.o \ 16 | c_print_results.o \ 17 | c_timers.o \ 18 | wtime.o 19 | 20 | 21 | ${PROGRAM}: ${OBJS} 22 | ${CLINK} ${CLINKFLAGS} ${FLAGS} -o ${PROGRAM} ${OBJS} ${C_LIB} 23 | 24 | .c.o: 25 | ${CC} ${INSTRU} ${INSTRU_OPTS} ${FLAGS} -c $< 26 | 27 | is.o: is.c npbparams.h 28 | 29 | clean: 30 | - rm -f *.o *.s *.ll *~ mputil* 31 | - rm -f IS core 32 | 33 | veryclean: clean 34 | - rm -rf .cere/ regions.csv 35 | - rm -f realmain.c cere.* *.html 36 | -------------------------------------------------------------------------------- /tests/test_UI_Dump/npbparams.h: -------------------------------------------------------------------------------- 1 | #define CLASS 'W' 2 | /* 3 | This file is generated automatically by the setparams utility. 4 | It sets the number of processors and the class of the NPB 5 | in this directory. Do not modify it by hand. */ 6 | 7 | #define COMPILETIME "10 Oct 2013" 8 | #define NPBVERSION "3.0" 9 | #define CC "clang" 10 | #define CFLAGS "(none)" 11 | #define CLINK "clang" 12 | #define CLINKFLAGS "(none)" 13 | #define C_LIB "(none)" 14 | #define C_INC "(none)" 15 | -------------------------------------------------------------------------------- /tests/test_UI_Dump/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | make veryclean 6 | rm -rf .cere/ 7 | cere configure --build-cmd="make" --clean-cmd="make veryclean" --run-cmd="./IS" 8 | cere capture --region=__cere__is_create_seq_341 --invocation=1 -f 9 | } 10 | 11 | source ../source.sh 12 | -------------------------------------------------------------------------------- /tests/test_UI_Dump/wtime.c: -------------------------------------------------------------------------------- 1 | #include "wtime.h" 2 | #include 3 | 4 | void wtime(double *t) 5 | { 6 | static int sec = -1; 7 | struct timeval tv; 8 | gettimeofday(&tv, (void *)0); 9 | if (sec < 0) sec = tv.tv_sec; 10 | *t = (tv.tv_sec - sec) + 1.0e-6*tv.tv_usec; 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/test_UI_Dump/wtime.h: -------------------------------------------------------------------------------- 1 | /* C/Fortran interface is different on different machines. 2 | * You may need to tweak this. 3 | */ 4 | 5 | 6 | #if defined(IBM) 7 | #define wtime wtime 8 | #elif defined(CRAY) 9 | #define wtime WTIME 10 | #else 11 | #define wtime wtime_ 12 | #endif 13 | -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/000000408000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/000000408000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/000000609000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/000000609000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/00000061b000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/00000061b000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/00000062b000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/00000062b000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/000000a1e000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/000000a1e000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/000000a2e000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/000000a2e000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/0000020e1000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/0000020e1000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/0000020e4000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/0000020e4000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/0000020e6000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/0000020e6000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/7f4ca495a000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/7f4ca495a000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/7f4ca495d000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/7f4ca495d000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/7f4ca4d69000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/7f4ca4d69000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/7f4ca620e000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/7f4ca620e000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/7ffe8ae52000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/7ffe8ae52000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/7ffe8aed3000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/7ffe8aed3000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/7ffe8aed7000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/7ffe8aed7000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/core.map: -------------------------------------------------------------------------------- 1 | 0 7ffe8aed51b4 2 | 1 7ffe8aed51b0 3 | 2 7ffe8aed51ac 4 | 3 408450 5 | 4 7ffe8aed78c0 6 | 5 7ffe8aed5560 7 | 6 7ffe8aed51a0 8 | 7 7ffe8aed5198 9 | 8 a33c00 10 | 9 7ffe8aed555c 11 | 10 408458 12 | -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/lel_bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/lel_bin -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/static.names: -------------------------------------------------------------------------------- 1 | __do_global_dtors_aux_fini_array_entry 2 | mainarrays_ 3 | __frame_dummy_init_array_entry 4 | workarr_ 5 | completed.6973 6 | blockinfo_ 7 | i246m1.1862 8 | tt_ 9 | i246m1.1849 10 | sumcomm_ 11 | wtime_.sec 12 | timerscomm_ 13 | pi.1885 14 | -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/static.sym: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Flags/.cere/dumps/__cere__fft3d_swarztrauber__27/2818/static.sym -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/profile/graph_.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Flags/.cere/profile/graph_.pkl -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/traces/__cere__fft3d_swarztrauber__27.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Flags/.cere/traces/__cere__fft3d_swarztrauber__27.bin -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/traces/__cere__fft3d_swarztrauber__27.csv: -------------------------------------------------------------------------------- 1 | Codelet Name,Call Count,CPU_CLK_UNHALTED_CORE 2 | __cere__fft3d_swarztrauber__27,14080,2464579805 3 | -------------------------------------------------------------------------------- /tests/test_UI_Flags/.cere/traces/__cere__fft3d_swarztrauber__27.invocations: -------------------------------------------------------------------------------- 1 | 2818 20284.9413571 121498.0 2 | -------------------------------------------------------------------------------- /tests/test_UI_Flags/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | BENCHMARK=ft 3 | BENCHMARKU=FT 4 | PROJECT_ROOT=../../ 5 | include make.def 6 | CC=../../src/cerec 7 | F77=../../src/cerec 8 | FLINK=../../src/cerec 9 | FLAGS=-g -mcmodel=large 10 | 11 | OBJS = appft.o auxfnct.o fft3d.o mainft.o verify.o \ 12 | randi8.o print_results.o \ 13 | timers.o wtime.o 14 | 15 | PROGRAM=FT 16 | 17 | ${PROGRAM}: ${OBJS} 18 | ${FLINK} ${FLINKFLAGS} ${FLAGS} -o ${PROGRAM} ${OBJS} ${F_LIB} -lm -lgfortran 19 | 20 | %.o: %.c 21 | ${CC} ${FLAGS} -c $< 22 | 23 | .f.o: 24 | ${F77} ${FLAGS} -c $< 25 | 26 | appft.o: appft.f global.h npbparams.h 27 | auxfnct.o: auxfnct.f global.h npbparams.h 28 | fft3d.o: fft3d.f global.h npbparams.h 29 | mainft.o: mainft.f global.h npbparams.h 30 | verify.o: verify.f global.h npbparams.h 31 | 32 | clean: 33 | - rm -f *.o *~ mputil* *.s *.ll 34 | - rm -f ft core 35 | 36 | veryclean: clean 37 | - rm -rf .cere/ 38 | - rm -f realmain.c regions.csv 39 | -------------------------------------------------------------------------------- /tests/test_UI_Flags/cere.json: -------------------------------------------------------------------------------- 1 | {"regions_infos": "/home/cakel/cere/tests/test_UI_Flags/regions.csv", "multiple_trace": false, "run_cmd": "./FT", "clean_cmd": "make clean", "build_cmd": "make CLASS=A", "cere_path": "/home/cakel/cere/tests/test_UI_Flags/.cere"} -------------------------------------------------------------------------------- /tests/test_UI_Flags/fortran_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Flags/fortran_test -------------------------------------------------------------------------------- /tests/test_UI_Flags/global.h: -------------------------------------------------------------------------------- 1 | include 'npbparams.h' 2 | 3 | c Cache blocking params. These values are good for most 4 | c RISC processors. 5 | c FFT parameters: 6 | c fftblock controls how many ffts are done at a time. 7 | c The default is appropriate for most cache-based machines 8 | c On vector machines, the FFT can be vectorized with vector 9 | c length equal to the block size, so the block size should 10 | c be as large as possible. This is the size of the smallest 11 | c dimension of the problem: 128 for class A, 256 for class B and 12 | c 512 for class C. 13 | 14 | integer fftblock_default, fftblockpad_default, 15 | & CacheSize,BlockMax 16 | parameter (fftblock_default=16, 17 | & fftblockpad_default=18, 18 | & CacheSize=8192, 19 | & BlockMax=32) 20 | 21 | integer fftblock, fftblockpad 22 | common /blockinfo/ fftblock, fftblockpad 23 | 24 | external timer_read 25 | double precision timer_read 26 | external ilog2 27 | integer ilog2 28 | 29 | external randlc 30 | double precision randlc 31 | 32 | double complex plane((BlockMax+1)*maxdim),pad(128), 33 | & scr(BlockMax+1,maxdim) 34 | common /workarr/ plane,pad,scr 35 | 36 | double precision seed, a, pi, alpha 37 | parameter (seed = 314159265.d0, a = 1220703125.d0, 38 | . pi = 3.141592653589793238d0, alpha=1.0d-6) 39 | 40 | c for checksum data 41 | double complex sums(0:niter_default) 42 | common /sumcomm/ sums 43 | 44 | logical timers_enabled 45 | common /timerscomm/ timers_enabled 46 | -------------------------------------------------------------------------------- /tests/test_UI_Flags/npbparams.h: -------------------------------------------------------------------------------- 1 | c CLASS = B 2 | c 3 | c 4 | c This file is generated automatically by the setparams utility. 5 | c It sets the number of processors and the class of the NPB 6 | c in this directory. Do not modify it by hand. 7 | c 8 | integer nx, ny, nz, maxdim, niter_default, ntotal 9 | parameter (nx=128, ny=64, nz=64, maxdim=128) 10 | parameter (niter_default=20) 11 | parameter (ntotal=nx*ny*nz) 12 | logical convertdouble 13 | parameter (convertdouble = .false.) 14 | character*11 compiletime 15 | parameter (compiletime='22 Nov 2013') 16 | character*3 npbversion 17 | parameter (npbversion='3.0') 18 | character*3 cs1 19 | parameter (cs1='lec') 20 | character*3 cs2 21 | parameter (cs2='lel') 22 | character*6 cs3 23 | parameter (cs3='(none)') 24 | character*6 cs4 25 | parameter (cs4='(none)') 26 | character*3 cs5 27 | parameter (cs5='-O3') 28 | character*10 cs6 29 | parameter (cs6='-lgfortran') 30 | character*6 cs7 31 | parameter (cs7='randi8') 32 | -------------------------------------------------------------------------------- /tests/test_UI_Flags/small_seq_1.csv: -------------------------------------------------------------------------------- 1 | id,mid_end,back_end 2 | 1,-O1,-O1 3 | 2,-O2,-O2 4 | 3,-O3,-O3 5 | -------------------------------------------------------------------------------- /tests/test_UI_Flags/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | make clean 3 | rm -f .cere/replays/* cere.log realmain.c 4 | cere flag --region __cere__fft3d_swarztrauber__27 -f small_seq_1.csv 5 | 6 | cat .cere/flags/regions_flags.csv 7 | exit $? 8 | -------------------------------------------------------------------------------- /tests/test_UI_Flags/wtime.c: -------------------------------------------------------------------------------- 1 | #include "wtime.h" 2 | #include 3 | 4 | void wtime(double *t) 5 | { 6 | static int sec = -1; 7 | struct timeval tv; 8 | gettimeofday(&tv, (void *)0); 9 | if (sec < 0) sec = tv.tv_sec; 10 | *t = (tv.tv_sec - sec) + 1.0e-6*tv.tv_usec; 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/test_UI_Flags/wtime.h: -------------------------------------------------------------------------------- 1 | /* C/Fortran interface is different on different machines. 2 | * You may need to tweak this. 3 | */ 4 | 5 | 6 | #if defined(IBM) 7 | #define wtime wtime 8 | #elif defined(CRAY) 9 | #define wtime WTIME 10 | #else 11 | #define wtime wtime_ 12 | #endif 13 | -------------------------------------------------------------------------------- /tests/test_UI_Measure/fortran_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Measure/fortran_test -------------------------------------------------------------------------------- /tests/test_UI_Measure/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | cd ../test_09 6 | rm -rf .cere 7 | cere configure --build-cmd="make -j2" --clean-cmd="make clean" --run-cmd="./bwaves" 8 | cere instrument --region=__cere__block_solver_bi_cgstab_block__52 --invocation=6 9 | } 10 | 11 | source ../source.sh 12 | -------------------------------------------------------------------------------- /tests/test_UI_Profile/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | BENCHMARK=is 3 | BENCHMARKU=IS 4 | PROJECT_ROOT=../../ 5 | 6 | include make.def 7 | 8 | CC=../../src/cerec 9 | CLINK=../../src/cerec 10 | 11 | FLAGS=-g 12 | 13 | PROGRAM=IS 14 | 15 | OBJS = is.o \ 16 | c_print_results.o \ 17 | c_timers.o \ 18 | wtime.o 19 | 20 | 21 | ${PROGRAM}: ${OBJS} 22 | ${CLINK} ${CLINKFLAGS} ${FLAGS} -o ${PROGRAM} ${OBJS} ${C_LIB} 23 | 24 | .c.o: 25 | ${CC} ${FLAGS} -c $< 26 | 27 | is.o: is.c npbparams.h 28 | 29 | clean: 30 | - rm -f *.o *.s *.ll *~ mputil* 31 | - rm -f core 32 | 33 | veryclean: clean 34 | - rm -rf .cere IS cere.* 35 | -------------------------------------------------------------------------------- /tests/test_UI_Profile/npbparams.h: -------------------------------------------------------------------------------- 1 | #define CLASS 'W' 2 | /* 3 | This file is generated automatically by the setparams utility. 4 | It sets the number of processors and the class of the NPB 5 | in this directory. Do not modify it by hand. */ 6 | 7 | #define COMPILETIME "10 Oct 2013" 8 | #define NPBVERSION "3.0" 9 | #define CC "clang" 10 | #define CFLAGS "(none)" 11 | #define CLINK "clang" 12 | #define CLINKFLAGS "(none)" 13 | #define C_LIB "(none)" 14 | #define C_INC "(none)" 15 | -------------------------------------------------------------------------------- /tests/test_UI_Profile/test.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import sys 4 | import os 5 | import logging 6 | import networkx as nx 7 | sys.path.insert(0, "../../src/cere/") 8 | import cere_configure 9 | from graph_utils import load_graph 10 | import vars as var 11 | 12 | logger = logging.getLogger('Test Profile') 13 | 14 | if __name__ == "__main__": 15 | cere_configure.init() 16 | 17 | #Check if call graph exists 18 | graph = load_graph() 19 | if graph == None: 20 | logger.critical("Cannot load graph.") 21 | sys.exit(1) 22 | 23 | #Is there any cere region? 24 | if( len(graph.nodes()) == 0): 25 | logger.info('Graph is empty.') 26 | sys.exit(1) 27 | 28 | #Check if measuring application cycles works 29 | if not os.path.isfile("{0}/app_cycles.csv".format(var.CERE_PROFILE_PATH)): 30 | logger.critical('Measuring cycles failed.') 31 | sys.exit(1) 32 | 33 | logger.info("Profiling ok.") 34 | sys.exit(0) 35 | -------------------------------------------------------------------------------- /tests/test_UI_Profile/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | make veryclean 6 | cere configure --build-cmd="make" --clean-cmd="make clean" --run-cmd="./IS" 7 | cere profile 8 | ./test.py 9 | } 10 | 11 | source ../source.sh 12 | -------------------------------------------------------------------------------- /tests/test_UI_Profile/wtime.c: -------------------------------------------------------------------------------- 1 | #include "wtime.h" 2 | #include 3 | 4 | void wtime(double *t) 5 | { 6 | static int sec = -1; 7 | struct timeval tv; 8 | gettimeofday(&tv, (void *)0); 9 | if (sec < 0) sec = tv.tv_sec; 10 | *t = (tv.tv_sec - sec) + 1.0e-6*tv.tv_usec; 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/test_UI_Profile/wtime.h: -------------------------------------------------------------------------------- 1 | /* C/Fortran interface is different on different machines. 2 | * You may need to tweak this. 3 | */ 4 | 5 | 6 | #if defined(IBM) 7 | #define wtime wtime 8 | #elif defined(CRAY) 9 | #define wtime WTIME 10 | #else 11 | #define wtime wtime_ 12 | #endif 13 | -------------------------------------------------------------------------------- /tests/test_UI_Regions/.cere/profile/app.prof: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Regions/.cere/profile/app.prof -------------------------------------------------------------------------------- /tests/test_UI_Regions/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | BENCHMARK=ft 3 | BENCHMARKU=FT 4 | PROJECT_ROOT=../../ 5 | include make.def 6 | CC=../../src/cerec 7 | F77=../../src/cerec 8 | FLINK=../../src/cerec 9 | FLAGS=-g -mcmodel=large 10 | 11 | OBJS = appft.o auxfnct.o fft3d.o mainft.o verify.o \ 12 | randi8.o print_results.o \ 13 | timers.o wtime.o 14 | 15 | PROGRAM=FT 16 | 17 | ${PROGRAM}: ${OBJS} 18 | ${FLINK} ${FLINKFLAGS} ${FLAGS} -o ${PROGRAM} ${OBJS} ${F_LIB} -lm -lgfortran 19 | 20 | %.o: %.c 21 | ${CC} ${FLAGS} -c $< 22 | 23 | .f.o: 24 | ${F77} ${FLAGS} -c $< 25 | 26 | appft.o: appft.f global.h npbparams.h 27 | auxfnct.o: auxfnct.f global.h npbparams.h 28 | fft3d.o: fft3d.f global.h npbparams.h 29 | mainft.o: mainft.f global.h npbparams.h 30 | verify.o: verify.f global.h npbparams.h 31 | 32 | clean: 33 | - rm -f *.o *~ mputil* *.s *.ll 34 | - rm -f ft core 35 | 36 | veryclean: clean 37 | - rm -rf .cere/ 38 | - rm -f realmain.c regions.csv 39 | -------------------------------------------------------------------------------- /tests/test_UI_Regions/fortran_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Regions/fortran_test -------------------------------------------------------------------------------- /tests/test_UI_Regions/global.h: -------------------------------------------------------------------------------- 1 | include 'npbparams.h' 2 | 3 | c Cache blocking params. These values are good for most 4 | c RISC processors. 5 | c FFT parameters: 6 | c fftblock controls how many ffts are done at a time. 7 | c The default is appropriate for most cache-based machines 8 | c On vector machines, the FFT can be vectorized with vector 9 | c length equal to the block size, so the block size should 10 | c be as large as possible. This is the size of the smallest 11 | c dimension of the problem: 128 for class A, 256 for class B and 12 | c 512 for class C. 13 | 14 | integer fftblock_default, fftblockpad_default, 15 | & CacheSize,BlockMax 16 | parameter (fftblock_default=16, 17 | & fftblockpad_default=18, 18 | & CacheSize=8192, 19 | & BlockMax=32) 20 | 21 | integer fftblock, fftblockpad 22 | common /blockinfo/ fftblock, fftblockpad 23 | 24 | external timer_read 25 | double precision timer_read 26 | external ilog2 27 | integer ilog2 28 | 29 | external randlc 30 | double precision randlc 31 | 32 | double complex plane((BlockMax+1)*maxdim),pad(128), 33 | & scr(BlockMax+1,maxdim) 34 | common /workarr/ plane,pad,scr 35 | 36 | double precision seed, a, pi, alpha 37 | parameter (seed = 314159265.d0, a = 1220703125.d0, 38 | . pi = 3.141592653589793238d0, alpha=1.0d-6) 39 | 40 | c for checksum data 41 | double complex sums(0:niter_default) 42 | common /sumcomm/ sums 43 | 44 | logical timers_enabled 45 | common /timerscomm/ timers_enabled 46 | -------------------------------------------------------------------------------- /tests/test_UI_Regions/npbparams.h: -------------------------------------------------------------------------------- 1 | c CLASS = B 2 | c 3 | c 4 | c This file is generated automatically by the setparams utility. 5 | c It sets the number of processors and the class of the NPB 6 | c in this directory. Do not modify it by hand. 7 | c 8 | integer nx, ny, nz, maxdim, niter_default, ntotal 9 | parameter (nx=128, ny=64, nz=64, maxdim=128) 10 | parameter (niter_default=20) 11 | parameter (ntotal=nx*ny*nz) 12 | logical convertdouble 13 | parameter (convertdouble = .false.) 14 | character*11 compiletime 15 | parameter (compiletime='22 Nov 2013') 16 | character*3 npbversion 17 | parameter (npbversion='3.0') 18 | character*3 cs1 19 | parameter (cs1='lec') 20 | character*3 cs2 21 | parameter (cs2='lel') 22 | character*6 cs3 23 | parameter (cs3='(none)') 24 | character*6 cs4 25 | parameter (cs4='(none)') 26 | character*3 cs5 27 | parameter (cs5='-O3') 28 | character*10 cs6 29 | parameter (cs6='-lgfortran') 30 | character*6 cs7 31 | parameter (cs7='randi8') 32 | -------------------------------------------------------------------------------- /tests/test_UI_Regions/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | make clean 3 | cere configure --run-cmd="./FT" --build-cmd="make CLASS=A" --clean-cmd="make clean" 4 | cere regions 5 | 6 | cat regions.csv 7 | exit $? 8 | -------------------------------------------------------------------------------- /tests/test_UI_Regions/wtime.c: -------------------------------------------------------------------------------- 1 | #include "wtime.h" 2 | #include 3 | 4 | void wtime(double *t) 5 | { 6 | static int sec = -1; 7 | struct timeval tv; 8 | gettimeofday(&tv, (void *)0); 9 | if (sec < 0) sec = tv.tv_sec; 10 | *t = (tv.tv_sec - sec) + 1.0e-6*tv.tv_usec; 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/test_UI_Regions/wtime.h: -------------------------------------------------------------------------------- 1 | /* C/Fortran interface is different on different machines. 2 | * You may need to tweak this. 3 | */ 4 | 5 | 6 | #if defined(IBM) 7 | #define wtime wtime 8 | #elif defined(CRAY) 9 | #define wtime WTIME 10 | #else 11 | #define wtime wtime_ 12 | #endif 13 | -------------------------------------------------------------------------------- /tests/test_UI_Replay/Makefile: -------------------------------------------------------------------------------- 1 | # Include standard template for this suite 2 | -include Makefile.defaults 3 | 4 | run: 5 | ./bwaves 6 | 7 | nomakefiles: 8 | @echo "*** Whoops! I didn't find a Makefile.defaults file." 9 | @echo "*** Your distribution is probably corrupt." 10 | @echo 11 | -------------------------------------------------------------------------------- /tests/test_UI_Replay/Makefile.deps: -------------------------------------------------------------------------------- 1 | 2 | # These are the build dependencies 3 | 4 | # End dependencies 5 | -------------------------------------------------------------------------------- /tests/test_UI_Replay/bwaves.in: -------------------------------------------------------------------------------- 1 | 'Re Pr' 2 | 1d5 .72d0 3 | 'nx ny nz' 4 | 33 33 16 5 | 'CFL nuim nuex2 nuex4' 6 | 2.d0 0.1d0 0.1d0 0.05d0 7 | 'Method: explicit(0) Implicit(1)' 8 | 1 9 | 'Configuration: cubuc(0) sphere(1)' 10 | 0 11 | 'Number of Time Steps' 12 | 25 13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/test_UI_Replay/fortran_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay/fortran_test -------------------------------------------------------------------------------- /tests/test_UI_Replay/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | rm -rf .cere/ 6 | cere configure --build-cmd="make -j2" --clean-cmd="make clean" --run-cmd="./bwaves" 7 | cere capture --region=__cere__block_solver_bi_cgstab_block__52 --invocation=6 8 | cere replay --region=__cere__block_solver_bi_cgstab_block__52 --invocation=6 9 | } 10 | 11 | source ../source.sh 12 | -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/00000061d000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/00000061d000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/000000629000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/000000629000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/00000064f000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/00000064f000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/000000652000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/000000652000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/0000009d1000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/0000009d1000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/0000009d7000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/0000009d7000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/7f30ef18f000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/7f30ef18f000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/7f30ef192000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/7f30ef192000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/7f30ef59e000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/7f30ef59e000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/7f30f073f000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/7f30f073f000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/7fff0ebb9000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/7fff0ebb9000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/7fff0ec3a000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/7fff0ec3a000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/core.map: -------------------------------------------------------------------------------- 1 | 0 7fff0ec3c4ac 2 | -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/hotpages.map: -------------------------------------------------------------------------------- 1 | 7f30ef192000 2 | 7fff0ec3a000 3 | 0000009d1000 4 | 0000009d2000 5 | 0000009d3000 6 | -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/lel_bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/lel_bin -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/1/static.names: -------------------------------------------------------------------------------- 1 | work_1d_ 2 | __do_global_dtors_aux_fini_array_entry 3 | wtime_.sec 4 | completed.6972 5 | work_lhs_ 6 | work_solve_ 7 | tt_ 8 | constants_ 9 | fields_ 10 | __frame_dummy_init_array_entry 11 | global_ 12 | -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/00000061d000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/00000061d000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/000000ae7000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/000000ae7000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/000000aed000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/000000aed000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/7f78e8376000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/7f78e8376000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/7f78e8379000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/7f78e8379000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/7f78e8785000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/7f78e8785000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/7f78e9926000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/7f78e9926000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/7ffd9158f000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/7ffd9158f000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/7ffd91610000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/7ffd91610000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/7ffd91614000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/7ffd91614000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/core.map: -------------------------------------------------------------------------------- 1 | 0 7ffd91611f7c 2 | -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/hotpages.map: -------------------------------------------------------------------------------- 1 | 00000064f000 2 | 000000629000 3 | 000000638000 4 | 00000061e000 5 | 000000652000 6 | 000000635000 7 | 00000062b000 8 | 00000062e000 9 | 000000630000 10 | 000000633000 11 | 00000062c000 12 | 00000061f000 13 | 000000639000 14 | 00000063a000 15 | 000000620000 16 | 000000631000 17 | 00000062a000 18 | 00000063b000 19 | 000000621000 20 | 000000636000 21 | 000000622000 22 | 00000063c000 23 | 00000062f000 24 | 000000623000 25 | 00000063d000 26 | 000000634000 27 | 00000062d000 28 | 000000624000 29 | 00000063e000 30 | 000000625000 31 | 00000063f000 32 | 000000632000 33 | 000000626000 34 | 000000640000 35 | 000000637000 36 | 000000641000 37 | 000000627000 38 | 00000061d000 39 | 000000628000 40 | 000000650000 41 | 000000651000 42 | 000000642000 43 | 000000643000 44 | 7ffd91614000 45 | 7ffd91612000 46 | 000000ae9000 47 | 7f78e8785000 48 | 000000aed000 49 | 000000aee000 50 | 000000644000 51 | 000000645000 52 | 000000646000 53 | 000000647000 54 | 000000648000 55 | 000000649000 56 | 00000064a000 57 | 00000064b000 58 | 00000064c000 59 | 00000064d000 60 | 00000064e000 61 | 7ffd91610000 62 | 7f78e8379000 63 | 000000ae7000 64 | 000000ae8000 65 | -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/lel_bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/lel_bin -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/2/static.names: -------------------------------------------------------------------------------- 1 | work_1d_ 2 | __do_global_dtors_aux_fini_array_entry 3 | wtime_.sec 4 | completed.6972 5 | work_lhs_ 6 | work_solve_ 7 | tt_ 8 | constants_ 9 | fields_ 10 | __frame_dummy_init_array_entry 11 | global_ 12 | -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/00000061d000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/00000061d000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/000000774000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/000000774000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/00000077a000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/00000077a000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/7f4c566c2000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/7f4c566c2000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/7f4c566c5000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/7f4c566c5000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/7f4c56ad1000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/7f4c56ad1000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/7f4c57c72000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/7f4c57c72000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/7ffeb7d9c000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/7ffeb7d9c000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/7ffeb7e1b000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/7ffeb7e1b000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/7ffeb7e20000.memdump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/7ffeb7e20000.memdump -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/core.map: -------------------------------------------------------------------------------- 1 | 0 7ffeb7e1d34c 2 | -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/hotpages.map: -------------------------------------------------------------------------------- 1 | 7ffeb7e1f000 2 | 00000064f000 3 | 000000629000 4 | 000000638000 5 | 00000061e000 6 | 000000652000 7 | 000000635000 8 | 00000062b000 9 | 00000062e000 10 | 000000630000 11 | 000000633000 12 | 00000062c000 13 | 00000061f000 14 | 000000639000 15 | 00000063a000 16 | 000000620000 17 | 000000631000 18 | 00000062a000 19 | 00000063b000 20 | 000000621000 21 | 000000636000 22 | 000000622000 23 | 00000063c000 24 | 00000062f000 25 | 000000623000 26 | 00000063d000 27 | 000000634000 28 | 00000062d000 29 | 000000624000 30 | 00000063e000 31 | 000000625000 32 | 00000063f000 33 | 000000632000 34 | 000000626000 35 | 000000640000 36 | 000000637000 37 | 000000641000 38 | 000000627000 39 | 00000061d000 40 | 000000628000 41 | 000000650000 42 | 000000651000 43 | 000000642000 44 | 000000643000 45 | 7ffeb7e21000 46 | 7ffeb7e20000 47 | 000000776000 48 | 7f4c56ad1000 49 | 00000077a000 50 | 00000077b000 51 | 000000644000 52 | 000000645000 53 | 000000646000 54 | 000000647000 55 | 000000648000 56 | 000000649000 57 | 00000064a000 58 | 00000064b000 59 | 00000064c000 60 | 00000064d000 61 | 00000064e000 62 | 7ffeb7e1d000 63 | 7ffeb7e1c000 64 | 7f4c566c5000 65 | 7ffeb7e1b000 66 | 000000774000 67 | 000000775000 68 | -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/lel_bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/lel_bin -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/dumps/__cere__rhs_compute_rhs__59/4/static.names: -------------------------------------------------------------------------------- 1 | work_1d_ 2 | __do_global_dtors_aux_fini_array_entry 3 | wtime_.sec 4 | completed.6972 5 | work_lhs_ 6 | work_solve_ 7 | tt_ 8 | constants_ 9 | fields_ 10 | __frame_dummy_init_array_entry 11 | global_ 12 | -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/io_traces/__cere__rhs_compute_rhs__59/1/__cere__rhs_compute_rhs__59: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/io_traces/__cere__rhs_compute_rhs__59/1/__cere__rhs_compute_rhs__59 -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/io_traces/__cere__rhs_compute_rhs__59/2/__cere__rhs_compute_rhs__59: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/io_traces/__cere__rhs_compute_rhs__59/2/__cere__rhs_compute_rhs__59 -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/io_traces/__cere__rhs_compute_rhs__59/4/__cere__rhs_compute_rhs__59: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/io_traces/__cere__rhs_compute_rhs__59/4/__cere__rhs_compute_rhs__59 -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/traces/__cere__rhs_compute_rhs__59.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/.cere/traces/__cere__rhs_compute_rhs__59.bin -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/traces/__cere__rhs_compute_rhs__59.csv: -------------------------------------------------------------------------------- 1 | Codelet Name,Call Count,CPU_CLK_UNHALTED_CORE 2 | __cere__rhs_compute_rhs__59,4,248403 3 | -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/.cere/traces/__cere__rhs_compute_rhs__59.invocations: -------------------------------------------------------------------------------- 1 | 2 2.00360660758 58781.0 2 | 1 1.0 64325.0 3 | 4 1.0 66304.0 4 | -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | BENCHMARK=bt 3 | BENCHMARKU=BT 4 | PROJECT_ROOT=../../ 5 | include make.def 6 | CC=../../src/cerec 7 | F77=../../src/cerec 8 | FLINK=../../src/cerec 9 | 10 | FLAGS=-g 11 | 12 | OBJS = bt.o initialize.o exact_solution.o exact_rhs.o \ 13 | set_constants.o adi.o rhs.o \ 14 | x_solve.o y_solve.o \ 15 | z_solve.o add.o error.o verify.o \ 16 | print_results.o timers.o wtime.o 17 | 18 | PROGRAM=BT 19 | 20 | ${PROGRAM}: ${OBJS} 21 | ${FLINK} ${FLINKFLAGS} ${FLAGS} -o ${PROGRAM} ${OBJS} ${F_LIB} -lgfortran 22 | 23 | %.o: %.c 24 | ${CC} ${FLAGS} -c $< 25 | 26 | %.o: %.f 27 | ${F77} ${FLAGS} -c $< 28 | 29 | clean: 30 | - rm -f *.o *.s *.ll *~ mputil* 31 | - rm -f core BT 32 | 33 | veryclean: clean 34 | - rm -rf .cere/replays/* 35 | - rm -f realmain.c 36 | -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/add.f: -------------------------------------------------------------------------------- 1 | c--------------------------------------------------------------------- 2 | c--------------------------------------------------------------------- 3 | 4 | subroutine add 5 | 6 | c--------------------------------------------------------------------- 7 | c--------------------------------------------------------------------- 8 | 9 | c--------------------------------------------------------------------- 10 | c addition of update to the vector u 11 | c--------------------------------------------------------------------- 12 | 13 | include 'header.h' 14 | 15 | integer i, j, k, m 16 | 17 | if (timeron) call timer_start(t_add) 18 | do k = 1, grid_points(3)-2 19 | do j = 1, grid_points(2)-2 20 | do i = 1, grid_points(1)-2 21 | do m = 1, 5 22 | u(m,i,j,k) = u(m,i,j,k) + rhs(m,i,j,k) 23 | enddo 24 | enddo 25 | enddo 26 | enddo 27 | if (timeron) call timer_stop(t_add) 28 | 29 | return 30 | end 31 | -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/adi.f: -------------------------------------------------------------------------------- 1 | c--------------------------------------------------------------------- 2 | c--------------------------------------------------------------------- 3 | 4 | subroutine adi 5 | 6 | c--------------------------------------------------------------------- 7 | c--------------------------------------------------------------------- 8 | 9 | call compute_rhs 10 | 11 | call x_solve 12 | 13 | call y_solve 14 | 15 | call z_solve 16 | 17 | call add 18 | 19 | return 20 | end 21 | 22 | -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/exact_solution.f: -------------------------------------------------------------------------------- 1 | c--------------------------------------------------------------------- 2 | c--------------------------------------------------------------------- 3 | 4 | subroutine exact_solution(xi,eta,zeta,dtemp) 5 | 6 | c--------------------------------------------------------------------- 7 | c--------------------------------------------------------------------- 8 | 9 | c--------------------------------------------------------------------- 10 | c this function returns the exact solution at point xi, eta, zeta 11 | c--------------------------------------------------------------------- 12 | 13 | include 'header.h' 14 | 15 | double precision xi, eta, zeta, dtemp(5) 16 | integer m 17 | 18 | do m = 1, 5 19 | dtemp(m) = ce(m,1) + 20 | > xi*(ce(m,2) + xi*(ce(m,5) + xi*(ce(m,8) + xi*ce(m,11)))) + 21 | > eta*(ce(m,3) + eta*(ce(m,6) + eta*(ce(m,9) + eta*ce(m,12))))+ 22 | > zeta*(ce(m,4) + zeta*(ce(m,7) + zeta*(ce(m,10) + 23 | > zeta*ce(m,13)))) 24 | enddo 25 | 26 | return 27 | end 28 | 29 | 30 | -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/fortran_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benchmark-subsetting/cere/46593396bc419220d18cc930d36bc34bd6f0b510/tests/test_UI_Replay_Repr/fortran_test -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/inputbt.data.sample: -------------------------------------------------------------------------------- 1 | 60 number of time steps 2 | 0.01d0 dt for class A = 0.0008d0. class B = 0.0003d0 class C = 0.0001d0 3 | 12 12 12 4 | -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/npbparams.h: -------------------------------------------------------------------------------- 1 | c CLASS = B 2 | c 3 | c 4 | c This file is generated automatically by the setparams utility. 5 | c It sets the number of processors and the class of the NPB 6 | c in this directory. Do not modify it by hand. 7 | c 8 | integer problem_size, niter_default 9 | parameter (problem_size=10, niter_default=2) 10 | double precision dt_default 11 | parameter (dt_default = 0.0003d0) 12 | logical convertdouble 13 | parameter (convertdouble = .false.) 14 | character*11 compiletime 15 | parameter (compiletime='10 Oct 2013') 16 | character*3 npbversion 17 | parameter (npbversion='3.0') 18 | character*8 cs1 19 | parameter (cs1='gfortran') 20 | character*5 cs2 21 | parameter (cs2='clang') 22 | character*6 cs3 23 | parameter (cs3='(none)') 24 | character*6 cs4 25 | parameter (cs4='(none)') 26 | character*6 cs5 27 | parameter (cs5='(none)') 28 | character*6 cs6 29 | parameter (cs6='(none)') 30 | character*6 cs7 31 | parameter (cs7='randi8') 32 | -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | make veryclean 6 | cere configure --build-cmd="make -j2" --clean-cmd="make clean" --run-cmd="./BT" 7 | cere replay --region="__cere__rhs_compute_rhs__59" -f 8 | } 9 | 10 | source ../source.sh 11 | -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/wtime.c: -------------------------------------------------------------------------------- 1 | #include "wtime.h" 2 | #include 3 | 4 | void wtime(double *t) 5 | { 6 | static int sec = -1; 7 | struct timeval tv; 8 | gettimeofday(&tv, (void *)0); 9 | if (sec < 0) sec = tv.tv_sec; 10 | *t = (tv.tv_sec - sec) + 1.0e-6*tv.tv_usec; 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/test_UI_Replay_Repr/wtime.h: -------------------------------------------------------------------------------- 1 | /* C/Fortran interface is different on different machines. 2 | * You may need to tweak this. 3 | */ 4 | 5 | 6 | #if defined(IBM) 7 | #define wtime wtime 8 | #elif defined(CRAY) 9 | #define wtime WTIME 10 | #else 11 | #define wtime wtime_ 12 | #endif 13 | -------------------------------------------------------------------------------- /tests/test_check_io/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | PROJECT_ROOT=../../ 3 | CC=../../src/cerec 4 | FLINK=../../src/cerec 5 | 6 | FLAGS=-g -O0 7 | 8 | OBJS = test.o 9 | 10 | PROGRAM=test 11 | 12 | ${PROGRAM}: ${OBJS} 13 | ${FLINK} ${FLAGS} -o ${PROGRAM} ${OBJS} ${F_LIB} 14 | 15 | %.o: %.c 16 | ${CC} ${FLAGS} -c $< 17 | 18 | clean: 19 | - rm -f *.o *.s *.ll 20 | - rm -f test 21 | 22 | veryclean: clean 23 | - rm -rf .cere/ 24 | - rm -f *.o realmain.c 25 | -------------------------------------------------------------------------------- /tests/test_check_io/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char **argv) 5 | { 6 | int i; 7 | FILE * f = fopen("out", "w+"); 8 | 9 | for(i = 0; i < 2; i ++) { 10 | printf("I wrote Forbidden IO\n"); 11 | fprintf(f, "Forbidden IO\n"); 12 | fflush(f); 13 | } 14 | rewind(f); 15 | for(i = 0; i < 2; i ++) { 16 | char str[256]; 17 | fscanf(f, "%s", str); 18 | printf("I read %s\n", str); 19 | } 20 | for(i = 0; i < 2; i ++) { 21 | printf("Correct IO\n"); 22 | fprintf(stderr, "Correct IO\n"); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /tests/test_check_io/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | rm -rf .cere 6 | cere configure --build-cmd make --run-cmd ./test --clean-cmd "make clean" 7 | cere regions 8 | 9 | for region in $(cat regions.csv |grep __cere__|cut -d, -f1); do 10 | cere capture --region="$region" --invocation 1 11 | done 12 | 13 | if grep "__cere__test_main_15" .cere/replays/invalid_regions ; then 14 | echo ok 15 | else 16 | return 1 17 | fi 18 | 19 | if grep "__cere__test_main_9" .cere/replays/invalid_regions ; then 20 | echo ok 21 | else 22 | return 1 23 | fi 24 | 25 | # only the last region is valid 26 | if grep "__cere__test_main_20" .cere/replays/invalid_regions; then 27 | return 1 28 | else 29 | echo ok 30 | fi 31 | } 32 | 33 | source ../source.sh 34 | -------------------------------------------------------------------------------- /tests/test_pthread/Makefile: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | CC=cerec 3 | FLINK=cerec 4 | 5 | FLAGS=-g -O0 -pthread 6 | 7 | OBJS = test.o 8 | 9 | PROGRAM=test 10 | 11 | ${PROGRAM}: ${OBJS} 12 | ${FLINK} ${MODE} ${FLAGS} -o ${PROGRAM} ${OBJS} ${F_LIB} 13 | 14 | %.o: %.c 15 | ${CC} ${MODE} ${FLAGS} -c $< 16 | 17 | clean: 18 | - rm -f *.o *.s *.ll 19 | - rm -f test 20 | 21 | veryclean: clean 22 | - rm -rf .cere/ 23 | - rm -f *.o realmain.c cere.log *.csv 24 | -------------------------------------------------------------------------------- /tests/test_pthread/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void *thread_2_body(void *x) 5 | { 6 | int i; 7 | for (i = 0; i < *((int*)x); i ++) { 8 | printf("T2 iteration %d x = %d\n", i, *((int*) x)); 9 | } 10 | printf("thread_2 finished\n"); 11 | return NULL; 12 | } 13 | 14 | int main() 15 | { 16 | 17 | int x = 42; 18 | 19 | printf("initial x: %d\n", x); 20 | 21 | pthread_t thread_2; 22 | 23 | if(pthread_create(&thread_2, NULL, thread_2_body, &x)) { 24 | fprintf(stderr, "Error creating thread\n"); 25 | return 1; 26 | } 27 | 28 | printf("thread_2 started\n"); 29 | if(pthread_join(thread_2, NULL)) { 30 | fprintf(stderr, "Error joining thread\n"); 31 | return 2; 32 | } 33 | 34 | printf("end\n"); 35 | return 0; 36 | } 37 | -------------------------------------------------------------------------------- /tests/test_pthread/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function do_test() 4 | { 5 | make veryclean 6 | cere configure --build-cmd="make" --run-cmd=./test --clean-cmd="make clean" 7 | cere capture --region=__cere__test_thread_2_body_7 --invocation=1 8 | cere replay --region=__cere__test_thread_2_body_7 --invocation=1 --static 9 | if [ ! -f __cere__test_thread_2_body_7.csv ] 10 | then 11 | exit 1 12 | fi 13 | 14 | exit 0 15 | } 16 | 17 | source ../source.sh 18 | -------------------------------------------------------------------------------- /tests/testplan.test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | tests="" 4 | if [ "$1" == "--long" ]; then 5 | tests="$tests $(find . -maxdepth 1 -type d -name 'long_*' | sort)" 6 | fi 7 | 8 | fortran_support=`grep 'FORTRAN_SUPPORT' ../config.h | cut -d " " -f 3` 9 | #Test if fortran/flang is available and select tests accordingly 10 | if [ "$fortran_support" != "\"yes\"" ]; then 11 | tests="$tests $(find . -maxdepth 1 -type d -name 'test_*' '!' -exec test -e "{}/fortran_test" ';' -print | sort)" 12 | else 13 | tests="$tests $(find . -maxdepth 1 -type d -name 'test_*' | sort)" 14 | fi 15 | 16 | count=$(echo $tests | wc -w) 17 | 18 | # Print number of tests detected 19 | echo "1..$count" 20 | 21 | test_number=1 22 | for t in $tests; do 23 | echo $t 24 | if bash -c -l "cd $t && ./test.sh > test.log 2>&1" ; then 25 | echo 26 | echo "ok $test_number $t" 27 | else 28 | echo "not ok $test_number $t" 29 | cat $t/test.log 30 | fi 31 | test_number=$[test_number+1] 32 | done 33 | -------------------------------------------------------------------------------- /tools/check-code.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIRECTORY=$1 4 | 5 | # Check Python 6 | pep8 --first --exclude=libs/ $DIRECTORY 7 | 8 | # Check C/C++ 9 | TMPFILE=$(tempfile) 10 | for file in $(find $DIRECTORY/src -name '*.[ch]' -or -name '*.cpp'); do 11 | clang-format -style=LLVM $file > $TMPFILE 12 | diff -q $file $TMPFILE > /dev/null 13 | if [ "$?" -ne "0" ]; then 14 | echo "$file does not conform to LLVM style" 15 | fi 16 | done 17 | 18 | rm -f $TMPFILE 19 | 20 | --------------------------------------------------------------------------------