# Compile MPICH2 with PGI 6.1

**URL:** <https://forums.developer.nvidia.com/t/compile-mpich2-with-pgi-6-1/130498>\
**Category:** Legacy PGI Compilers (archived)\
**Created:** [October 12, 2006, 12:10pm UTC](https://forums.developer.nvidia.com/t/compile-mpich2-with-pgi-6-1/130498 "2006-10-12T12:10:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![John0928](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@John0928](https://forums.developer.nvidia.com/u/John0928)\
**Post date:** [October 12, 2006, 12:10pm UTC](https://forums.developer.nvidia.com/t/compile-mpich2-with-pgi-6-1/130498/1 "2006-10-12T12:10:38Z")

</div>

I’m pretty new to this so please bear with me. :)

I installed the PGI compilers and am trying to compile mpich2. I’ve set the following and using csh:

setenv PATH /usr/local/pgi/linux86/6.1/bin:$PATH  
setenv CFLAGS “-fast -fpic”  
setenv CXXFLAGS “-fast -fpic”  
setenv FFLAGS “-fast -fpic”  
setenv F90FLAGS “-fast -fpic”  
setenv LDFLAGS “-fast -fpic”  
setenv OPTFLAGS “-fast -fpic”  
setenv CC pgcc  
setenv CXX pgCC  
setenv F90 pgf90  
setenv FC pgf77  
setenv CPP “pgCC -E”

And when I run the configure script I get:  
…  
checking for gcc… pgcc  
checking for C compiler default output file name… configure: error: C compiler cannot create executables

The config.log output looks like all is set correctly. I can’t find anyone else having this problem, so I’m wondering if I’ve done something wrong with the PGI compiler installation. I did compile mpich1 successfully.

Any ideas are welcome and appreciated…

John

---

<div class="post-metadata">

**Author:** ![MatColgrove](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/matcolgrove/32/14047_2.png) [@MatColgrove](https://forums.developer.nvidia.com/u/MatColgrove)\
**Post date:** [October 12, 2006, 4:11pm UTC](https://forums.developer.nvidia.com/t/compile-mpich2-with-pgi-6-1/130498/2 "2006-10-12T16:11:46Z")

</div>

Hi John,

We just tried configuring MPICH2 here using the varaibles you listed and all seemed fine. Typically when I’ve seen this error, for some reason pgcc is not working correctly. Maybe the PATH isn’t set correctly or there is license problem?

Are you able to compile a hello world program? Also, you can look at the configure log to see exactly what the script was trying to execute.

- Mat

---

<div class="post-metadata">

**Author:** ![John0928](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@John0928](https://forums.developer.nvidia.com/u/John0928)\
**Post date:** [October 12, 2006, 8:14pm UTC](https://forums.developer.nvidia.com/t/compile-mpich2-with-pgi-6-1/130498/3 "2006-10-12T20:14:35Z")

</div>

Hello World compiles OK. The previous version of mpich compiled OK. All the compilers are in my path. If you have any more suggestions please let me know.

Here is the end of my config.log:

…  
#define HAVE\_ERROR\_CHECKING MPID\_ERROR\_LEVEL\_ALL  
#define HAVE\_ROMIO 1  
#define HAVE\_RUNTIME\_THREADCHECK 1  
#define MPICH\_ERROR\_MSG\_LEVEL MPICH\_ERROR\_MSG\_ALL  
#define MPICH\_THREAD\_LEVEL MPI\_THREAD\_MULTIPLE  
#define PACKAGE\_BUGREPORT “”  
#define PACKAGE\_NAME “”  
#define PACKAGE\_STRING “”  
#define PACKAGE\_TARNAME “”  
#define PACKAGE\_VERSION “”  
#define USE\_LOGGING MPID\_LOGGING\_NONE  
#define USE\_THREAD\_IMPL MPICH\_THREAD\_IMPL\_GLOBAL\_MUTEX

configure: exit 77  
  
  
  
Thanks,

John
