Closed edwardhartnett closed 3 years ago
Yes. I do. We can take it offline.
User Error!
This is the place to resolve this, so I can find the answer again. ;-)
The FindNetCDF.cmake file is in a submodule - is that correct?
This will build the post library and executable
module load cmake
module use /scratch2/NCEPDEV/nwprod/hpc-stack/test/modulefiles/stack
module load hpc/1.0.0-beta1
module load hpc-intel/18.0.5.274
module load hpc-impi/2018.0.4
module load netcdf
module load w3nco
module load g2
module load g2tmpl
module load bacio
module load ip
module load sp
module load w3emc
module load crtm
module load sfcio
module load gfsio
module load wrf_io
module list
git clone --recursive emcgh:emc_post
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=../install -DBUILD_WITH_WRFIO=ON ../emc_post
make -j12
make install
It turns out I didn't use the option --recursive to check out the submodules. Now it works for me. Thanks for the instructions. I will practice further on my personal account.
module use /scratch2/NCEPDEV/nwprod/hpc-stack/test/modulefiles/stack module load hpc/1.0.0-beta1 module load hpc-intel/18.0.5.274 module load hpc-impi/2018.0.4
module load jasper module load png module load z
module load g2 module load g2tmpl module load w3nco module load bacio module load gfsio module load ip module load sp module load crtm module load w3emc
Please advise the fix. Thanks!
@WenMeng-NOAA What you posted are warnings in the code, not compilation errors.
sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/io_int_stubs.f.o
/scratch2/NCEPDEV/ovp/Wen.Meng/LIBS/src/upp_v10.0.0/EMC_post/sorc/ncep_post.fd/io_int_stubs.f(4): warning #6843: A dummy argument with an explicit INTENT(OUT) declaration is not given an explicit value. [DATA]
SUBROUTINE ext_int_get_dom_ti_real ( DataHandle,Element, Data, Count, Outcount, Status )
When I build, following the instructions I posted above, I do not see any errors or failures.
[ 85%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/upp.dir/SET_OUTFLDS.f.o
[ 86%] Linking Fortran static library libupp.a
[ 86%] Built target upp
Scanning dependencies of target nceppost.x
[ 86%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/intio_tags.f.o
[ 87%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/native_endianness.f.o
[ 87%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/wrf_io_flags.f.o
[ 87%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/ASSIGNNEMSIOVAR.f.o
[ 88%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/GETNEMSNDSCATTER.f.o
[ 88%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/GFSPOSTSIG.F.o
[ 88%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/INITPOST_GFS.f.o
[ 89%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/INITPOST_GFS_NEMS.f.o
[ 90%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/INITPOST_GFS_NEMS_MPIIO.f.o
[ 90%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/INITPOST_GFS_NETCDF.f.o
[ 91%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/INITPOST_GFS_NETCDF_PARA.f.o
[ 91%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/INITPOST_GFS_SIGIO.f.o
[ 91%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/INITPOST_NETCDF.f.o
[ 92%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/INITPOST_NMM.f.o
[ 92%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/TIMEF.f.o
[ 93%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/WRFPOST.f.o
[ 94%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/getlvls.f.o
[ 95%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/retrieve_index.f.o
[ 96%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/INITPOST.F.o
[ 97%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/INITPOST_NEMS.f.o
[ 98%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/INITPOST_NEMS_MPIIO.f.o
[ 99%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/getIVariableN.f.o
[ 99%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/getVariable.f.o
[100%] Linking Fortran executable nceppost.x
[100%] Built target nceppost.x
Also, if you wish to build with WRF_IO, you need to load the wrf_io module module load wrf_io
, and add the following to your cmake command: -DBUILD_WITH_WRFIO=ON
. The default is to use the stub.
@aerorahul The option -DBUILD_WITH_WRFIO=ON works.
png_handle_iCCP': pngrutil.c:(.text+0xf46): undefined reference to
inflateValidate'
/scratch2/NCEPDEV/nwprod/hpc-stack/test/intel-18.0.5.274/png/1.6.35/lib64/libpng.a(pngrutil.c.o): In function png_decompress_chunk': pngrutil.c:(.text+0x3699): undefined reference to
inflateValidate'
/scratch2/NCEPDEV/nwprod/hpc-stack/test/intel-18.0.5.274/png/1.6.35/lib64/libpng.a(pngrutil.c.o): In function png_read_start_row': pngrutil.c:(.text+0x69ca): undefined reference to
inflateValidate'
make[2]: [sorc/ncep_post.fd/nceppost.x] Error 1
make[1]: [sorc/ncep_post.fd/CMakeFiles/nceppost.x.dir/all] Error 2
make: *** [all] Error 2@WenMeng-NOAA
I followed the instructions I gave you on Hera, with the hpc-stack you mentioned and was able to build it.
I put those in a script and it is at:
/scratch1/NCEPDEV/stmp2/Rahul.Mahajan/test/Wen.Meng/build_post.sh
To use:
$> /scratch1/NCEPDEV/stmp2/Rahul.Mahajan/test/Wen.Meng/build_post.sh
@aerorahul Your build script works for me. Thanks!
@aerorahul do you know what is going on with this?