-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Build HPC commonly-used Tools using LLVM Flang #56348
Labels
Comments
PeixinQiao
added
flang
Flang issues not falling into any other category
and removed
new issue
labels
Jul 2, 2022
PeixinQiao
changed the title
Build OpenMPI using LLVM Flang
Build HPC commonly used Tools using LLVM Flang
Jul 19, 2022
Build HDF5$ wget https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5-1_12_1.tar.gz
$ tar -xf hdf5-hdf5-1_12_1.tar.gz
$ cd hdf5-hdf5-1_12_1
$ cat ../disable-real-2and3.patch
diff --git a/m4/aclocal_fc.f90 b/m4/aclocal_fc.f90
index e9a11c0..f5bd5aa 100644
--- a/m4/aclocal_fc.f90
+++ b/m4/aclocal_fc.f90
@@ -112,7 +112,7 @@ PROGRAM FC_AVAIL_KINDS
ENDDO
! Find real KINDs
- list_rkinds(num_rkinds)=SELECTED_REAL_KIND(1)
+ list_rkinds(num_rkinds)=4!SELECTED_REAL_KIND(1)
max_decimal_prec = 1
prev_rkind=list_rkinds(num_rkinds)
@@ -120,7 +120,7 @@ PROGRAM FC_AVAIL_KINDS
exp: DO jk = 1, 700
k = SELECTED_REAL_KIND(ik,jk)
IF(k.LT.0) EXIT exp
- IF(k.NE.prev_rkind)THEN
+ IF(k.NE.prev_rkind .AND. k.NE.2 .AND. k.NE.3)THEN
! Check if we aleady have that kind
new_kind = .TRUE.
DO kk = 1, num_rkinds
$ patch -p1 < ../disable-real-2and3.patch
$ mkdir build-f18 && cd build-f18
$ CC=mpicc CXX=mpicxx FC=mpif90 CFLAGS=$optflags CXXFLAGS=$optflags FCFLAGS=$optflags ../configure --prefix=$installHPCToolsPath --enable-shared --enable-static --enable-fortran --enable-parallel --enable-optimization=high
$ cat ../../hdf5-1_12_1-libtool.patch
diff --git a/libtool b/libtool
index 3b86358..e8ca993 100755
--- a/libtool
+++ b/libtool
@@ -11832,7 +11832,7 @@ no_builtin_flag=""
pic_flag=""
# How to pass a linker flag through the compiler.
-wl=""
+wl="-Wl,"
# Compiler flag to prevent dynamic linking.
link_static_flag=""
$ patch -p1 < ../../hdf5-1_12_1-libtool.patch
$ make -j
$ make install |
PeixinQiao
changed the title
Build HPC commonly used Tools using LLVM Flang
Build HPC commonly-used Tools using LLVM Flang
Jul 19, 2022
Build PNetCDF$ wget https://parallel-netcdf.github.io/Release/pnetcdf-1.11.2.tar.gz
$ tar -xf pnetcdf-1.11.2.tar.gz
$ cd pnetcdf-1.11.2
$ mkdir build-f18 && cd build-f18
$ CC=mpicc CXX=mpicxx FC=mpif90 CFLAGS=$optflags CXXFLAGS=$optflags FCFLAGS=$optflags FFLAGS=$optflags ../configure --prefix=$installHPCToolsPath --enable-shared --enable-static --enable-fortran --enable-large-file-test
$ make -j
$ make install |
Build NetCDF-C$ wget https://github.com/Unidata/netcdf-c/archive/refs/tags/v4.7.3.tar.gz
$ tar -xf netcdf-c-4.7.3.tar.gz
$ cd netcdf-c-4.7.3
$ mkdir build-f18 && cd build-f18
$ CC=mpicc CFLAGS="$optflags -I$installHPCToolsPath/include" LDFLAGS="$ldflags -L$installLLVMFlangPath/lib -L$installHPCToolsPath/lib" ../configure --prefix=$installHPCToolsPath --build=aarch64-linux --enable-static --enable-shared --with-pic --enable-parallel-tests --enable-pnetcdf --enable-largefile --enable-large-file-tests --disable-dap
$ make -j
$ make install |
Build NetCDF-Fortran$ wget https://github.com/Unidata/netcdf-fortran/archive/refs/tags/v4.4.5.tar.gz
$ tar -xf netcdf-fortran-4.4.5.tar.gz
$ cd netcdf-fortran-4.4.5
$ mkdir build-f18 && cd build-f18
$ CC=mpicc CFLAGS="$optflags -I$installHPCToolsPath/include" FC=mpif90 FCFLAGS="$optflags -fPIC -I$installHPCToolsPath/include" LDFLAGS="$ldflags -L$installLLVMFlangPath/lib -L$installHPCToolsPath/lib" ../configure --prefix=$installHPCToolsPath --enable-static --enable-shared --with-pic --enable-parallel-tests --enable-largefile --enable-large-file-tests
$ cat ../../netcdf-fortran-libtool.patch
diff --git a/libtool b/libtool
index 6593284..70d26a6 100755
--- a/libtool
+++ b/libtool
@@ -11691,7 +11691,7 @@ no_builtin_flag=""
pic_flag=""
# How to pass a linker flag through the compiler.
-wl=""
+wl="-Wl,"
# Compiler flag to prevent dynamic linking.
link_static_flag=""
@@ -11843,7 +11843,7 @@ no_builtin_flag=""
pic_flag=""
# How to pass a linker flag through the compiler.
-wl=""
+wl="-Wl,"
# Compiler flag to prevent dynamic linking.
link_static_flag=""
$ patch -p1 < ../../netcdf-fortran-libtool.patch
$ make -j
$ make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Export Environment variables
Build LLVM Flang
Build OpenMPI
Test:
The text was updated successfully, but these errors were encountered: