PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

OpenMPI in Windows

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



Joined: 05 Jun 2012
Posts: 10

PostPosted: Fri Jul 13, 2012 1:20 pm    Post subject: OpenMPI in Windows Reply with quote

Hi all,

I've been trying to port a program that uses openmpi 1.6 and fortran into windows from linux. To do this I've been using the bash version of the PGI Workstation 12.5. I've downloaded the openmpi-1.6.tar.gz from http://www.open-mpi.org/software/ompi/v1.6/ and used tar in the shell to extract it.

upon compiling i set all compilers to their respective pg*.exe. When running the configure file it runs until it starts to look at the C++ compiler where it complains about a link error:

...
checking whether we are using the GNU C++ compiler... no
checking whether pgcpp accepts -g... yes
checking dependency style of pgcpp... none
checking how to run the C++ preprocessor... pgcpp -E
checking for the C++ compiler vendor... portland group
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


Since it says the error is due to flags, what kind of flags should I be using? I've tried including -Bdynamic, and -pgf77libs, -pgcpplibs, -pgf90libs, and setting the environment variable PGI_OBJSUFFIX to .obj

Anyone else have an ideas? I know this should be possible because I've seen binaries that use other compilers. I plan to use my own binaries to create FFTW so I cannot use those other binaries.
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Jul 16, 2012 11:20 am    Post subject: Reply with quote

Hi gtarroyo,

This particular error is caused by the configure scripts assumption the objects have a ".o" suffix. Hence, you change PGI's default of using the Windows ".obj" extension by setting the environment variable "export PGI_OBJSUFFIX=o".

The next error you'll get is because the Cgywin "nm" utility can't read native Windows objects. The work around is to use the PGI supplied version, i.e. "export NM=pgnm".

Next, I'm hitting the following error:
Code:
configure:29329: pgfortran -fast conftestf.f conftest.o -o conftest
conftestf.f:^M
configure:29336: $? = 0
configure:29363: ./conftest
configure:29370: $? = 0
configure:29398: result: 1^M
configure:29421: checking for C type corresponding to CHARACTER
configure:29467: result: not found
configure:29471: WARNING: *** Did not find corresponding C type
configure:29474: error: Cannot continue


Though, I haven't quite figured out what's wrong here. I'll try and get back to it later.

- Mat
Back to top
View user's profile
gtarroyo



Joined: 05 Jun 2012
Posts: 10

PostPosted: Wed Jul 18, 2012 9:41 am    Post subject: Reply with quote

Thank you for the help on getting to this point. I too am getting stoped at the variables of F to C check. I went into the configure file and manually entered them (bad I know) to see if it was a localized error, but it wasn't, so I set them all except a few.

It produced strange outputs that I'm not sure what to make of but it could be I set the variables in a late place in the configure file:

