diff --git a/templates/ncl/6.6.2/CodeIftran.patch b/templates/ncl/6.6.2/CodeIftran.patch new file mode 100644 index 0000000000000000000000000000000000000000..a0c64225b9b0852fd097bb462110c8b42315f854 --- /dev/null +++ b/templates/ncl/6.6.2/CodeIftran.patch @@ -0,0 +1,19 @@ +--- CodeIftran 2023-03-04 11:21:59.000000000 +0800 ++++ CodeIftran-bak 2025-01-14 10:21:05.616800000 +0800 +@@ -9666,6 +9666,7 @@ C + C Find the length of the character buffer and initialize it to blanks. + C + LBUF=LEN(CBUF) ++ CBUF(1:LBUF)='' + DO (III=1,LBUF) + CBUF(III:III)=' ' + END DO +@@ -9790,7 +9791,7 @@ C which requires special action). + C + IF (NDGS.EQ.0.OR.IEXF.EQ.0) + IF (IEXP.GT.0.OR.LMSD.EQ.-10000) +- CBUF(1:1)='0' ++ CBUF(1:LBUF)='0' + NBUF=1 + NDGS=1 + IEVA=0 diff --git a/templates/ncl/6.6.2/Format.c.patch b/templates/ncl/6.6.2/Format.c.patch new file mode 100644 index 0000000000000000000000000000000000000000..5384873225f40fa39b89010445307b530cf16ff1 --- /dev/null +++ b/templates/ncl/6.6.2/Format.c.patch @@ -0,0 +1,20 @@ +--- Format.c 2019-02-28 07:44:39.000000000 +0800 ++++ Format.c 2025-01-14 09:28:53.648337000 +0800 +@@ -940,7 +940,7 @@ NhlString _NhlFormatFloat + NGCALLF(cpinrc,CPINRC)(); + + { +- int len1,len2,len3,len4; ++ long len1,len2,len3,len4; + NGstring cex1_f; + NGstring cex2_f; + NGstring cex3_f; +@@ -1283,7 +1283,7 @@ NhlErrorTypes _NhlGetScaleInfo + NGCALLF(cpinrc,CPINRC)(); + + { +- int len1,len2,len3,len4; ++ long len1,len2,len3,len4; + NGstring cex1_f; + NGstring cex2_f; + NGstring cex3_f; diff --git a/templates/ncl/6.6.2/Site.local b/templates/ncl/6.6.2/Site.local new file mode 100644 index 0000000000000000000000000000000000000000..3a8c7e025dafd65f12b07fc9ce6c6e9e0393a57b --- /dev/null +++ b/templates/ncl/6.6.2/Site.local @@ -0,0 +1,27 @@ +/* + * This file was created by the Configure script. + */ + +#ifdef FirstSite + +#endif /* FirstSite */ + + +#ifdef SecondSite + +#define YmakeRoot /hpcrunner/software/utils/ncl/6.3.0 + +#define NetCDFlib -lnetcdf + +#define LibSearch -L/hpcrunner/software/compiler/kgcc/10.3.1/lib -L/hpcrunner/software/compiler/kgcc/10.3.1/lib64 -L/hpcrunner/software/mpi/hmpi1.2.0-kgcc10.3.1/1.2.0/lib -L/hpcrunner/software/libs/kgcc10.3.1/hmpi1.2.0/hdf5/1.8.20/lib -L/lib -L/hpcrunner/software/libs/kgcc10.3.1/hmpi1.2.0/netcdf/4.7.4/lib -L/hpcrunner/software/libs/kgcc10.3.1/libjpeg/v9b/lib -L/hpcrunner/software/libs/kgcc10.3.1/hmpi1.2.0/hdf4/4.2.15/lib -L/hpcrunner/software/libs/kgcc10.3.1/proj/5.2.0/lib -L/hpcrunner/software/libs/kgcc10.3.1/libpng/1.6.37/lib -L/hpcrunner/software/libs/kgcc10.3.1/gdal/2.2.4/lib -L/hpcrunner/software/libs/kgcc10.3.1/jasper/1.900.2/lib -L/hpcrunner/software/libs/kgcc10.3.1/g2clib/1.6.0/lib -L/hpcrunner/software/libs/kgcc10.3.1/udunits/2.2.28/lib -L/hpcrunner/software/libs/kgcc10.3.1/gsl/2.6/lib -L/hpcrunner/software/libs/kgcc10.3.1/hdf-eos2/2.20/lib -L/hpcrunner/software/libs/kgcc10.3.1/hdf-eos5/1.16/lib -L/hpcrunner/software/libs/kgcc10.3.1/mesa/3.1/lib -L/hpcrunner/software/libs/kgcc10.3.1/vis5dplus/1.3.0/lib -L/hpcrunner/software/libs/kgcc10.3.1/szip/2.1.1/lib -L/lib46 -L/usr/lib64 +#define IncSearch -I/hpcrunner/software/compiler/kgcc/10.3.1/include -I/hpcrunner/software/mpi/hmpi1.2.0-kgcc10.3.1/1.2.0/include -I/hpcrunner/software/libs/kgcc10.3.1/hmpi1.2.0/hdf5/1.8.20/include -I/include -I/hpcrunner/software/libs/kgcc10.3.1/hmpi1.2.0/netcdf/4.7.4/include -I/hpcrunner/software/libs/kgcc10.3.1/libjpeg/v9b/include -I/hpcrunner/software/libs/kgcc10.3.1/hmpi1.2.0/hdf4/4.2.15/include -I/hpcrunner/software/libs/kgcc10.3.1/proj/5.2.0/include -I/hpcrunner/software/libs/kgcc10.3.1/libpng/1.6.37/include -I/hpcrunner/software/libs/kgcc10.3.1/gdal/2.2.4/include -I/hpcrunner/software/libs/kgcc10.3.1/jasper/1.900.2/include -I/hpcrunner/software/libs/kgcc10.3.1/jasper/1.900.2/include/jasper -I/hpcrunner/software/libs/kgcc10.3.1/g2clib/1.6.0/include -I/hpcrunner/software/libs/kgcc10.3.1/udunits/2.2.28/include -I/hpcrunner/software/libs/kgcc10.3.1/gsl/2.6/include -I/hpcrunner/software/libs/kgcc10.3.1/gsl/2.6/include/gsl -I/hpcrunner/software/libs/kgcc10.3.1/hdf-eos2/2.20/include -I/hpcrunner/software/libs/kgcc10.3.1/hdf-eos5/1.16/include -I/hpcrunner/software/libs/kgcc10.3.1/mesa/3.1/include -I/hpcrunner/software/libs/kgcc10.3.1/mesa/3.1/include/GL -I/hpcrunner/software/libs/kgcc10.3.1/vis5dplus/1.3.0/include -I/hpcrunner/software/libs/kgcc10.3.1/szip/2.1.1/include -I/usr/include -I/usr/include/freetype2 -I/usr/include/freetype2/freetype -I/usr/include/X11 -I/usr/include/tirpc + + + +#define BuildGDAL 1 +#define BuildTRIANGLE 0 +#define BuildV5D 1 + +#define NoMakeDepend + +#endif /* SecondSite */ diff --git a/templates/ncl/6.6.2/data.NCL.arm-container-bisheng.cpu.config b/templates/ncl/6.6.2/data.NCL.arm-container-bisheng.cpu.config new file mode 100644 index 0000000000000000000000000000000000000000..4a31d70b261d713de16a48fe4c7355ef87a999b4 --- /dev/null +++ b/templates/ncl/6.6.2/data.NCL.arm-container-bisheng.cpu.config @@ -0,0 +1,236 @@ +[SERVER] +11.11.11.11 + +[DOWNLOAD] +NCL/6.6.2 $JARVIS_PROXY/chen-shaoheng/NCL-SOURCE/releases/download/ncl-6.6.2/ncl-6.6.2.tar.gz + +[DEPENDENCY] +yum install tar byacc bison expat-devel expat libtirpc-devel libX11 libX11-devel libXmu* libXaw libXaw-devel flex flex-devel freetype-devel libpng-devel libXi libSM-devel libXi-devel libXext-devel pkgconf curl libcurl-devel zlib-devel cairo cairo-devel pixman pixman-devel patch -y + +./jarvis -install bisheng/3.2.0-mini com +module use ./software/modulefiles +module load bisheng/3.2.0-mini +export CC=clang CXX=clang++ FC=flang +./jarvis -install hmpi/2.3.0 clang +module use ./software/moduledeps/bisheng3.2.0 +module load hmpi/2.3.0 + +export CC=mpicc CXX=mpicxx FC=mpif90 F77=mpif90 +sed -i '10c ./configure --prefix=$1 --enable-fortran --enable-static=yes --enable-parallel --enable-shared CFLAGS="-O3 -fPIC -Wno-incompatible-pointer-types-discards-qualifiers -Wno-non-literal-null-conversion -Wno-int-conversion" FCFLAGS="-O3 -fPIC -Wno-int-conversion"' package/hdf5/1.10.1/clang/install.sh +./jarvis -install package/hdf5/1.10.1/clang bisheng+mpi +module add hdf5-clang/1.10.1 + +export CC=mpicc CXX=mpicxx FC=mpifort +sed -i '11c ./configure --prefix=$1 --enable-shared --enable-fortran --enable-large-file-test ' package/pnetcdf/1.11.2/install.sh +./jarvis -install package/pnetcdf/1.11.2 bisheng+mpi +module add pnetcdf/1.11.2 + +./jarvis -install package/netcdf/4.7.4/clang bisheng+mpi +module add netcdf-clang/4.7.4 + +export CC=clang CXX=clang++ FC=flang +./jarvis -install package/libjpeg/v9b bisheng +module add libjpeg/v9b + +export CC=mpicc CXX=mpicxx FC=mpifort F77=mpifort +sed -i '13c ./configure --prefix=$1 --enable-production --with-zlib=/usr/lib64 --enable-fortran --enable-hdf4-xdr --disable-shared --build=arm-linux --with-jpeg=${LIBJPEG_PATH} --disable-netcdf CFLAGS="-fPIC -Wno-error=int-conversion" CXXFLAGS="-fPIC -Wno-error=int-conversion" FFLAGS="-fPIC -Wno-error=int-conversion" LDFLAGS="-L/usr/lib64 -ltirpc " CPPFLAGS="-I/usr/include/tirpc"' package/hdf4/4.2.15/install.sh +./jarvis -install package/hdf4/4.2.15 bisheng+mpi +module add hdf4/4.2.15 + +export CC=clang CXX=clang++ FC=flang +./jarvis -install package/proj/5.2.0 bisheng +module add proj/5.2.0 + +./jarvis -install package/libpng/1.6.37 bisheng +module add libpng/1.6.37 + +./jarvis -install package/gdal/2.2.4 bisheng +module add gdal/2.2.4 + +./jarvis -install package/jasper/1.900.2 bisheng +module add jasper/1.900.2 + +./jarvis -install package/g2clib/1.6.0/clang bisheng +module add g2clib-clang/1.6.0 + +sed -i '9c ./configure --prefix=$1 LDFLAGS="-L/usr/lib64" CFLAGS="-I/usr/include" ' package/udunits/2.2.28/install.sh +./jarvis -install package/udunits/2.2.28 bisheng +module add udunits/2.2.28 + +./jarvis -install package/gsl/2.6 bisheng +module add gsl/2.6 + +./jarvis -install package/hdf-eos2/2.20 bisheng +module add hdf-eos2/2.20 + +export HDF5_PATH=${HDF5_CLANG_PATH} +./jarvis -install package/hdf-eos5/1.16 bisheng +module add hdf-eos5/1.16 + +sed -i '12c ./configure --prefix=$1 --x-libraries=/usr/lib64 --x-include=/usr/include' package/mesa/3.1/install.sh +./jarvis -install package/mesa/3.1 bisheng +module add mesa/3.1 + +./jarvis -install package/vis5dplus/1.3.0 bisheng +module add vis5dplus/1.3.0 + +sed -i '9c ./configure --prefix=$1 --enable-netcdf-4 --enable-shared' package/szip/2.1.1/install.sh +./jarvis -install package/szip/2.1.1 bisheng +module add szip/2.1.1 + +#wget https://archives.openeuler.openatom.cn/openEuler-21.03/everything/aarch64/Packages/atlas-devel-3.10.3-11.oe1.aarch64.rpm --no-ch +#wget https://archives.openeuler.openatom.cn/openEuler-21.03/OS/aarch64/Packages/atlas-3.10.3-11.oe1.aarch64.rpm --no-ch +#rpm -ivh atlas-3.10.3-11.oe1.aarch64.rpm +#rpm -ivh atlas-devel-3.10.3-11.oe1.aarch64.rpm +rm *.rpm -rf +rm ncl-6.6.2 -rf +tar -xvf ${JARVIS_DOWNLOAD}/ncl-6.6.2.tar.gz + + +[ENV] +module purge +#!/bin/bash +module use ./software/modulefiles +module load bisheng/3.2.0-mini +export CC=clang CXX=clang++ FC=flang +module use ./software/moduledeps/bisheng3.2.0 +module load hmpi/2.3.0 +module add hdf5-clang/1.10.1 netcdf-clang/4.7.4 +export HDF5=${HDF5_CLANG_PATH} +export NETCDF=${NETCDF_CLANG_PATH} +module add pnetcdf/1.11.2 +module add proj/5.2.0 +module add hdf4/4.2.15 +module add jasper/1.900.2 +module add libpng/1.6.37 +module add gdal/2.2.4 +module add libjpeg/v9b +module add g2clib-clang/1.6.0 +module add udunits/2.2.28 +module add gsl/2.6 +module add hdf-eos2/2.20 +module add hdf-eos5/1.16 +module add mesa/3.1 +module add vis5dplus/1.3.0 +module add szip/2.1.1 +export CC=clang FC=flang CXX=clang++ +export JARVIS_UTILS=/hpcrunner/software/utils +export PATH=$JARVIS_UTILS/ncl/6.6.2/clang/bin:$PATH +export LD_LIBRARY_PATH=$JARVIS_UTILS/ncl/6.6.2/clang/lib:$LD_LIBRARY_PATH +export NCARG_FONTCAPS=$JARVIS_UTILS/ncl/6.6.2/clang/lib/ncarg/fontcaps +export NCARG_GRAPHCAPS=$JARVIS_UTILS/ncl/6.6.2/clang/lib/ncarg/graphcaps +export NCARG_ROOT=$JARVIS_UTILS/ncl/6.6.2/clang +export NCARG_DATABASE=$JARVIS_UTILS/ncl/6.6.2/clang/lib/ncarg/database +export NCARG_LIB=$JARVIS_UTILS/ncl/6.6.2/clang/lib +export NCARG_NCARG=$JARVIS_UTILS/ncl/6.6.2/clang/lib/ncarg + + +[APP] +app_name = NCL +build_dir = ${JARVIS_ROOT}/ncl-6.6.2 +binary_dir = +case_dir = + +[BUILD] +echo "请确保已经执行./jarvis -dp命令解压主程序源码包。执行./jarvis -b前都应先执行./jarvis -dp命令!" +#fix sourcecode +sed -i '21c #define CCompiler clang' config/LINUX +sed -i '22c #define FCompiler flang' config/LINUX +sed -i '22a #define CxxCompiler flang++' config/LINUX +sed -i '23c #define CtoFLibraries -lflang -lm -lpgmath -lflangrti -ltirpc' config/LINUX +sed -i '24c #define CtoFLibrariesUser -lflang -lm -lpgmath -lflangrti -ltirpc' config/LINUX +sed -i '25c #define CcOptions -ansi -fPIC -fopenmp -std=c99 -fsigned-char -Xlinker -zmuldefs -Wno-error=int-conversion -Wl,--copy-dt-needed-entries' config/LINUX +sed -i '26c #define FcOptions -fPIC -fno-second-underscore -fno-range-check -fopenmp -Wno-error=int-conversion -Wl,--copy-dt-needed-entries' config/LINUX + +sed -i '40a void _swapshort (register char *bp, register unsigned n);' ncarview/src/lib/libncarg_ras/misc.c +sed -i '41a void _swaplong (register char *bp, register unsigned n);' ncarview/src/lib/libncarg_ras/misc.c +sed -i '46c # @$(CAT) Copyright' ncarview/src/bin/ictrans/yMakefile + +sed -i '61c EXCSRCS = bcopyswap.c logic32.c' common/src/libncarg_c/yMakefile +sed -i '62c EXFSRCS = gbytes.f sbytes.f' common/src/libncarg_c/yMakefile +sed -i '62a EXOBJS = bcopyswap.o sbytes.o gbytes.o logic32.o ' common/src/libncarg_c/yMakefile + +cd ${JARVIS_ROOT}/ncl-6.6.2/ni/src/lib/hlu +patch -p0 < ${JARVIS_ROOT}/templates/ncl/6.6.2/Format.c.patch +cd ${JARVIS_ROOT}/ncl-6.6.2/ncarg2d/src/libncarg/conpack +patch -p0 < ${JARVIS_ROOT}/templates/ncl/6.6.2/CodeIftran.patch +cd ${JARVIS_ROOT}/ncl-6.6.2 + +rm ./config/ymake-filter -f +echo " +====================================== +请务必按照以下选项进行预编译配置!! 建议截图保留查看 +" +echo " +Enter Return(default), y(yes), n(no), or q(quit) > y +Enter Return to continue, or q(quit) Enter +Build NCL (y)? y +Parent installation directory /path/to/ncl +System temp space directory /tmp Enter +Build NetCDF4 feature support (optional)? (y) y +Build HDF4 support (optional) into NCL? (y) y +Also build HDF4 support (optional) into raster library? (y) y +Did you build HDF4 with szip support? (n) n +Build Triangle support (optional) into NCL (y) n +did you enable NetCDF-4 support (y) y +Did you build NetCDF with OPeNDAP support (y) n +Build GDAL support (optional) into NCL? (n) y +Build Udunits-2 support (optional) into NCL (y) y +Build Vis5d+ support (optional) into NCL (n) y +Build HDF-EOS2 support (optional) into NCL (y) y +Build HDF5 support (optional) into NCL (y) y +Build HDF-EOS5 support (optional) into NCL (y) y +Build GRIB2 support (optional) into NCL (y) y +Enter local library search path(s) /lib64 /usr/lib64 /usr/include/X11 +Enter local include search path(s) /usr/include /usr/include/freetype2 /usr/include/freetype2/freetype /usr/include/X11 /usr/include/tirpc +Go back and make more changes or review? (n) Enter +Save current configuration ? (y) Enter + +======================================" +sleep 10 + +./Configure + +rm config/Site.local -f +cp ${JARVIS_ROOT}/templates/ncl/6.6.2/Site.local config/ -f + +sed -i "12c #define YmakeRoot $JARVIS_UTILS/ncl/6.6.2/clang" config/Site.local +sed -i "16c #define LibSearch -L$BISHENG_PATH/lib -L$BISHENG_PATH/lib64 -L$HMPI_PATH/lib -L$HDF5_CLANG_PATH/lib -L$PNETCDF_PATH/lib -L$NETCDF_CLANG_PATH/lib -L$LIBJPEG_PATH/lib -L$HDF4_PATH/lib -L$PROJ_PATH/lib -L$LIBPNG_PATH/lib -L$GDAL_PATH/lib -L$JASPER_PATH/lib -L$G2CLIB_CLANG_PATH/lib -L$UDUNITS_PATH/lib -L$GSL_PATH/lib -L$HDF_EOS2_PATH/lib -L$HDF_EOS5_PATH/lib -L$MESA_PATH/lib -L$VIS5DPLUS_PATH/lib -L$SZIP_PATH/lib -L/lib64 -L/usr/lib64" config/Site.local +sed -i "17c #define IncSearch -I$BISHENG_PATH/include -I$HMPI_PATH/include -I$HDF5_CLANG_PATH/include -I$PNETCDF_PATH/include -I$NETCDF_CLANG_PATH/include -I$LIBJPEG_PATH/include -I$HDF4_PATH/include -I$PROJ_PATH/include -I$LIBPNG_PATH/include -I$GDAL_PATH/include -I$JASPER_PATH/include -I$JASPER_PATH/include/jasper -I$G2CLIB_CLANG_PATH/include -I$UDUNITS_PATH/include -I$GSL_PATH/include -I$GSL_PATH/include/gsl -I$HDF_EOS2_PATH/include -I$HDF_EOS5_PATH/include -I$MESA_PATH/include -I$MESA_PATH/include/GL -I$VIS5DPLUS_PATH/include -I$SZIP_PATH/include -I/usr/include -I/usr/include/freetype2 -I/usr/include/freetype2/freetype -I/usr/include/X11 -I/usr/include/tirpc" config/Site.local + + +cat config/Site.local + +make Everything 2>&1 |tee make.log +ln -s /hpcrunner/software/utils/ncl/6.6.2/clang/share/ncarg/* /hpcrunner/software/utils/ncl/6.6.2/clang/lib/ncarg/ +cd /hpcrunner/software/utils/ncl/6.6.2/clang/lib/ncarg/database/rangs +wget https://www.io-warnemuende.de/files/staff/rfeistel/download/rangs\(0\).zip --no-ch +wget https://www.io-warnemuende.de/files/staff/rfeistel/download/rangs\(1\).zip --no-ch +wget https://www.io-warnemuende.de/files/staff/rfeistel/download/rangs\(2\).zip --no-ch +wget https://www.io-warnemuende.de/files/staff/rfeistel/download/rangs\(3\).zip --no-ch +wget https://www.io-warnemuende.de/files/staff/rfeistel/download/rangs\(4\).zip --no-ch + +wget https://www.io-warnemuende.de/files/staff/rfeistel/download/gshhs\(0\).zip --no-ch +wget https://www.io-warnemuende.de/files/staff/rfeistel/download/gshhs\(1\).zip --no-ch +wget https://www.io-warnemuende.de/files/staff/rfeistel/download/gshhs\(2\).zip --no-ch +wget https://www.io-warnemuende.de/files/staff/rfeistel/download/gshhs\(3\).zip --no-ch +wget https://www.io-warnemuende.de/files/staff/rfeistel/download/gshhs\(4\).zip --no-ch + +unzip 'gshhs(0).zip' +unzip 'gshhs(1).zip' +unzip 'gshhs(2).zip' +unzip 'gshhs(3).zip' +unzip 'gshhs(4).zip' + +unzip 'rangs(0).zip' +unzip 'rangs(1).zip' +unzip 'rangs(2).zip' +unzip 'rangs(3).zip' +unzip 'rangs(4).zip' +cd - + + +[RUN] +run = ncl -V +binary = +nodes = 1 diff --git a/templates/ncl/6.6.2/data.NCL.arm.cpu.config b/templates/ncl/6.6.2/data.NCL.arm_centos8.cpu.config similarity index 100% rename from templates/ncl/6.6.2/data.NCL.arm.cpu.config rename to templates/ncl/6.6.2/data.NCL.arm_centos8.cpu.config