autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Autoconf] help configure project for HPC - non-standard ways to run


From: Christian Feld
Subject: Re: [Autoconf] help configure project for HPC - non-standard ways to run the executable
Date: Thu, 21 Sep 2017 08:43:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 2017-09-21 03:40, suzuki toshiya wrote:
Dear Anton,

I'm afraid there is no standard mechanism to control the
execution of cross compiled binary. Yet I've not detected
which autoconf macro defines it, but I can find many
attempts trying to execute "./conftest" directly, in
generated configure script - no variable to insert the
intermediate executor.

# my experience with HPC related field is very legacy,
# but I think it was very popular situation that the
# accessible UNIX frontend provides the cross compilers
# and cannot execute the compiled binary, and the system
# executing the compiled binary do not have Unix like
# frontend.

autotools supports the situation that the cross compiler makes
a binary executable but the system cannot execute it directly.
(e.g. ./configure --host=m68k-coff --build=i386-pc-linux-gnu)

if you do not expect any results from the execution of the
compiled binary, the nearest way might be using autotools as
if you work for cross build.

However, in my impression, current autotools are optimized for
GNU-based cross development toolchain which has well-structured
prefix for each tools (cc, as, ar, ld, etc). The proprietary
toolchain for HPC systems might be something what the original
designers of autotool expected.

I agree that there is and IMO there will be no standard way to control the execution of cross compiled binaries. In our project, we therefore explicitly switch to autoconf's cross-compile mode when we are on a (HPC) system that is known to be a cross-compile system (Blue Gene, Fujitsu, Cray). I.e., we don't 'run' conftests during configure, we just compile and link. Also, we don't specify --host and --build for these systems but provide the native (MPI) compilers to CC, CXX, F77. FC.

This is how to switch to cross-compile mode:

# in configure.ac
cross_compiling=yes

In cross-compile mode the macros
AC_CHECK_FILE
AC_CHECK_FILES
AC_RUN_IFELSE
will die. For the latter one you can define an 'action-if-cross-compiling' though.


What kind of the automation you want to realize by autotool?

Regards,
mpsuzuki

On 9/21/2017 12:43 AM, Anton Shterenlikht wrote:
Hi, I'm new to this list.

I develop a Fortran 2008 coarrays project
targeting HPC systems.
I'd like to simplify my build process with autotools.

My Fortran experience is limited. But I seem to remember that automatic dependency generation and Fortran modules don't play well together. This is an automake issue though.

Christian

The immediate problem is that the executable is
run in different ways on different platforms.

For example, OpenCoarrays compiler is "caf", but
the executable is run with "cafrun -np .. ./a.out".
This is similar to "mpif90" and "mpirun" for MPI
programs. On Cray I compile with "ftn" and run with
"aprun" (it's also cross-compiled, but I'm not there yet).

So I get errors like:

configure:2850: caf -o conftest    conftest.f  >&5
configure:2854: $? = 0
configure:2861: ./conftest
address@hidden match_arg (utils/args/args.c:159): unrecognized argument pmi_
args
address@hidden HYDU_parse_array (utils/args/args.c:174): argument matching r
eturned error
address@hidden parse_args (ui/mpich/utils.c:1596): error parsing input array
address@hidden HYD_uii_mpx_get_parameters (ui/mpich/utils.c:1648): unable to
   parse user arguments
address@hidden main (ui/mpich/mpiexec.c:153): error parsing parameters

because the invocation should have been
   "cafrun -np .. ./conftest"
for this compiler.

Is there a standard way of implementing this
in configure.ac?

I looked at ax_prog_fc_mpi:

https://www.gnu.org/software/autoconf-archive/ax_prog_fc_mpi.html

which looks similar but not exactly what I need.

Thanks

Anton

_______________________________________________
Autoconf mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/autoconf



_______________________________________________
Autoconf mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/autoconf



Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]