Code:
checking if Fortran 77 compiler supports CHARACTER... yes
checking size of Fortran 77 CHARACTER... 1
checking for C type corresponding to CHARACTER... char
checking alignment of Fortran CHARACTER... 1
checking if Fortran 77 compiler supports LOGICAL... yes
checking size of Fortran 77 LOGICAL... 4
checking for C type corresponding to LOGICAL... int
checking alignment of Fortran LOGICAL... 4
checking if Fortran 77 compiler supports LOGICAL*1... yes
checking size of Fortran 77 LOGICAL*1... 1
configure: WARNING: *** Fortran 77 LOGICAL*1 does not have expected size!
configure: WARNING: *** Expected 1, got 1
configure: WARNING: *** Disabling MPI support for Fortran 77 LOGICAL*1
checking if Fortran 77 compiler supports LOGICAL*2... yes
checking size of Fortran 77 LOGICAL*2... 2
configure: WARNING: *** Fortran 77 LOGICAL*2 does not have expected size!
configure: WARNING: *** Expected 2, got 2
configure: WARNING: *** Disabling MPI support for Fortran 77 LOGICAL*2
checking if Fortran 77 compiler supports LOGICAL*4... yes
checking size of Fortran 77 LOGICAL*4... 4
configure: WARNING: *** Fortran 77 LOGICAL*4 does not have expected size!
configure: WARNING: *** Expected 4, got 4
configure: WARNING: *** Disabling MPI support for Fortran 77 LOGICAL*4
checking if Fortran 77 compiler supports LOGICAL*8... yes
checking size of Fortran 77 LOGICAL*8... 8
configure: WARNING: *** Fortran 77 LOGICAL*8 does not have expected size!
configure: WARNING: *** Expected 8, got 8
configure: WARNING: *** Disabling MPI support for Fortran 77 LOGICAL*8
checking if Fortran 77 compiler supports INTEGER... yes
checking size of Fortran 77 INTEGER... 4
checking for C type corresponding to INTEGER... int
checking alignment of Fortran INTEGER... 4
checking if Fortran 77 compiler supports INTEGER*1... yes
checking size of Fortran 77 INTEGER*1... 1
configure: WARNING: *** Fortran 77 INTEGER*1 does not have expected size!
configure: WARNING: *** Expected 1, got 1
configure: WARNING: *** Disabling MPI support for Fortran 77 INTEGER*1
checking if Fortran 77 compiler supports INTEGER*2... yes
checking size of Fortran 77 INTEGER*2... 2
configure: WARNING: *** Fortran 77 INTEGER*2 does not have expected size!
configure: WARNING: *** Expected 2, got 2
configure: WARNING: *** Disabling MPI support for Fortran 77 INTEGER*2
checking if Fortran 77 compiler supports INTEGER*4... yes


as you can see it works sometimes and doesn't other times, but the expected and recieved do match. Wierd right? this will get you through these tests, unfortunetly the next test immediately fails as well:

Code:
configure: WARNING: *** Fortran 77 COMPLEX*16 does not have expected size!
configure: WARNING: *** Expected 16, got 16
configure: WARNING: *** Disabling MPI support for Fortran 77 COMPLEX*16
checking if Fortran 77 compiler supports COMPLEX*32... yes
checking size of Fortran 77 COMPLEX*32... 16
configure: WARNING: *** Fortran 77 COMPLEX*32 does not have expected size!
configure: WARNING: *** Expected 32, got 16
configure: WARNING: *** Disabling MPI support for Fortran 77 COMPLEX*32
checking for max Fortran MPI handle index... expr: non-integer argument
./configure: line 44210: test: : integer expression expected
( 0x7 < 2147483647 ? 0x7 : 2147483647 )
checking Fortran value for .TRUE. logical type... -1
checking for correct handling of Fortran logical arrays... no
configure: error: Error determining if arrays of logical values work properly.


The relevent config log is this:

Code:
configure:43849: ./conftest
configure:43856: $? = 0
configure:43884: result: 8
configure:43890: WARNING: *** Fortran 77 COMPLEX*32 does not have expected size!
configure:43892: WARNING: *** Expected 32, got 8
configure:43894: WARNING: *** Disabling MPI support for Fortran 77 COMPLEX*32
configure:44195: checking for max Fortran MPI handle index
configure:44245: pgcc -o conftest.exe -DNDEBUG -fast   conftest.c  >&5
configure:44245: $? = 0
configure:44245: ./conftest.exe
configure:44245: $? = 0
configure:44270: result: ( 0x7 < 2147483647 ? 0x7 : 2147483647 )
configure:44290: checking Fortran value for .TRUE. logical type
configure:44386: pgcc -DNDEBUG -fast -I. -c conftest.c
configure:44393: $? = 0
configure:44403: pgfortran  -o conftest conftest.o conftestf.f 
conftestf.f:
configure:44410: $? = 0
configure:44437: ./conftest
configure:44444: $? = 0
configure:44458: result: -1
configure:44471: checking for correct handling of Fortran logical arrays
configure:44559: pgcc -DNDEBUG -fast -I. -c conftest.c
configure:44566: $? = 0
configure:44576: pgfortran  conftestf.f conftest.o -o conftest 
conftestf.f:
configure:44583: $? = 0
configure:44610: ./conftest
configure:44617: $? = 0
configure:44635: result: no
configure:44639: error: Error determining if arrays of logical values work properly.


I also tried the switches -i8 and -Msecond_underscore and FC=pgf90, F77=pgf77
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