compile HYCOM with MPI

129 views
Skip to first unread message

覃悦

unread,
Jun 17, 2024, 10:03:43 AMJun 17
to HYCOM.org Forum
Dear HYCOM community,
        I'm a beginner with HYCOM compilation. Right now I meet some problems: I want to compile with MPI, so I used 'setenv ARCH  intelGF-impi-sm-relo' and I didn't change others. But it seems like the compliation is not correct. Here are my csh and log files.
        Should I check my server or something? I would be appreaciate it if you can help me with this problem.

Make.log
Make.csh

Alan Wallcraft

unread,
Jun 17, 2024, 11:56:28 AMJun 17
to HYCOM.org Forum, 覃悦
You are using the Intel compiler, so edit hpe-impi-relo_mpi and replace mpiifort with mpif90 and mpiicc with icc (call the resulting file generic-intel-relo_mpi).

Then set ARCH to generic-intel-relo delete all .o and .mod files amd recompile.

Let me know if this works.  If it does I'll add generic-intel-relo_mpi to GitHub.

Alan.

覃悦

unread,
Jun 18, 2024, 9:44:06 PM (14 days ago) Jun 18
to HYCOM.org Forum, Alan Wallcraft, 覃悦
Dear Alan,
     Thanks a lot for your help. It WORKS! 
     Then I have another question as a beginner. If I want to build a model in a new subregion (e.g. East China Sea), what instruction I can follow? I have read GOM0.08 wiki. But I got stuck at the first step -  create a new grid and topo.
     Can you give me some advice? 

覃悦

unread,
Jun 18, 2024, 9:59:26 PM (14 days ago) Jun 18
to HYCOM.org Forum, 覃悦, Alan Wallcraft
More specifically, should I use regional.grid.csh in HYCOM-examples/GOMb0.08/topo to create grid or some fortran files in HYCOM-tools/topo?
If I use  regional.grid.csh what's the relations between jdm, reflat and pntlat?

覃悦

unread,
Jun 18, 2024, 10:11:12 PM (14 days ago) Jun 18
to HYCOM.org Forum, 覃悦, Alan Wallcraft
If I run regional.grid.csh, I met errors like this:
微信图片_20240619101019.png

Alan Wallcraft

unread,
Jun 20, 2024, 7:55:38 AM (13 days ago) Jun 20
to HYCOM.org Forum, 覃悦, Alan Wallcraft
Have you built HYCOM-tools?

In your case (Intel Fortran, ifort) ARCH is intelIF

If you have built HYCOM-tools what does HYCOM-tools/topo/src/Make_mercator.log say is wrong?

Alan.

覃悦

unread,
Jun 20, 2024, 9:23:21 AM (13 days ago) Jun 20
to HYCOM.org Forum, Alan Wallcraft, 覃悦
Thanks for your reply, Alan. I feel like I have successfully built HYCOM-tools (but to run Make_ncdf.csh, I met some trouble, maybe not urgent I think).
My Make_mercator.log seems fine, like this:
ifort             -traceback -xHost -O3 -fp-model precise -ftz -align array64byte -convert big_endian -assume byterecl -warn nogeneral -diag-disable 10212 -c grid_mercator.f
ifort -V -traceback -xHost -O3 -fp-model precise -ftz -align array64byte -convert big_endian -assume byterecl -warn nogeneral -diag-disable 10212 grid_mercator.o   zh.o mod_xc.o mod_za.o wtime.o spherdist.o rotang.o -o grid_mercator
Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0 Build 20150121
Copyright (C) 1985-2015 Intel Corporation.  All rights reserved.

GNU ld version 2.25.1-31.base.el7

