Bug 466333 - mvapich2's mpicxx compiler has errors
Summary: mvapich2's mpicxx compiler has errors
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: mvapich2
Version: 5.3
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Doug Ledford
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-09 19:17 UTC by Gurhan Ozen
Modified: 2013-11-04 01:37 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-11-10 15:22:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Gurhan Ozen 2008-10-09 19:17:37 UTC
Description of problem:
/usr/lib64/mvapich2/1.0.3-gcc/bin/mpicxx   sendrec.cc -o sendrec
In file included from /usr/lib64/mvapich2/1.0.3-gcc/include/mpi.h:1104,
                 from sendrec.cc:12:
/usr/lib64/mvapich2/1.0.3-gcc/include/mpicxx.h:26:2: error: #error "SEEK_SET is #defined but must not be for the C++ binding of MPI"
/usr/lib64/mvapich2/1.0.3-gcc/include/mpicxx.h:30:2: error: #error "SEEK_CUR is #defined but must not be for the C++ binding of MPI"
/usr/lib64/mvapich2/1.0.3-gcc/include/mpicxx.h:35:2: error: #error "SEEK_END is #defined but must not be for the C++ binding of MPI"


Version-Release number of selected component (if applicable):
# rpm -qf /usr/lib64/mvapich2/1.0.3-gcc/bin/mpicxx
mvapich2-1.0.3-2.el5


How reproducible:
Very

Steps to Reproduce:
1. Try to compile a program with mpicxx.
  

Additional info:

Comment 1 Doug Ledford 2008-11-10 15:22:50 UTC
This is a case of user error.  The mpi.h must be included *before* iostream in the source code or else you get this error.  If you include mpi.h before iostream.h, then things work fine.

Comment 2 Gurhan Ozen 2008-11-10 16:55:18 UTC
(In reply to comment #1)
> This is a case of user error.  The mpi.h must be included *before* iostream in
> the source code or else you get this error.  If you include mpi.h before
> iostream.h, then things work fine.

Interesting, that's correct. Looks as if mvapich2 behaves differently on this aspect than the rest of the mpi implementations we ship then, as on others this didn't cause an issue.

Comment 3 Doug Ledford 2008-11-10 17:04:14 UTC
It's an implementation specific issue.  From the mpicxx.h file:

// There is a name conflict between stdio.h and the MPI C++ binding 
// with respect to the names SEEK_SET, SEEK_CUR, and SEEK_END.  MPI
// wants these in the MPI namespace, but stdio.h will #define these
// to integer values.  #undef'ing these can cause obscure problems
// with other include files (such as iostream), so we instead use
// #error to indicate a fatal error.  Users can either #undef 
// the names before including mpi.h or include mpi.h *before* stdio.h
// or iostream.


Note You need to log in before you can comment on or make changes to this bug.