LZN's Blog CodePlayer

PGI21 WRF-CMAQ 2WAY

2021-08-29
LZN

YQ need to compile CMAQ-WRF 2-way, now we archive the process.

Final Configurations

Libs

  • NVIDIA/hpc_sdk.2021.2
  • hdf5-1.12.2
  • netCDF-C v4.8.1
  • netCDF-F v4.5.3

HDF5

CPP=cpp CFLAGS="-fPIC -m64 -tp=px" CXXFLAGS="-fPIC -m64 -tp=px" FCFLAGS="-fPIC -m64 -tp=px" CC=pgcc CXX=pgc++ FC=pgfortran ./configure --with-zlib=/home/yhuangci/soft/zlib-1.2.11-gcc --prefix=/home/yhuangci/soft/hdf5-1.12.1-pgi21 --enable-hl --enable-threadsafe --enable-cxx --enable-fortran --enable-unsupported
make
make install

NetCDF-C

CPPFLAGS='-I/home/yhuangci/soft/hdf5-1.12.1-pgi21/include -I/home/yhuangci/soft/zlib-1.2.11-gcc/include' LDFLAGS='-L/home/yhuangci/soft/hdf5-1.12.1-pgi21/lib -L/home/yhuangci/soft/zlib-1.2.11-gcc/lib' ./configure --prefix=/home/yhuangci/soft/netcdf-481c453f-pgi21 --disable-dap CC=pgcc
make
make install

NetCDF-F

CPPFLAGS='-I/home/yhuangci/soft/hdf5-1.12.1-pgi21/include -I/home/yhuangci/soft/zlib-1.2.11-gcc/include -I/home/yhuangci/soft/netcdf-481c453f-pgi21/include' LDFLAGS='-L/home/yhuangci/hdf5-1.12.1-pgi21/lib -L/home/yhuangci/soft/zlib-1.2.11-gcc/lib -L/home/yhuangci/soft/netcdf-481c453f-pgi21/lib' ./configure --prefix=/home/yhuangci/soft/netcdf-481c453f-pgi21 --disable-dap FC=pgfortran
make
make install

Whole Porting Process

Libs

  • NVIDIA/hpc_sdk.2021.2
  • mpich-3.4.2
  • hdf5-1.12.2
  • netCDF-C v4.8.1
  • netCDF-F v4.5.3

MPICH

 ./configure --prefix=/home/yhuangci/soft/mpich342-pgi21 FC=pgfortran F77=pgfortran CC=pgcc CXX=pgc++ rsh=ssh

with error:

configure: error: no ch4 netmod selected

  The default ch4 device could not detect a preferred network
  library. Supported options are ofi (libfabric) and ucx:

    --with-device=ch4:ofi or --with-device=ch4:ucx

  Configure will use an embedded copy of libfabric or ucx if one is
  not found in the user environment. An installation can be specified
  by adding

    --with-libfabric=<path/to/install> or --with-ucx=<path/to/install>

  to the configuration.

  The previous MPICH default device (ch3) is also available and
  supported with option:

    --with-device=ch3

Try:

./configure --prefix=/home/yhuangci/soft/mpich342-pgi21 FC=pgfortran F77=pgfortran CC=pgcc CXX=pgc++ rsh=ssh --with-device=ch4:ofi

Pass!

make 2>&1 | tee make.log    # about 1 hour

Got error:

/home/yhuangci/soft/mpich-3.4.2/modules/libfabric/util/info.c:338: undefined reference to `fi_dupinfo'
/home/yhuangci/soft/mpich-3.4.2/modules/libfabric/util/info.c:313: undefined reference to `fi_getinfo'
/home/yhuangci/soft/mpich-3.4.2/modules/libfabric/util/info.c:321: undefined reference to `fi_getparams'
/home/yhuangci/soft/mpich-3.4.2/modules/libfabric/util/info.c:323: undefined reference to `fi_tostr'
/home/yhuangci/soft/mpich-3.4.2/modules/libfabric/util/info.c:327: undefined reference to `fi_tostr'
/home/yhuangci/soft/mpich-3.4.2/modules/libfabric/util/info.c:327: undefined reference to `fi_tostr'
/home/yhuangci/soft/mpich-3.4.2/modules/libfabric/util/info.c:321: undefined reference to `fi_freeparams'
/home/yhuangci/soft/mpich-3.4.2/modules/libfabric/util/info.c:329: undefined reference to `fi_freeinfo'
/home/yhuangci/soft/mpich-3.4.2/modules/libfabric/util/info.c:431: undefined reference to `fi_freeinfo'
/home/yhuangci/soft/mpich-3.4.2/modules/libfabric/util/info.c:353: undefined reference to `fi_tostr'
make[3]: *** [util/fi_info] Error 2
make[3]: Leaving directory `/home/yhuangci/soft/mpich-3.4.2/modules/libfabric'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/yhuangci/soft/mpich-3.4.2/modules/libfabric'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/yhuangci/soft/mpich-3.4.2'
make: *** [all] Error 2

Retry config:

./configure --prefix=/home/yhuangci/soft/mpich342-pgi21 FC=pgfortran F77=pgfortran CC=pgcc CXX=pgc++ rsh=ssh --with-device=ch3
make 2>&1 | tee make.log

Pass! make with on error but make check with 4 items not passed. Let’s leave it alone first.

HDF5

CPP=cpp CFLAGS="-fPIC -m64 -tp=px" CXXFLAGS="-fPIC -m64 -tp=px" FCFLAGS="-fPIC -m64 -tp=px" CC=pgcc CXX=pgc++ FC=pgfortran ./configure --with-zlib=/home/yhuangci/soft/zlib-1.2.11-gcc --prefix=/home/yhuangci/soft/hdf5-1.12.1-pgi21 --enable-hl --enable-threadsafe --enable-cxx --enable-fortran --enable-unsupported
make
make install

NetCDF-C

CPPFLAGS='-I/home/yhuangci/soft/hdf5-1.12.1-pgi21/include -I/home/yhuangci/soft/zlib-1.2.11-gcc/include' LDFLAGS='-L/home/yhuangci/soft/hdf5-1.12.1-pgi21/lib -L/home/yhuangci/soft/zlib-1.2.11-gcc/lib' ./configure --prefix=/home/yhuangci/soft/netcdf-481c453f-pgi21 --disable-dap CC=pgcc
make
make install

NetCDF-F

CPPFLAGS='-I/home/yhuangci/soft/hdf5-1.12.1-pgi21/include -I/home/yhuangci/soft/zlib-1.2.11-gcc/include -I/home/yhuangci/soft/netcdf-481c453f-pgi21/include' LDFLAGS='-L/home/yhuangci/hdf5-1.12.1-pgi21/lib -L/home/yhuangci/soft/zlib-1.2.11-gcc/lib -L/home/yhuangci/soft/netcdf-481c453f-pgi21/lib' ./configure --prefix=/home/yhuangci/soft/netcdf-481c453f-pgi21 --disable-dap FC=pgfortran
make
make install

Similar Posts

Comments