Error: cannot run Fortran compiled programs.  [SOLVED]

option, parallelism,...

Moderators: fgoudreault, mcote

Forum rules
Please have a look at ~abinit/doc/config/build-config.ac in the source package for detailed and up-to-date information about the configuration of Abinit 8 builds.
For a video explanation on how to build Abinit 7.x for Linux, please go to: http://www.youtube.com/watch?v=DppLQ-KQA68.
IMPORTANT: when an answer solves your problem, please check the little green V-like button on its upper-right corner to accept it.
Locked
kinsang
Posts: 13
Joined: Wed Mar 23, 2016 2:24 pm

Error: cannot run Fortran compiled programs.

Post by kinsang » Tue Apr 12, 2016 3:34 am

Hi, everyone
I find a error that occurs occasionally and I wonder why it occurs. "cannot run Fortran compiled programs."
Enclosing with the error on screen and the conf.log in fallbacks/source/FoX-4.1.2

Error on screen
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
make all-recursive
make[1]: Entering directory `/public/home/kinsang/workdir/abinit-7.10.5-ompi'
Making all in fallbacks
make[2]: Entering directory `/public/home/kinsang/workdir/abinit-7.10.5-ompi/fallbacks'
make fox
make[3]: Entering directory `/public/home/kinsang/workdir/abinit-7.10.5-ompi/fallbacks'
cd sources/FoX-4.1.2 && \
CPP="/public/home/kinsang/workdir/abinit-7.10.5-ompi/config/wrappers/wrap-mpicc -E" \
CPPFLAGS=" " \
CC="/public/home/kinsang/workdir/abinit-7.10.5-ompi/config/wrappers/wrap-mpicc" \
CFLAGS="-g -O2" \
CXX="/public/home/kinsang/workdir/abinit-7.10.5-ompi/config/wrappers/wrap-mpicxx" \
CXXFLAGS="" \
FCCPP="cpp -P -std=c99" \
F77="/public/home/kinsang/workdir/abinit-7.10.5-ompi/config/wrappers/wrap-mpifc" \
FFLAGS="-fixed -extend-source -vec-report0 -noaltparam -nofpscomp -openmp -xHost -w -O2 -mkl -g -O2 " \
F90="/public/home/kinsang/workdir/abinit-7.10.5-ompi/config/wrappers/wrap-mpifc" \
F90FLAGS="-free -extend-source -vec-report0 -noaltparam -nofpscomp -openmp -xHost -w -O2 -mkl -g -O2 " \
FC="/public/home/kinsang/workdir/abinit-7.10.5-ompi/config/wrappers/wrap-mpifc" \
FCFLAGS="-free -extend-source -vec-report0 -noaltparam -nofpscomp -openmp -xHost -w -O2 -mkl -g -O2 " \
LDFLAGS=" " \
LIBS="" \
AR="ar" \
ARFLAGS="rc" \
RANLIB="ranlib" \
ac_fc_srcext="F90" \
/bin/sh ./configure \
--prefix="/public/home/kinsang/workdir/abinit-7.10.5-ompi/fallbacks/exports" \
--bindir="/public/home/kinsang/workdir/abinit-7.10.5-ompi/fallbacks/exports/bin" \
--libdir="/public/home/kinsang/workdir/abinit-7.10.5-ompi/fallbacks/exports/lib" \
--program-suffix="-abinit" \
--enable-sax
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for linker flag to name executables... -o
checking for Fortran compiler default output file name... conftest
checking whether the Fortran compiler works... configure: error: cannot run Fortran compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
make[3]: *** [stamps/fox-config-stamp] Error 1
make[3]: Leaving directory `/public/home/kinsang/workdir/abinit-7.10.5-ompi/fallbacks'
make[2]: [all-local] Error 2 (ignored)
Checking build of fox fallback
test -e stamps/fox-install-stamp
make[2]: *** [all-local] Error 1
make[2]: Leaving directory `/public/home/kinsang/workdir/abinit-7.10.5-ompi/fallbacks'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/public/home/kinsang/workdir/abinit-7.10.5-ompi'
make: *** [all] Error 2

error in conf.log
configure:1958: $? = 0
configure:1971: checking for linker flag to name executables
configure:1979: $FC $ac_link_obj_flag""conftest$ac_exeext $FCFLAGS $LDFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext $LIBS >&5
ifort: error #10236: File not found: '/exe:conftest'
configure:1982: $? = 1
configure:1979: $FC $ac_link_obj_flag""conftest$ac_exeext $FCFLAGS $LDFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext $LIBS >&5
ifort: error #10236: File not found: 'conftest'
configure:1982: $? = 1
configure:1979: $FC $ac_link_obj_flag""conftest$ac_exeext $FCFLAGS $LDFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext $LIBS >&5
configure:1982: $? = 0
configure:1997: result: -o
configure:2003: checking for Fortran compiler default output file name
configure:2030: $FC $ac_link_obj_flag""conftest$ac_exeext $FCFLAGS $LDFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext $LIBS >&5
configure:2033: $? = 0
configure:2079: result: conftest
configure:2084: checking whether the Fortran compiler works
configure:2094: ./conftest
./conftest: symbol lookup error: /public/soft/hpcx-icc/ompi-v1.10/lib/libmpi_mpifh.so.12: undefined symbol: mpi_fortran_errcodes_ignore__
configure:2097: $? = 127
configure:2106: error: cannot run Fortran compiled programs.
If you meant to cross compile, use `--host'.
Attachments
config.log
(7.15 KiB) Downloaded 312 times

Jordan
Posts: 282
Joined: Tue May 07, 2013 9:47 am

Re: Error: cannot run Fortran compiled programs.

Post by Jordan » Tue Apr 12, 2016 1:11 pm

Hi

Probably because you enabled MPI without specifying the --with-mpi-prefix=/path/to/your/mpi/installation

Cheers

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: Error: cannot run Fortran compiled programs.  [SOLVED]

Post by pouillon » Wed Apr 13, 2016 1:36 pm

This error occurs because the LD_LIBRARY_PATH environment variable does not include the location of MPI libraries.

You can solve it either using --with-mpi-prefix, as suggested by Jordan, or through:

Code: Select all

../configure CC="mpicc" FC="mpif90"
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

Locked