Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Issue with PIO build when porting CESM1.2.1

ebarr

Edouard Barrier
New Member
Hi,

I'm porting CESM 1.2.1 to a university machine and the build is failing at the pio build step. As a bit of background - I've create a test newcase with ./create_newcase -case test1 -res f45_g37 -compset X -mach userdefined, and then run ./cesm_setup. The OS is Linux, the compilers I'm using are gnu and the mpi library is openmpi. I'm using conda environments so the env_mach_specific script is short and just sets NETCDF_PATH to the conda directory. The only change to Macros is setting NETCDF_PATH, and the following packages are installed in the conda environment:
  • gcc, gxx and gfortran version 9.5.0
  • openmpi version 4.1.4
  • netcdf4 version 1.6.2, mpi_openmpi build
  • netcdf-fortran version 4.6.0, mpi_openmpi build
When I run ./test1.build, the mct and gptl libraries build successfully but buildlib.pio fails. In the pio.bldlog (attached here), the error is when the iompi_mod.F90 file is compiled, calling a "x argument of c_sizeof intrinsic at (1) must be an interoperable data entity: Type shall have a character length of 1" error on line 273. I'll admit - my fortran isn't good enough to fix this especially as there's a near-identical section of code earlier in the file which doesn't cause an error, but I suspect it's the fault of clashing compilers or maybe the pio files themselves (I've taken them from a different PIO source as per Issues with PIO Makefile in porting CESM1.2.1). My Macros file is also a bit bare bones which, although adding MPI_PATH or similar variables to it changes nothing.

Sorry for the wall of text - any help would be greatly appreciated!
 

Attachments

  • pio.bldlog.230123-184015.txt
    21.6 KB · Views: 5
  • Macros.txt
    934 bytes · Views: 1
  • iompi_mod.F90.txt
    13.8 KB · Views: 1
  • env_mach_specific.txt
    554 bytes · Views: 2
  • env_run.pdf
    27.5 KB · Views: 1
  • env_mach_pes.pdf
    17.3 KB · Views: 1
  • env_build.pdf
    19.2 KB · Views: 2
  • condalist.txt
    5.3 KB · Views: 1

jedwards

CSEG and Liaisons
Staff member
The cesm model doesn't use the mpiio functions of the pio library, you can just comment that line out.
 

lzm

luozhaoming
New Member
你好

我正在将 CESM 1.2.1 移植到大学机器上,但构建在 pio 构建步骤失败。作为一点背景 - 我已经创建了一个带有 .//create_newcase -case test1 -res f45_g37 -compset X -mach userdefined 的测试新用例,然后运行 ./cesm_setup。操作系统是Linux,我使用的编译器是gnu,mpi库是openmpi。我使用的是 conda 环境,因此env_mach_specific脚本很短,只是将NETCDF_PATH设置为 conda 目录。对宏的唯一更改是设置NETCDF_PATH,并且在 conda 环境中安装了以下软件包:
  • GCC、GXX 和 GFORTRAN 版本 9.5.0
  • OpenMPI 版本 4.1.4
  • NetCDF4 版本 1.6.2,mpi_openmpi内部版本
  • NetCDF-Fortran版本4.6.0,mpi_openmpi内部版本
当我运行 ./test1.build 时,mct 和 gptl 库构建成功,但 buildlib.pio 失败。在 pio.bldlog 中(附在此处),错误是当iompi_mod时。编译 F90 文件,调用“(1) 处c_sizeof固有的 x 参数必须是可互操作的数据实体:类型 的字符长度应为 1”,错误在第 273 行。我承认 - 我的 fortran 不足以解决这个问题,特别是因为文件中前面有一个几乎相同的代码部分不会导致错误,但我怀疑这是编译器冲突的错误,或者可能是 pio 文件本身(我已经根据移植 CESM1.2.1 中的 PIO Makefile 问题从不同的 PIO 源获取它们)。我的宏文件也有点裸露,尽管向其添加MPI_PATH或类似的变量没有任何变化。

对不起,文字墙 - 任何帮助将不胜感激!
请你解决,我也遇到过这个问题,怎么解决
 
Top