From e0b3d60f2654b0ff07497ee06d482ae39505162f Mon Sep 17 00:00:00 2001 From: jsfhd <2162443403@qq.com> Date: Tue, 2 Sep 2025 14:39:41 +0800 Subject: [PATCH 1/2] add ncl-6.6.2-gcc template --- templates/ncl/6.6.2/Site.local | 2 +- .../ncl/6.6.2/data.ncl-gcc.arm.cpu.config | 235 ++++++++++++++++++ templates/ncl/6.6.2/writematrix.patch | 233 +++++++++++++++++ 3 files changed, 469 insertions(+), 1 deletion(-) create mode 100644 templates/ncl/6.6.2/data.ncl-gcc.arm.cpu.config create mode 100644 templates/ncl/6.6.2/writematrix.patch diff --git a/templates/ncl/6.6.2/Site.local b/templates/ncl/6.6.2/Site.local index 3a8c7e02..adaa88c7 100644 --- a/templates/ncl/6.6.2/Site.local +++ b/templates/ncl/6.6.2/Site.local @@ -19,7 +19,7 @@ #define BuildGDAL 1 -#define BuildTRIANGLE 0 +#define BuildTRIANGLE 1 #define BuildV5D 1 #define NoMakeDepend diff --git a/templates/ncl/6.6.2/data.ncl-gcc.arm.cpu.config b/templates/ncl/6.6.2/data.ncl-gcc.arm.cpu.config new file mode 100644 index 00000000..e4ce17a0 --- /dev/null +++ b/templates/ncl/6.6.2/data.ncl-gcc.arm.cpu.config @@ -0,0 +1,235 @@ +[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 +triangle/1.6 http://www.netlib.org/voronoi/triangle.zip + +[DEPENDENCY] +yum install tar byacc bison expat-devel expat libtirpc-devel libjpeg-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 + +export LIBPNG_PATH=/usr +export LIBJPEG_PATH=/usr + +./jarvis -install package/hpckit/25.1.RC1/ any +module use software/utils/hpckit/25.1.RC1/HPCKit/latest/modulefiles +module add gcc/compiler12.3.1/gccmodule gcc/hmpi25.1.RC1/release +export CC=mpicc CXX=mpicxx FC=mpif90 F77=mpif90 +./jarvis -install package/hdf5/1.10.1 gcc+mpi +module use software/moduledeps/gcc12.3.1-hmpi25.1.RC1 +module add hdf5/1.10.1 +./jarvis -install package/pnetcdf/1.11.2 gcc+mpi +module add pnetcdf/1.11.2 + +./jarvis -install package/netcdf/4.7.4 gcc+mpi +module add netcdf/4.7.4 + +./jarvis -install package/hdf4/4.2.15 gcc+mpi +module add hdf4/4.2.15 + +export CC=gcc CXX=g++ FC=gfortran +./jarvis -install package/proj/5.2.0 gcc +module use software/moduledeps/gcc12.3.1 +module add proj/5.2.0 + +./jarvis -install package/gdal/2.2.4 gcc +module add gdal/2.2.4 + +./jarvis -install package/jasper/1.900.2 gcc +module add jasper/1.900.2 + +./jarvis -install package/g2clib/1.6.0 gcc +module add g2clib/1.6.0 + +./jarvis -install package/udunits/2.2.28 gcc +module add udunits/2.2.28 + +./jarvis -install package/gsl/2.6 gcc +module add gsl/2.6 + +./jarvis -install package/hdf-eos2/2.20 gcc +module add hdf-eos2/2.20 + +./jarvis -install package/hdf-eos5/1.16 gcc +module add hdf-eos5/1.16 + +./jarvis -install package/mesa/3.1 gcc +module add mesa/3.1 + +./jarvis -install package/vis5dplus/1.3.0 gcc +module add vis5dplus/1.3.0 + +./jarvis -install package/szip/2.1.1 gcc +module add szip/2.1.1 + +[ENV] +module purge +module use software/utils/hpckit/25.1.RC1/HPCKit/latest/modulefiles +module add gcc/compiler12.3.1/gccmodule gcc/hmpi25.1.RC1/release +export GCC_PATH=${JARVIS_UTILS}/hpckit/25.1.RC1/HPCKit/25.1.RC1/compiler/gcc +module use ${JARVIS_ROOT}/software/moduledeps/gcc12.3.1-hmpi25.1.RC1 +module add hdf5/1.10.1 netcdf/4.7.4 +export HDF5=${HDF5_PATH} +export NETCDF=${NETCDF_PATH} +module use software/moduledeps/gcc12.3.1 +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 gdal/2.2.4 +module add g2clib/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 HMPI_PATH=${JARVIS_UTILS}/hpckit/25.1.RC1/HPCKit/25.1.RC1/hmpi/gcc/release/hmpi/ +export PATH=${JARVIS_UTILS}/ncl/6.6.2/gcc/bin:$PATH +export LD_LIBRARY_PATH=${JARVIS_UTILS}/ncl/6.6.2/gcc/lib:$LD_LIBRARY_PATH +export NCARG_FONTCAPS=${JARVIS_UTILS}/ncl/6.6.2/gcc/lib/ncarg/fontcaps +export NCARG_GRAPHCAPS=${JARVIS_UTILS}/ncl/6.6.2/gcc/lib/ncarg/graphcaps +export NCARG_ROOT=${JARVIS_UTILS}/ncl/6.6.2/gcc +export NCARG_DATABASE=${JARVIS_UTILS}/ncl/6.6.2/gcc/lib/ncarg/database +export NCARG_LIB=${JARVIS_UTILS}/ncl/6.6.2/gcc/lib +export NCARG_NCARG=${JARVIS_UTILS}/ncl/6.6.2/gcc/lib/ncarg + + +[APP] +app_name = NCL +build_dir = ${JARVIS_TMP} +binary_dir =$JARVIS_UTILS/ncl/6.6.2/gcc/bin +case_dir = + +[BUILD] +rm -rf triangle +unzip ${JARVIS_DOWNLOAD}/triangle.zip -d triangle +rm *.rpm -rf +rm ncl-6.6.2 -rf +tar -xf ${JARVIS_DOWNLOAD}/ncl-6.6.2.tar.gz +cd ncl-6.6.2 +cp ${JARVIS_TMP}/triangle/triangle.c ni/src/lib/hlu +cp ${JARVIS_TMP}/triangle/triangle.h ni/src/lib/hlu +sed -i '21c #define CCompiler gcc' config/LINUX +sed -i '22c #define FCompiler gfortran' config/LINUX +sed -i '23c #define CtoFLibraries -lgfortran -lmathlib -ltirpc' config/LINUX +sed -i '24c #define CtoFLibrariesUser -lgfortran -lmathlib -ltirpc' config/LINUX +sed -i '25c #define CcOptions -ansi -fPIC -fopenmp -std=c99 -fsigned-char -Xlinker -zmuldefs -Wl,--copy-dt-needed-entries' config/LINUX +sed -i '26c #define FcOptions -fPIC -fno-second-underscore -fno-range-check -fopenmp -fallow-argument-mismatch -Wl,--copy-dt-needed-entries' config/LINUX +sed -i '22a #define CxxCompiler g++' config/LINUX +#sed -i '23a #define COptimizeFlag -O0 -g' config/LINUX +#sed -i '24a #define FOptimizeFlag -O0 -g' 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_TMP}/ncl-6.6.2/ni/src/lib/hlu +patch -p0 < ${JARVIS_ROOT}/templates/ncl/6.6.2/Format.c.patch +cd ${JARVIS_TMP}/ncl-6.6.2/ncarg2d/src/libncarg/conpack +patch -p0 < ${JARVIS_ROOT}/templates/ncl/6.6.2/CodeIftran.patch +cd ${JARVIS_TMP}/ncl-6.6.2 +patch -p1 < ${JARVIS_ROOT}/templates/ncl/6.6.2/writematrix.patch +rm ./config/ymake-filter -f + +printf "%s\n" "y" "" "y" "$JARVIS_UTILS/ncl/6.6.2/gcc" "" "y" "y" "y" "n" "y" "y" "y" "y" "y" "y" "y" "y" "y" "y" "/lib64 /usr/lib64 /usr/include/X11" "/usr/include /usr/include/freetype2 /usr/include/freetype2/freetype /usr/include/X11 /usr/include/tirpc" "" "" |while read -r line; do echo $line; sleep 1; done | ./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/gcc" config/Site.local +sed -i "16c #define LibSearch -L$GCC_PATH/lib -L$GCC_PATH/lib64_public -L$GCC_PATH/lib64 -L$HMPI_PATH/lib -L$HDF5_PATH/lib -L$PNETCDF_PATH/lib -L$NETCDF_PATH/lib -L$HDF4_PATH/lib -L$PROJ_PATH/lib -L$SZIP_PATH/lib -L$GDAL_PATH/lib -L$JASPER_PATH/lib -L$G2CLIB_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/usr/lib64" config/Site.local +sed -i "17c #define IncSearch -I$GCC_PATH/include -I$HMPI_PATH/include -I$HDF5_PATH/include -I$PNETCDF_PATH/include -I$NETCDF_PATH/include -I$HDF4_PATH/include -I$PROJ_PATH/include -I$GDAL_PATH/include -I$JASPER_PATH/include -I$JASPER_PATH/include/jasper -I$G2CLIB_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 +sed -i "s/g++/g\\\+\\\+/g" Makefile +sed -i "s/\$(CXX)/g\\\+\\\+/g" ni/src/ncl/yMakefile + +make Everything 2>&1 |tee make.log + +sed -i "385s/\-m{\$nbits}//" ${JARVIS_ROOT}/software/utils/ncl/6.6.2/gcc/bin/WRAPIT +sed -i "599s/\-m{\$nbits}//" ${JARVIS_ROOT}/software/utils/ncl/6.6.2/gcc/bin/WRAPIT +sed -i "784s/\-m{\$nbits}//" ${JARVIS_ROOT}/software/utils/ncl/6.6.2/gcc/bin/WRAPIT + +ln -sf ${JARVIS_UTILS}/ncl/6.6.2/gcc/share/ncarg/* ${JARVIS_UTILS}/ncl/6.6.2/gcc/lib/ncarg/ +mkdir ${JARVIS_UTILS}/ncl/6.6.2/gcc/lib/ncarg/database/rangs +cd ${JARVIS_UTILS}/ncl/6.6.2/gcc/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 + + + +[BATCH] + +LOG_FILE="ncl-proformance.log" + +>"$LOG_FILE" +cd ${JARVIS_ROOT}/workloads +mkdir ncl -p +rm ncl/* -f +cd ncl +wget https://www.ncl.ucar.edu/Applications/Scripts/create_netcdf_file_utils.ncl --no-ch +wget https://www.ncl.ucar.edu/Applications/Scripts/create_netcdf_file_ineff.ncl --no-ch + +#$RUN_TOOL "ncl ineff.ncl" "time -p ncl create_netcdf_file_ineff.ncl " +( time -p ncl create_netcdf_file_ineff.ncl) 2>&1 |tee $LOG_FILE +echo "ALL commands executed. Performance log saved to $LOG_FILE" + + + +[JOB] +#!/bin/sh +#DSUB -n ncl_test +#DSUB --mpi hmpi +#DSUB -q default +#DSUB -N 1 +#DSUB -R cpu=128 +#DSUB -oo ncl.%J.out +#DSUB -oe ncl.%J.err + +LOG_FILE="ncl-proformance.log" + +>"$LOG_FILE" +cd ${JARVIS_ROOT}/workloads +mkdir ncl -p +rm create_netcdf_file_utils.ncl create_netcdf_file_ineff.ncl -f +cd ncl +wget https://www.ncl.ucar.edu/Applications/Scripts/create_netcdf_file_utils.ncl --no-ch +wget https://www.ncl.ucar.edu/Applications/Scripts/create_netcdf_file_ineff.ncl --no-ch + +#$RUN_TOOL "ncl ineff.ncl" "time -p ncl create_netcdf_file_ineff.ncl " +( time -p ncl create_netcdf_file_ineff.ncl) 2>&1 |tee $LOG_FILE +echo "ALL commands executed. Performance log saved to $LOG_FILE" diff --git a/templates/ncl/6.6.2/writematrix.patch b/templates/ncl/6.6.2/writematrix.patch new file mode 100644 index 00000000..eaed052d --- /dev/null +++ b/templates/ncl/6.6.2/writematrix.patch @@ -0,0 +1,233 @@ +diff -uprN ncl-6.6.2.bak/ni/src/lib/nfp/writematrixW.c ncl-6.6.2/ni/src/lib/nfp/writematrixW.c +--- ncl-6.6.2.bak/ni/src/lib/nfp/writematrixW.c 2019-02-28 07:44:39.000000000 +0800 ++++ ncl-6.6.2/ni/src/lib/nfp/writematrixW.c 2025-09-01 09:03:21.228142798 +0800 +@@ -21,19 +21,19 @@ + */ + + extern void NGCALLF(writematrixb, WRITEMATRIXB)(char *, int *, int *, byte *, char *, +- char *, int *, int *, int, int, int); ++ char *, int *, int *, int *, int *, int *); + + extern void NGCALLF(writematrixs, WRITEMATRIXS)(char *, int *, int *, short *, char *, +- char *, int *, int *, int, int, int); ++ char *, int *, int *, int *, int *, int *); + + extern void NGCALLF(writematrixi, WRITEMATRIXI)(char *, int *, int *, int *, char *, +- char *, int *, int *, int, int, int); ++ char *, int *, int *, int *, int *, int *); + + extern void NGCALLF(writematrixf, WRITEMATRIXF)(char *, int *, int *, float *, char *, +- char *, int *, int *, int, int, int); ++ char *, int *, int *, int *, int *, int *); + + extern void NGCALLF(writematrixd, WRITEMATRIXD)(char *, int *, int *, double *, char *, +- char *, int *, int *, int, int, int); ++ char *, int *, int *, int *, int *, int *); + + + +@@ -77,7 +77,6 @@ NhlErrorTypes write_matrix_W(void) + char *filename, + *format, + *title; +- + /* + * Retrieve parameters. Note that any of the pointer parameters + * can be set to NULL, indicating you don't care about its value. +@@ -197,39 +196,42 @@ NhlErrorTypes write_matrix_W(void) + + /* flush buffers before writing */ + (void) fflush((FILE *) NULL); +- +- /* call FORTRAN function */ ++ int formatlen=strlen(format); ++ int filenamelen=strlen(filename); ++ int titlelen=strlen(title); ++ /* call FORTRAN function */ + switch (data_type) { + case NCL_byte: + NGCALLF(writematrixb, WRITEMATRIXB)(filename, &idsz0, &idsz1, data, +- format, title, &tspace, &rownumbers, strlen(filename), +- strlen(format), strlen(title)); ++ format, title, &tspace, &rownumbers, &filenamelen, ++ &formatlen, &titlelen); + break; + + case NCL_short: + NGCALLF(writematrixs, WRITEMATRIXS)(filename, &idsz0, &idsz1, data, +- format, title, &tspace, &rownumbers, strlen(filename), +- strlen(format), strlen(title)); ++ format, title, &tspace, &rownumbers, &filenamelen, ++ &formatlen, &titlelen); + break; + + case NCL_int: + /* fall through */ + case NCL_long: ++ //int formatlen=strlen(format); + NGCALLF(writematrixi, WRITEMATRIXI)(filename, &idsz0, &idsz1, data, +- format, title, &tspace, &rownumbers, +- strlen(filename), strlen(format), strlen(title)); ++ format, title, &tspace, &rownumbers, &filenamelen, ++ &formatlen, &titlelen); + break; + + case NCL_float: + NGCALLF(writematrixf, WRITEMATRIXF)(filename, &idsz0, &idsz1, data, +- format, title, &tspace, &rownumbers, +- strlen(filename), strlen(format), strlen(title)); ++ format, title, &tspace, &rownumbers, &filenamelen, ++ &formatlen, &titlelen); + break; + + case NCL_double: + NGCALLF(writematrixd, WRITEMATRIXD)(filename, &idsz0, &idsz1, data, +- format, title, &tspace, &rownumbers, +- strlen(filename), strlen(format), strlen(title)); ++ format, title, &tspace, &rownumbers, &filenamelen, ++ &formatlen, &titlelen); + break; + + default: +diff -uprN ncl-6.6.2.bak/ni/src/lib/nfpfort/writematrix.f ncl-6.6.2/ni/src/lib/nfpfort/writematrix.f +--- ncl-6.6.2.bak/ni/src/lib/nfpfort/writematrix.f 2019-02-28 07:44:39.000000000 +0800 ++++ ncl-6.6.2/ni/src/lib/nfpfort/writematrix.f 2025-09-01 17:13:02.613837686 +0800 +@@ -1,11 +1,15 @@ + C NCLFORTSTART + +- subroutine writematrixi(fname,nrow,ncol,x,fmtx,title,titsp,iopt) ++ subroutine writematrixi(fname,nrow,ncol,x,fmtx,title, ++ &titsp,iopt,len_fname, len_fmtx, len_title) ++ USE ISO_C_BINDING + implicit none + + C NCL procedure: writematrixi(fname, x, fmtx, title, titsp, iopt) +- +- character*(*) title, fname, fmtx ++ integer(c_int),intent(in) :: len_fname, len_fmtx, len_title ++ CHARACTER(KIND=C_CHAR,LEN=len_title):: title ++ CHARACTER(KIND=C_CHAR,LEN=len_fname):: fname ++ CHARACTER(KIND=C_CHAR,LEN=len_fmtx):: fmtx + integer ncol,nrow,iopt,titsp + integer x(ncol,nrow) + +@@ -70,24 +74,26 @@ c write to standard out + + C NCLFORTSTART + +- subroutine writematrixf(fname,nrow,ncol,x,fmtx,title,titsp,iopt) ++ subroutine writematrixf(fname,nrow,ncol,x,fmtx,title, ++ &titsp,iopt,len_fname, len_fmtx, len_title) ++ USE ISO_C_BINDING + implicit none + +-C NCL procedure: writematrixf(fname, x, fmtx, title, titsp, iopt) +- +- character*(*) title, fname, fmtx +- ++C NCL procedure: writematrixi(fname, x, fmtx, title, titsp, iopt) ++ integer(c_int),intent(in) :: len_fname, len_fmtx, len_title ++ CHARACTER(KIND=C_CHAR,LEN=len_title) :: title ++ CHARACTER(KIND=C_CHAR,LEN=len_fname) :: fname ++ CHARACTER(KIND=C_CHAR,LEN=len_fmtx) :: fmtx + integer titsp + character*2 titspc + + integer ncol,nrow,iopt + real x(ncol,nrow) +- ++ + C NCLEND + + integer nr, nc + character*96 newfmt, titfmt +- + if (titsp.gt.0) then + write(titspc,"(i2)") titsp + titfmt = "(" // titspc // "x, a)" +@@ -145,12 +151,16 @@ c write to standard out + + C NCLFORTSTART + +- subroutine writematrixd(fname,nrow,ncol,x,fmtx,title,titsp,iopt) ++ subroutine writematrixd(fname,nrow,ncol,x,fmtx,title, ++ &titsp,iopt,len_fname, len_fmtx, len_title) ++ USE ISO_C_BINDING + implicit none + +-C NCL procedure: writematrixd(fname, x, fmtx, title, titsp, iopt) +- +- character*(*) title, fname, fmtx ++C NCL procedure: writematrixi(fname, x, fmtx, title, titsp, iopt) ++ integer(c_int),intent(in) :: len_fname, len_fmtx, len_title ++ CHARACTER(KIND=C_CHAR,LEN=len_title) :: title ++ CHARACTER(KIND=C_CHAR,LEN=len_fname) :: fname ++ CHARACTER(KIND=C_CHAR,LEN=len_fmtx) :: fmtx + character*2 titspc + integer ncol,nrow,iopt,titsp + double precision x(ncol,nrow) +@@ -158,7 +168,6 @@ C NCL procedure: writematrixd(fname, x, + C NCLEND + integer nr, nc + character*96 newfmt, titfmt +- + if (titsp.gt.0) then + write(titspc,"(i2)") titsp + titfmt = "(" // titspc // "x, a)" +@@ -214,12 +223,16 @@ c write to standard out + end + + C NCLFORTSTART +- subroutine writematrixb(fname,nrow,ncol,x,fmtx,title,titsp,iopt) ++ subroutine writematrixb(fname,nrow,ncol,x,fmtx,title, ++ &titsp,iopt,len_fname, len_fmtx, len_title) ++ USE ISO_C_BINDING + implicit none + +-C NCL procedure: writematrixb(fname, x, fmtx, title, titsp, iopt) +- +- character*(*) title, fname, fmtx ++C NCL procedure: writematrixi(fname, x, fmtx, title, titsp, iopt) ++ integer(c_int),intent(in) :: len_fname, len_fmtx, len_title ++ CHARACTER(KIND=C_CHAR,LEN=len_title) :: title ++ CHARACTER(KIND=C_CHAR,LEN=len_fname) :: fname ++ CHARACTER(KIND=C_CHAR,LEN=len_fmtx) :: fmtx + integer ncol,nrow,iopt,titsp + integer*1 x(ncol,nrow) + +@@ -234,7 +247,6 @@ c -------------------------------------- + integer nr, nc + character*96 newfmt, titfmt + character*2 titspc +- + if (titsp.gt.0) then + write(titspc,"(i2)") titsp + titfmt = "(" // titspc // "x, a)" +@@ -290,12 +302,16 @@ c write to standard out + + C NCLFORTSTART + +- subroutine writematrixs(fname,nrow,ncol,x,fmtx,title,titsp,iopt) ++ subroutine writematrixs(fname,nrow,ncol,x,fmtx,title, ++ &titsp,iopt,len_fname, len_fmtx, len_title) ++ USE ISO_C_BINDING + implicit none + + C NCL procedure: writematrixi(fname, x, fmtx, title, titsp, iopt) +- +- character*(*) title, fname, fmtx ++ integer(c_int),intent(in) :: len_fname, len_fmtx, len_title ++ CHARACTER(KIND=C_CHAR,LEN=len_title) :: title ++ CHARACTER(KIND=C_CHAR,LEN=len_fname) :: fname ++ CHARACTER(KIND=C_CHAR,LEN=len_fmtx) :: fmtx + integer ncol,nrow,iopt,titsp + integer*2 x(ncol,nrow) + +@@ -310,7 +326,6 @@ c -------------------------------------- + integer nr, nc + character*96 newfmt, titfmt + character*2 titspc +- + if (titsp.gt.0) then + write(titspc,"(i2)") titsp + titfmt = "(" // titspc // "x, a)" -- Gitee From fb9058a00a435d1c0a1dd612b90be9f4eea3cb96 Mon Sep 17 00:00:00 2001 From: jsfhd <2162443403@qq.com> Date: Tue, 2 Sep 2025 14:44:29 +0800 Subject: [PATCH 2/2] add ncl-6.6.2-gcc template --- templates/ncl/6.6.2/data.ncl-gcc.arm.cpu.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/ncl/6.6.2/data.ncl-gcc.arm.cpu.config b/templates/ncl/6.6.2/data.ncl-gcc.arm.cpu.config index e4ce17a0..098e9b09 100644 --- a/templates/ncl/6.6.2/data.ncl-gcc.arm.cpu.config +++ b/templates/ncl/6.6.2/data.ncl-gcc.arm.cpu.config @@ -67,6 +67,7 @@ module purge module use software/utils/hpckit/25.1.RC1/HPCKit/latest/modulefiles module add gcc/compiler12.3.1/gccmodule gcc/hmpi25.1.RC1/release export GCC_PATH=${JARVIS_UTILS}/hpckit/25.1.RC1/HPCKit/25.1.RC1/compiler/gcc +export LD_LIBRARY_PATH=$GCC_PATH/lib64_public:$LD_LIBRARY_PATH module use ${JARVIS_ROOT}/software/moduledeps/gcc12.3.1-hmpi25.1.RC1 module add hdf5/1.10.1 netcdf/4.7.4 export HDF5=${HDF5_PATH} @@ -95,7 +96,6 @@ export NCARG_DATABASE=${JARVIS_UTILS}/ncl/6.6.2/gcc/lib/ncarg/database export NCARG_LIB=${JARVIS_UTILS}/ncl/6.6.2/gcc/lib export NCARG_NCARG=${JARVIS_UTILS}/ncl/6.6.2/gcc/lib/ncarg - [APP] app_name = NCL build_dir = ${JARVIS_TMP} -- Gitee