uti: Add/Modify test programs

Change-Id: I27a39d6b11af5243f93d07c31c2ef80f6727dd53
This commit is contained in:
Masamichi Takagi
2018-09-03 15:09:15 +09:00
parent 52afbbbc98
commit 4438f994dc
97 changed files with 17368 additions and 0 deletions

51
test/uti/posix_aio/Makefile Executable file
View File

@ -0,0 +1,51 @@
.SUFFIXES: # Clear suffixes
.ONESHELL: # Pack all the lines and pass it to shell
VMTOUCH=$(HOME)/project/src/vmtouch/install/bin/vmtouch
# Specify it via *.sh
UTI_DIR=${HOME}/project/uti/install_linux
CC=mpiicc
LD=$(CC)
CFLAGS = -g -O0 -Wall -DVMTOUCH=$(VMTOUCH)
LDFLAGS = -lpthread -L$(UTI_DIR)/lib -Wl,-rpath -Wl,$(UTI_DIR)/lib -luti -lrt
SRCS = $(shell ls 0*.c)
OBJS = $(SRCS:.c=.o) util.o
EXES = $(SRCS:.c=)
define create_files =
for i in {1..2}; do
dd if=/dev/zero of=./data/$i bs=1M count=1
done
endef
all: $(EXES)
file::
$(value create_files)
util.o:: util.c util.h
$(CC) $(CFLAGS) -qopenmp -c $<
001: 001.o util.o
$(LD) -o $@ $^ $(LDFLAGS) -qopenmp
001.o:: 001.c
$(CC) $(CFLAGS) -qopenmp -c $<
002: 002.o util.o
$(LD) -o $@ $^ $(LDFLAGS) -qopenmp
002.o:: 002.c
$(CC) $(CFLAGS) -qopenmp -c $<
%: %.o
$(LD) -o $@ $^ $(LDFLAGS)
%.o::%.c
$(CC) $(CFLAGS) -c $<
clean:
rm -f core $(EXES) $(OBJS) $(DSRCS)