我在netbeans中将此文件作为我的Makefile,
CC = mpicc #compiler name
CFLAGS = -Wall #extra compiler flags
OUT_NAME = example #executable name
all: *.c
$(CC) -o $(OUT_NAME) $(CFLAGS) *.c
clean:
rm $(OUT_NAME) *.o
我想使用命令mpirun -np 4 filename
从我的Netbeans运行MPI程序。如何编译和生成输出文件名作为输入文件的同名?另外如何在netbeans中将-np #
参数传递给mpirun,这样netbeans每次执行时都不会询问处理器?
顺便说一句,我在构建项目时遇到此错误
make: *** No rule to make target `*.c', needed by `all'. Stop.
MAKE FAILED (exit value 2, total time: 52ms)