I just checked my laptop (also running Lion) and I do have gcc at /usr/bin and 
it is linked to /usr/bin/gcc-4.2.  I just checked again on my Mac Pro and there 
is no gcc in /usr/bin although there is a /usr/bin/gcc-3.3, probably left over 
from an earlier OS or Xcode.  I downloaded and installed Xcode 4.2 and that 
returned gcc to /usr/lib.  I successfully ran

Now Xcode 4.2 does not recognize:  #include <openmp>

I know this is an MPI forum rather than OpenMP, but I was wondering if anyone 
knew how to get OpenMP working in Xcode 4.2.  The statement worked fine in 
Xcode 3.6.x

Thanks again for the help!

Charles


On Nov 4, 2011, at 4:41 PM, Barrett, Brian W wrote:

> I think you have something wrong with your Xcode install; on my Lion
> machine, gcc is installed in /usr/bin as always.  Also, on OS X, you
> should never have to set LD_LIBRARY_PATH.
> 
> Brian
> 
> On 11/4/11 3:36 PM, "Ralph Castain" <r...@open-mpi.org> wrote:
> 
>> Just glancing at the output, it appears to be finding a different gcc
>> that isn't Lion compatible. I know people have been forgetting to clear
>> out all their old installed software, and so you can pick old things up.
>> 
>> Try setting your path and ld_library_path variables to point at the Xcode
>> gcc.
>> 
>> 
>> On Nov 4, 2011, at 3:08 PM, Charles Shelor wrote:
>> 
>>> I had downloaded and installed OpenMPI on my Mac OS-X 10.6 machine a
>>> few months ago.  I ran the configure and install commands from the FAQ
>>> with no problems.  I recently upgraded to Max OS-X 10.7 (Lion) and now
>>> when I run mpicc it cannot find the standard C library headers (stdio.h,
>>> std lib.hŠ)  I had noticed that I had to modify my path to point to the
>>> Xcode gcc executable, /Developer/usr/bin/gcc, (I believe 10.6 included
>>> gcc in /usr/bin, but 10.7 does not appear to include it there now).  So
>>> I figured that I could just reinstall OpenMPI and it would be able to
>>> locate the new libraries.  However, during the "configure" operation I
>>> received the messages below.  I normally use the Apple Xcode IDE for my
>>> initial code development and then compile using mpicc from a terminal
>>> window.  gcc also fails to find the standard libraries from the command
>>> line.  Is there an environment variable that I should set that tells gcc
>>> where the libraries are located?
>>> 
>>> Thank you!
>>> 
>>> Charles
>>> 
>>> 
>>> 
>>> =========================================================================
>>> ===
>>> == Compiler and preprocessor tests
>>> 
>>> =========================================================================
>>> ===
>>> 
>>> *** C compiler and preprocessor
>>> checking for style of include used by make... GNU
>>> checking for gcc... gcc
>>> checking for C compiler default output file name...
>>> configure: error: in `/Downloads/openmpi-1.4.3':
>>> configure: error: C compiler cannot create executables
>>> See `config.log' for more details.
>>> 
>>> 
>>> 
>>> Here is what I think is the relevant output from 'config.log'
>>> 
>>> 
>>> 
>>> configure:6362: $? = 0
>>> configure:6369: gcc -v >&5
>>> Using built-in specs.
>>> Target: i686-apple-darwin10
>>> Configured with: /var/tmp/gcc/gcc-5666.3~6/src/configure
>>> --disable-checking --enable-werror --prefix=/usr --mandir=/share/man
>>> --enable-languages=c,objc,c++,obj-c++
>>> --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib
>>> --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10-
>>> --host=x86_64-apple-darwin10 --target=i686-apple-darwin10
>>> --with-gxx-include-dir=/include/c++/4.2.1
>>> Thread model: posix
>>> gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)
>>> configure:6373: $? = 0
>>> configure:6380: gcc -V >&5
>>> gcc-4.2: argument to `-V' is missing
>>> configure:6384: $? = 1
>>> configure:6407: checking for C compiler default output file name
>>> configure:6429: gcc -DNDEBUG    conftest.c  >&5
>>> ld: library not found for -lcrt1.10.6.o
>>> collect2: ld returned 1 exit status
>>> configure:6433: $? = 1
>>> configure:6471: result:
>>> configure: failed program was:
>>> | /* confdefs.h.  */
>>> | #define PACKAGE_NAME "Open MPI"
>>> | #define PACKAGE_TARNAME "openmpi"
>>> | #define PACKAGE_VERSION "1.4.3"
>>> | #define PACKAGE_STRING "Open MPI 1.4.3"
>>> | #define PACKAGE_BUGREPORT "http://www.open-mpi.org/community/help/";
>>> | #define OMPI_MAJOR_VERSION 1
>>> | #define OMPI_MINOR_VERSION 4
>>> | #define OMPI_RELEASE_VERSION 3
>>> | #define OMPI_GREEK_VERSION ""
>>> | #define OMPI_VERSION "3"
>>> | #define OMPI_RELEASE_DATE "Oct 05, 2010"
>>> | #define ORTE_MAJOR_VERSION 1
>>> | #define ORTE_MINOR_VERSION 4
>>> | #define ORTE_RELEASE_VERSION 3
>>> | #define ORTE_GREEK_VERSION ""
>>> | #define ORTE_VERSION "3"
>>> | #define ORTE_RELEASE_DATE "Oct 05, 2010"
>>> | #define OPAL_MAJOR_VERSION 1
>>> | #define OPAL_MINOR_VERSION 4
>>> | #define OPAL_RELEASE_VERSION 3
>>> | #define OPAL_GREEK_VERSION ""
>>> | #define OPAL_VERSION "3"
>>> | #define OPAL_RELEASE_DATE "Oct 05, 2010"
>>> | #define OMPI_ENABLE_PROGRESS_THREADS 0
>>> | #define OMPI_ARCH "x86_64-apple-darwin11.2.0"
>>> | #define OMPI_ENABLE_MEM_DEBUG 0
>>> | #define OMPI_ENABLE_MEM_PROFILE 0
>>> | #define OMPI_ENABLE_DEBUG 0
>>> | #define OMPI_GROUP_SPARSE 0
>>> | #define OMPI_WANT_MPI_CXX_SEEK 1
>>> | #define MPI_PARAM_CHECK ompi_mpi_param_check
>>> | #define OMPI_WANT_PRETTY_PRINT_STACKTRACE 1
>>> | #define OMPI_WANT_PERUSE 0
>>> | #define OMPI_ENABLE_PTY_SUPPORT 1
>>> | #define OMPI_ENABLE_HETEROGENEOUS_SUPPORT 0
>>> | #define OPAL_ENABLE_TRACE 0
>>> | #define ORTE_DISABLE_FULL_SUPPORT 0
>>> | #define OPAL_ENABLE_FT 0
>>> | #define OPAL_ENABLE_FT_CR 0
>>> | #define OMPI_WANT_HOME_CONFIG_FILES 1
>>> | #define OPAL_ENABLE_IPV6 1
>>> | #define ORTE_WANT_ORTERUN_PREFIX_BY_DEFAULT 0
>>> | #define OPAL_PACKAGE_STRING "Open MPI charles@Charles.local
>>> Distribution"
>>> | #define OPAL_IDENT_STRING "1.4.3"
>>> | #define OMPI_OPENIB_PAD_HDR 0
>>> | /* end confdefs.h.  */
>>> | 
>>> | int
>>> | main ()
>>> | {
>>> | 
>>> |   ;
>>> |   return 0;
>>> | }
>>> configure:6477: error: in `/Downloads/openmpi-1.4.3':
>>> configure:6480: error: C compiler cannot create executables
>>> See `config.log' for more details.
>>> 
>>> 
>>> _______________________________________________
>>> users mailing list
>>> us...@open-mpi.org
>>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>> 
>> 
>> _______________________________________________
>> users mailing list
>> us...@open-mpi.org
>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>> 
>> 
> 
> 
> -- 
>  Brian W. Barrett
>  Dept. 1423: Scalable System Software
>  Sandia National Laboratories
> 
> 
> 
> 
> 
> 
> _______________________________________________
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users


Reply via email to