我正在尝试向 SLURM 提交批处理作业,但我不断收到JobState=FAILED Reason=NonZeroExitCode
. 我可以在常规 g++ 上编译和运行代码,但我必须使用 SLURM 来完成学校作业。我以为我正在正确运行它们,并且我从根目录中得到了一个讨厌的语法,告诉我退出在登录节点上运行的脚本。任何帮助,将不胜感激。这是我的批处理文件和我的 Makefile:
#!/bin/bash
#SBATCH -N1 -n1 --mem-per-cpu=100m -t00:05:00
echo "#SBATCH -N1 -n1 --mem-per-cpu=100m -t00:05:00 --qos=test"
cd /home/<username>/AFS/cse_430/Project1/Parallel/
module load gcc/4.9.1
make clean
make all
echo "Running single threaded code..."
./run "SeqCA(57;4,10).txt"
echo "Done experiment. Check log.txt"
生成文件:
EXEC=run # name of executable is run
CC=g++ # compile with g++
CFLAGS=-std=c++11 -fopenmp -c -Wall
all: $(EXEC)
$(EXEC): main.o threeSeq.o fourSeq.o fiveSeq.o
$(CC) -fopenmp -o $(EXEC) main.o threeSeq.o fourSeq.o fiveSeq.o
main.o: main.cpp
$(CC) $(CFLAGS) main.cpp
threeSeq.o: threeSeq.cpp threeSeq.hpp
$(CC) $(CFLAGS) threeSeq.cpp
fourSeq.o: fourSeq.cpp fourSeq.hpp
$(CC) $(CFLAGS) fourSeq.cpp
fiveSeq.o: fiveSeq.cpp fiveSeq.hpp
$(CC) $(CFLAGS) fiveSeq.cpp
clean:
rm -f *.o
rm -f $(EXEC)
rm -f *log.txt