Easy build of library only

42 views
Skip to first unread message

Alberto Ramos

unread,
Mar 19, 2018, 12:21:52 PM3/19/18
to OpenCoarrays

Dear all,

It is a long time that I do not have to build OpenCoarrays myself, but
due to some upgrade in a cluster I use I had to do it.

In previous versions one could go to src/mpi, type make there and get
the mpi library, at least if one had a working version of mpi.

Now this is no longer possible. From a general point of view, I find
this very unconvenient, specailly to have opencoarrays running on
clusters. It is easy to get the dependencies in our own machines, but
often we have to deal with large clusters that do not have a very up to date
software. Nevertheless these machines have always a reasonable version
of gcc/MPI. Before one could just use this to run CAF programs. Why
this is no longer an option??

I have managed to compile OpenCoarrays 2.0.0 without any issues on a
cluster with gcc6 and openmpi by just using similar makefiles as in
previous versions.

But if I try to run the general install script, it starts to download
cmake, gcc7, m4, bison and I do not know what else...

This tool is of course very useful for admins of large clusters, but I
would request to please keep a simple makefile in src/mpi that can be
used to compile libcaf_mpi, leaving the user to choose the gcc
compiler/mpi implementation via module load facilities. This is very
useful for users of large clusters like me.

In any case many thanks for the great work.

A.




Zaak Beekman

unread,
Mar 21, 2018, 1:51:41 PM3/21/18
to OpenCoarrays
Hi Alberto,

We try to support as many users as possible, but it seems that everyone has their own preference for how they want to install OpenCoarrays. The static make files are not officially supported because OpenCoarrays is so tightly coupled to both the version of GFortran being used and the MPI implementation; the build system needs to perform some introspection to ensure all the interfaces match and compatible features are enabled. Static makefiles are not maintained because they cannot easily accomplish this in a cross-platform manner.

In my opinion the most straightforward way to install OpenCoarrays with minimal additional dependencies on a machine in which you do not have administrative privileges is to invoke CMake directly. Kitware provides pre-compiled binary installations of CMake for Linux at https://cmake.org/download/ that can be installed into your home directory. After that the installation procedure looks like:

    module load mpi/openmpi/3.1 # or whatever you need to do to activate the desired MPI in your environment
    export FC=/path/to/desired/gfortran
    export CC=/path/to/desired/c/compiler
    mkdir build-dir
    cd build-dir
    cmake -DCMAKE_INSTALL_PREFIX=${HOME}/apps/OpenCoarrays  /path/to/extracted/OpenCoarrays/source/dir
    # in the above you may pick a different installation prefix directory if you so please
    make -j
    make check # optional, will try to run MPI backed caf unit/integration/regression tests
    make install

These instructions are found in the newly added "Developer/quickstart install guide" in the INSTALL file distributed with the source (not INSTALL.md) and available at https://github.com/sourceryinstitute/OpenCoarrays/blob/master/INSTALL

I will also note that you can pass a desired set of compilers and MPI installation location to the install.sh script using the flags. This should prevent it from trying to download and install GCC 7, MPI & prerequisites. The default GFortran was bumped up to 7.x in the last release because significant new features require GFortran 7 and numerous bug fixes are available only for the GFortran 7 interface. The majority of the most egregious regressions associated with GFortran 7 have also been fixed.

Please let me know if I can be of additional assistance.

Thanks,
Zaak
Reply all
Reply to author
Forward
0 new messages