but to run regional.grid.csh, it is wrong. The errors are the same as before:
[LS2022002@login1 HYCOM]$ csh regional.grid.csh
setenv DS /public/home/LS2022002/roms-modify/HYCOM/topo/
setenv TOOLS /public/home/LS2022002/romd-modify/HYCOM/HYCOM-tools
cd /public/home/LS2022002/roms-modify/HYCOM/topo//
touch fort.61
/bin/rm -f fort.61
cat
echo regional.grid.b
regional.grid.b
setenv FOR061 fort.61
setenv FOR061A fort.61A
/public/home/LS2022002/romd-modify/HYCOM/HYCOM-tools/topo/src/grid_mercator
/public/home/LS2022002/romd-modify/HYCOM/HYCOM-tools/topo/src/grid_mercator: Command not found.
mv fort.61 regional.grid.b
mv: cannot stat ‘fort.61’: No such file or directory
mv fort.61A regional.grid.a
mv: cannot stat ‘fort.61A’: No such file or directory
cat regional.grid.b
  263     'idm   ' = longitudinal array size
  193     'jdm   ' = latitudinal  array size

Alan Wallcraft

unread,
Jun 20, 2024, 10:10:01 AM (12 days ago) Jun 20
to HYCOM.org Forum, 覃悦, Alan Wallcraft
You should have:

COAPS 542> pwd
/home/awallcraft/HYCOM-tools/topo/src
COAPS 543> ll *_merc*
-rwxr-x--- 1 awallcraft awallcraft 77912 Sep  6  2023 grid_mercator*
-rw-r----- 1 awallcraft awallcraft 18828 Sep  6  2023 grid_mercator.f
-rw-r----- 1 awallcraft awallcraft 54616 Sep  6  2023 grid_mercator.o
-rw-r----- 1 awallcraft awallcraft   252 Sep  6  2023 Make_mercator.log

Since Make_mercator.log is OK.  Do you have the right directory? 

Note that TOOLS is /public/home/LS2022002/romd-modify/HYCOM/HYCOM-tools

Are you sure this isn't in romd-modify/HYCOM-tools?  Or somewhere else?

In general, when you get:

/path/command: Command not found

Confirm with

ls -l /path/command

and

ls -l /path

Often you will find that "path" is wrong.

Alan.

覃悦

unread,
Jun 20, 2024, 9:40:15 PM (12 days ago) Jun 20
to HYCOM.org Forum, Alan Wallcraft, 覃悦
Thanks a lot, Alan. But it seems like my path is not wrong. What else could go wrong?

[LS2022002@login1 ~]$ cd roms-modify/HYCOM/HYCOM-tools/topo/src
[LS2022002@login1 src]$ ll *_merc*
-rwxr-xr-x 1 LS2022002 users 1046088 Jun 20 20:56 grid_mercator
-rw-r--r-- 1 LS2022002 users   18828 Nov 10  2023 grid_mercator.f
-rw-r--r-- 1 LS2022002 users  104816 Jun 20 20:56 grid_mercator.o
-rw-r--r-- 1 LS2022002 users     618 Jun 20 20:56 Make_mercator.log

Alan Wallcraft

unread,
Jun 21, 2024, 8:11:14 AM (12 days ago) Jun 21
to HYCOM.org Forum, 覃悦, Alan Wallcraft
Try

ll /public/home/LS202200/roms-modify/HYCOM/HYCOM-tools/topo/src/grid_mercator

If that works, add it to your regional.grid.csh script:

ll ${TOOLS}/topo/src/grid_mercator

Add exactly the same path/command as in the script but with ll in front.

If that works, I have no idea what is wrong.

Alan.

Alan Wallcraft

unread,
Jun 21, 2024, 8:45:51 AM (12 days ago) Jun 21
to HYCOM.org Forum, Alan Wallcraft, 覃悦
Wrong TOOLS:

setenv TOOLS /public/home/LS2022002/romd-modify/HYCOM/HYCOM-tools

should be roms-modify

Alan.

覃悦

unread,
Jun 23, 2024, 6:57:03 AM (10 days ago) Jun 23
to HYCOM.org Forum, Alan Wallcraft, 覃悦
Thanks a lot Alan!
It worked. BTW, I want to ask what's the relations between jdm, reflat and pntlat?

覃悦

unread,
Jun 23, 2024, 9:43:34 PM (9 days ago) Jun 23
to HYCOM.org Forum, 覃悦, Alan Wallcraft
Thank you Alan, I have got the relations.
Don't bother.

Reply all
Reply to author
Forward
0 new messages