GlobalArrays/ga

Compiling Global Arrays with Intel Compilers

Closed this issue · 4 comments

Dear Global Arrays Developers,
Thank you for the awesome software you have written and maintained. I successfully compiled global arrays with gcc. I am trying to now compile it with only intel compilers. I unpack the directory and run the autgen.sh. After that, I invoke the configure script with the following modifiers:

./configure --with-blas=-mkl --prefix=/home/richard/build/ga-master MPICXX=mpiicpc MPICC=mpiicc MPIF77=mpiifort CC=icc FC=ifort

Naturally, I have tried some variations on the above command line.

I have my .bashrc file calling the Intel compiler environment variable setting scripts.

PATH="/opt/intel/compilers_and_libraries_2019.4.243/linux/pkg_bin/intel64${PATH:+:${PATH}}";export PATH;
PATH="/opt/intel/compilers_and_libraries_2019.4.243/linux/mpi/intel64/bin${PATH:+:${PATH}}";export PATH;
PERL5LIB="/home/richard/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
PERL_LOCAL_LIB_ROOT="/home/richard/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base "/home/richard/perl5""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=/home/richard/perl5"; export PERL_MM_OPT;
export MPICXX=mpiicpc;
export MPICC=mpiicc;
export MPIF77=mpiifort;
export MPIF90=mpiifort;
export CC=icpc;
export FC=ifort;
export F77=ifort;
export F90=ifort;
export CXX=icpc;
source /opt/intel/compilers_and_libraries_2019.4.243/linux/pkg_bin/ifortvars.sh intel64
source /opt/intel/compilers_and_libraries_2019.4.243/linux/mpi/intel64/bin/mpivars.sh intel64
source /opt/intel/compilers_and_libraries_2019.4.243/linux/pkg_bin/compilervars.sh intel64

The configure script let's me know that the C compiler cannot create an executable.

checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for TARGET base (64bit-ness checked later)... LINUX
checking whether we think this system is what we call SYSV... yes
checking whether we are cross compiling... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
configure:
configure: C compiler
configure:
checking for style of include used by make... GNU
configure: WARNING: MPI compilers desired, MPICC and CC are set, and MPICC!=CC.
configure: WARNING: Choosing MPICC as main compiler.
configure: WARNING: CC will be assumed as the unwrapped MPI compiler.
checking whether the C compiler works... no
configure: error: in /home/richard/build/ga-master': configure: error: C compiler cannot create executables See config.log' for more details

From the config.log, I see that a possible key issue is:

ld: cannot find -lstdc++

I am reluctant to bother a developer about a build problem but I have tried very hard to find a workaround. I built an old version of Global Arrays successfully with intel, but in the end I couldn't get all of the symbols resolved when compiling an application. Again, thank you for the awesome software and your maintenance thereof.
Best regards,
Rich

config.log

Thank you for your guidance. I am going to re-install the intel parallel studio and let you know what happens.

Okay! Yes, I knew this was something dumb that I had done.
When I installed gcc, I somehow did the install without g++. It was not the first thing that came to my mind because I thought the intel compilers would have their own libraries, but now I understand that the build process also depends on the GNU libraries.
Thank you again, and as always, the problem here was between the chair and the desk! :)