PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Compiling Open MPI with Free PGI

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
TheMatt



Joined: 06 Jul 2009
Posts: 322
Location: Greenbelt, MD

PostPosted: Mon Mar 17, 2014 10:51 am    Post subject: Compiling Open MPI with Free PGI Reply with quote

All,

I'm trying to build Open MPI 1.6.5 with Free PGI (14.3 as I downloaded it). I first tried configuring with:
Code:
./configure CC=pgcc CXX=g++ F77=pgfortran FC=pgfortran CFLAGS='-m64' CXXFLAGS='-m64' FCFLAGS='-m64' FFLAGS='-m64' --prefix=/Users/fortran/MPI/openmpi_1.6.5-pgi_14.3-pgcc | & tee configure.pgi14.3.pgcc.log
but that led to:
Code:
checking if C and C++ are link compatible... no
**********************************************************************
* It appears that your C++ compiler is unable to link against object
* files created by your C compiler.  This generally indicates either
* a conflict between the options specified in CFLAGS and CXXFLAGS
* or a problem with the local compiler installation.  More
* information (including exactly what command was given to the
* compilers and what error resulted when the commands were executed) is
* available in the config.log file in this directory.
**********************************************************************
configure: error: C and C++ compilers are not link compatible.  Can not continue.

Now, as the code I'm ultimately targeting is mainly Fortran, I figured let's try using just gcc, g++, and pgfortran:
Code:
./configure CC=gcc CXX=g++ F77=pgfortran FC=pgfortran CFLAGS='-m64' CXXFLAGS='-m64' FCFLAGS='-m64' FFLAGS='-m64' --prefix=/Users/fortran/MPI/openmpi_1.6.5-pgi_14.3-gcc | & tee configure.pgi14.3.gcc.log

and that works. So, I issue a "make" which runs without Error and then do the always important "make check" and it fails after checking some atomic bits (which pass):
Code:
Making check in class
/Applications/Xcode.app/Contents/Developer/usr/bin/make  ompi_rb_tree opal_bitmap opal_hash_table opal_list opal_value_array opal_pointer_array
  CC     ompi_rb_tree.o
ompi_rb_tree.c:347:70: warning: cast to 'void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast]
        ((ompi_test_rb_value_t *) new_value)->registered_mpools[0] = (void *) i;
                                                                     ^
1 warning generated.
  CCLD   ompi_rb_tree
Undefined symbols for architecture x86_64:
  "_opal_cache_line_size", referenced from:
      _test2 in ompi_rb_tree.o
      _ompi_rb_tree_construct in libmpi.a(ompi_rb_tree.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [ompi_rb_tree] Error 1
make[2]: *** [check-am] Error 2
make[1]: *** [check-recursive] Error 1
make: *** [check-recursive] Error 1

I have no doubt there are flags I probably need to pass to configure to make this "hybrid" work, but does anyone know what they are? The classic "-DpgiFortran" perhaps?

Thanks for any help,
Matt
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6213
Location: The Portland Group Inc.

PostPosted: Tue Mar 18, 2014 3:12 pm    Post subject: Reply with quote

Hi Matt,

I've been asking around here on how to do this (I know very little about Macs) with little luck. It looks like we moved to using MPICH3 on Mac because of problems with libtool (which OpenMPI uses). I don't have details nor know if this is the root of your issues, but could press folks here a bit if you need it.

There is this link to OpenMPI's faq which may or may not be useful: http://www.open-mpi.org/faq/?category=osx#osx-bundled-ompi

- Mat
Back to top
View user's profile
TheMatt



Joined: 06 Jul 2009
Posts: 322
Location: Greenbelt, MD

PostPosted: Wed Mar 19, 2014 5:00 am    Post subject: Reply with quote

Mat,

After looking around a bit, I moved onto Open MPI 1.7.4 as it seems to have better Darwin support, and it does! I can get it to configure, make, and make check. The problem is when I do a 'make install' that it doesn't work. I've written to the Open MPI Users list here:

http://www.open-mpi.org/community/lists/users/2014/03/23888.php

My guess is there is some flag I'm not correctly passing to pgfortran to get libraries to compile the right way...

Matt
Back to top
View user's profile
TheMatt



Joined: 06 Jul 2009
Posts: 322
Location: Greenbelt, MD

PostPosted: Mon Mar 24, 2014 4:29 pm    Post subject: Reply with quote

Just an update for those wanting one. It looks like the issue might just be a bug with autotools:

http://www.open-mpi.org/community/lists/users/2014/03/23920.php
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group