Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thornado #1415

Open
banach-space opened this issue Jan 26, 2022 · 1 comment
Open

Thornado #1415

banach-space opened this issue Jan 26, 2022 · 1 comment
Labels
apps Building Fortran applications with Flang - status + instructions

Comments

@banach-space
Copy link
Collaborator

Enable building and execution of the Thornado application with the LLVM Flang compiler.

@Sezoir
Copy link
Collaborator

Sezoir commented Feb 11, 2022

Next steps: I am not planning to take on this project. This is just an initial report found. Please feel free to work on this.

thornado:

https://proxyapps.exascaleproject.org/app/thornado-mini/
https://github.com/ECP-Astro/thornado_mini

The thornado application requires the following to build:

  • MPI (For this I used openmpi as a wrapper compiler around gfortran)
  • hdf5
  • lapack (for this report I used openblas which has lapack included with it)

Initial report for thornado:

  • Minimum version of Fortran required using gfortran: F2008

    • Required arguments to compile with version: "-fdec"
  • How to compile with gfortran:

    1. First you can download the project by running in bash:
    git clone https://github.com/ECP-Astro/thornado_mini.git
    cd thornado_mini
    
    1. Now download this patch thornado.patch.txt and remove the .txt extension. This patch just adds support for mpi gnu. Support for compilers can be added by modifying the Build/Makefile_Compilers makefile. You can then apply the patch with:
    git am -3 thornado.patch
    
    1. Next load your hdf5 and openblas modules. Alternatively, you can manually set the following environment variables appropriately: HDF5_INC, OPENBLAS_INC, HDF5_LIB, OPENBLAS_LIB.
    2. Now you can compile the project by running:
    cd DeleptonizationProblem/Executables
    make THORNADO_DIR=../../ THORNADO_MACHINE=gnu
    

          In order to do a clean build, you can use: make THORNADO_DIR=../../ clean

  • Does it compile with flang-new: No
    Requires an MPI compiler, which flang-new does not currently support. You may be able to hack ompi to add support for flang-new since it is just a wrapper compiler, but I am not sure how much effort would be required.
    A quick test in substituting the MPI Fortran compiler with flang-new results in us requiring MPI library before any other potential compiler errors.

Versions:

  • gfortran version used: 9.3.0
  • flang-new, fir-dev branch, HEAD: fb8eb63
  • openmpi version used: 4.1.1
  • thornado_mini, master, HEAD: 43d565ed9cfbef605893f85a8ef7999eb65e301f
  • hdf5, version used 1.10.6
  • openblas, version used 0.3.10
  • Architecture for compilation: aarch64

@banach-space banach-space added the apps Building Fortran applications with Flang - status + instructions label Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apps Building Fortran applications with Flang - status + instructions
Projects
None yet
Development

No branches or pull requests

2 participants