Path 我不能用mpicc编译我的代码

Path 我不能用mpicc编译我的代码,path,compiler-errors,compilation,permissions,Path,Compiler Errors,Compilation,Permissions,我正在使用以下脚本编译代码。我以前在以下文件夹中安装过mpich2:/user/kumarvis/u2/mpich2 install。但是,我无法访问该目录。因此,我将mpich2安装在不同的目录中,如路径所示 module load intel-mpi/4.0 PATH=/projects/academic/advisor/mpich2-install/bin:$PATH export PATH clear make veryclean rm -rf twoBody2015TenCompone

我正在使用以下脚本编译代码。我以前在以下文件夹中安装过mpich2:/user/kumarvis/u2/mpich2 install。但是,我无法访问该目录。因此,我将mpich2安装在不同的目录中,如路径所示

module load intel-mpi/4.0
PATH=/projects/academic/advisor/mpich2-install/bin:$PATH
export PATH
clear
make veryclean
rm -rf twoBody2015TenComponentsWithMerge.exe twoBody2015TenComponentsWithMerge.o
mpicc -c -I ../include -O -o twoBody2015TenComponentsWithMerge.o twoBody2015TenComponentsWithMerge.c 
但是,当我使用此脚本编译代码时,出现以下错误:


i、 它使用的是我无法访问的旧目录。我不知道为什么它使用旧目录来访问mpich2,即使它不包含在PATH中。

为了调查这个问题,您可以尝试在调用
mpicc
之前添加
which mpicc
echo$PATH
等命令吗?makefile中的某些命令可能会将目录
/user/…/u2/…
前置到路径:您能试着注释
使veryclean
吗?我发现了我的错误。在mpicc文件中,前缀设置为旧目录。当我修改它时,代码能够编译。