我已经尝试了超过两天,以查看自己犯了什么错误,但找不到任何东西。我不断收到以下错误:
=终止您的应用程序之一
=退出码:139
=清理剩余的过程
=您可以忽略下面的清理消息
YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault (signal 11)
This typically refers to a problem with your application.
Please see the FAQ page for debugging suggestions
make: *** [run] Error 139
Run Code Online (Sandbox Code Playgroud)
所以问题显然在MPI_BCAST另一个功能中MPI_GATHER。您能帮我找出问题所在吗?当我编译代码时,键入以下内容:
/usr/bin/mpicc -I/usr/include -L/usr/lib z.main.c z.mainMR.c z.mainWR.c -o 1dcode -g -lm
Run Code Online (Sandbox Code Playgroud)
运行:
usr/bin/mpirun -np 2 ./1dcode dat.txt o.out.txt
Run Code Online (Sandbox Code Playgroud)
例如,我的代码包含以下功能:
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <math.h>
#include <string.h>
#include "functions.h"
#include <mpi.h>
/*...................z.mainMR master function............. */
void …Run Code Online (Sandbox Code Playgroud)