Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

(Resolved) Invalid character in name when compiling init_atmosphere core

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

bakamotokatas

New member
Hello, I am using Manjaro 20.2.1 with gcc and gfortran version 10.2. I compiled MPAS atmosphere core successfully. But while I am compiling init_atmosphere, I am getting following error.

Code:
mpif90 -D_MPI -DUSE_PIO2 -DCORE_INIT_ATMOSPHERE -DMPAS_NAMELIST_SUFFIX=init_atmosphere -DMPAS_EXE_NAME=init_atmosphere_model -DMPAS_NATIVE_TIMERS -DMPAS_GIT_VERSION=unknown -O3 -m64 -ffree-line-length-none -fconvert=big-endian -ffree-form -fdefault-real-8 -fdefault-double-8 -c mpas_init_atm_hinterp.F -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I./inc -I../framework -I../operators  -I../external/esmf_time_f90
rm -f mpas_atmphys_utilities.o mpas_atmphys_utilities.mod
mpif90 -D_MPI -DUSE_PIO2 -DCORE_INIT_ATMOSPHERE -DMPAS_NAMELIST_SUFFIX=init_atmosphere -DMPAS_EXE_NAME=init_atmosphere_model -DMPAS_NATIVE_TIMERS -DMPAS_GIT_VERSION=unknown -O3 -m64 -ffree-line-length-none -fconvert=big-endian -ffree-form -fdefault-real-8 -fdefault-double-8 -c mpas_atmphys_utilities.F -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I./inc -I../framework -I../operators  -I../external/esmf_time_f90
mpas_atmphys_utilities.F:1:2:

    1 | ../core_atmosphere/physics/mpas_atmphys_utilities.F
      |  1
Error: Invalid character in name at (1)
make[3]: *** [Makefile:101: mpas_atmphys_utilities.o] Error 1
make[3]: Leaving directory '/mnt/datadisk/DATAdisk/Build_WRF/MPAS-Model-7.1_init_atmosphere/src/core_init_atmosphere'
make[2]: *** [Makefile:41: dycore] Error 2
make[2]: Leaving directory '/mnt/datadisk/DATAdisk/Build_WRF/MPAS-Model-7.1_init_atmosphere/src'
make[1]: *** [Makefile:780: mpas_main] Error 2
make[1]: Leaving directory '/mnt/datadisk/DATAdisk/Build_WRF/MPAS-Model-7.1_init_atmosphere'
make: *** [Makefile:214: gfortran] Error 2
make exited with status code 2

I attached to compile log to the attachment.

Waiting for the help, thanks for the answers.
 

Attachments

  • compile.log
    47.8 KB · Views: 57
Just to make sure, before compiling the init_atmosphere core and after compiling the atmosphere core did you run `make clean CORE=init_atmosphere`?
 
Thanks for giving that a try.

The mpas_atmphys_utilites.F file in the core_init_atmosphere directory is symbolicly linked to the mpas_atmphys_utilties.F file in the core_atmosphere directory. A few questions as a result of that:

1. Have you altered the directory structure of MPAS in any way? (i.e. have you moved or removed the core_atmosphere or the init_atmosphere directors?)

2. Is this a clean MPAS 7.0 clone? i.e. have you altered the MPAS 7.0 code in anyway? Including the Makefile?

3. Which shell and version of make (make --version) are you currently using?
 
Many thanks.

1. No, I just downloaded the MPAS Model, unzipped and ran these codes one by one.
Code:
make gfortran CORE=atmosphere USE_PIO2=true
make clean CORE=init_atmosphere USE_PIO2=true
make gfortran CORE=init_atmosphere USE_PIO2=true

2. No. Due to clean MPAS 7.0 clone give me the error below due to gfortran 10.1+, as mentioned in the link, I used hotfix-v7.1 branch.
Code:
  module_ra_cam_support.F:11:35:

     11 |       integer, parameter:: bigint = O'17777777777'           ! largest possible 32-bit integer
        |                                   1
  Error: BOZ literal constant at (1) is neither a data-stmt-constant nor an actual argument to INT, REAL, DBLE, or CMPLX intrinsic function [see ‘-fno-allow-invalid-boz’]

3. I am using GNU Make 4.3 and I am using the Bash shell.

Also, I am using NETCDF-Fortran 4.5.3, NETCDF 4.7.4, PIO 2.5.2, PNETCDF 1.12.1, Openmpi 4.0.5 versions.
 
As mcurry mentioned, the mpas_atmphys_utilities.F file should be a symbolic link, and from the error message you're seeing, it sounds like something about this link may have been corrupted. Can you try listing the src/core_init_atmosphere directory (from within the top-level MPAS-Model repository) and confirming you see something like the following?
Code:
>ls src/core_init_atmosphere
total 672
-rw-r--r-- 1 duda mmm    170 Jan 26 14:53 build_options.mk
drwxr-xr-x 2 duda mmm    240 Jan 26 14:53 inc
-rw-r--r-- 1 duda mmm   3037 Jan 28 13:15 Makefile
-rw-r--r-- 1 duda mmm  31722 Jan 26 14:53 mpas_atm_advection.F
lrwxrwxrwx 1 duda mmm     51 Jan 26 14:53 mpas_atmphys_constants.F -> ../core_atmosphere/physics/mpas_atmphys_constants.F
lrwxrwxrwx 1 duda mmm     51 Jan 26 14:53 mpas_atmphys_date_time.F -> ../core_atmosphere/physics/mpas_atmphys_date_time.F
lrwxrwxrwx 1 duda mmm     51 Jan 26 14:53 mpas_atmphys_functions.F -> ../core_atmosphere/physics/mpas_atmphys_functions.F
lrwxrwxrwx 1 duda mmm     57 Jan 26 14:53 mpas_atmphys_initialize_real.F -> ../core_atmosphere/physics/mpas_atmphys_initialize_real.F
lrwxrwxrwx 1 duda mmm     51 Jan 26 14:53 mpas_atmphys_utilities.F -> ../core_atmosphere/physics/mpas_atmphys_utilities.F
-rw-r--r-- 1 duda mmm   6486 Jan 26 14:53 mpas_init_atm_bitarray.F
-rw-r--r-- 1 duda mmm 261141 Jan 28 13:15 mpas_init_atm_cases.F
-rw-r--r-- 1 duda mmm   4200 Jan 26 14:53 mpas_init_atm_core.F
-rw-r--r-- 1 duda mmm  16132 Jan 28 13:15 mpas_init_atm_core_interface.F
-rw-r--r-- 1 duda mmm  37421 Jan 28 13:15 mpas_init_atm_gwd.F
-rw-r--r-- 1 duda mmm  43967 Jan 26 14:53 mpas_init_atm_hinterp.F
-rw-r--r-- 1 duda mmm  79809 Jan 26 14:53 mpas_init_atm_llxy.F
-rw-r--r-- 1 duda mmm   6639 Jan 26 14:53 mpas_init_atm_queue.F
-rw-r--r-- 1 duda mmm  17656 Jan 26 14:53 mpas_init_atm_read_met.F
-rw-r--r-- 1 duda mmm  55895 Jan 28 13:15 mpas_init_atm_static.F
-rw-r--r-- 1 duda mmm  15954 Jan 26 14:53 mpas_init_atm_surface.F
-rw-r--r-- 1 duda mmm   3303 Jan 26 14:53 mpas_init_atm_vinterp.F
-rw-r--r-- 1 duda mmm   4553 Jan 28 13:15 read_geogrid.c
-rw-r--r-- 1 duda mmm  67447 Jan 28 13:15 Registry.xml
 
Hello, I ran, but it didn't show me any symlink in the folder. But your symlink files shown in a different colour.

Code:
[bakamotokatas@bakamotokatas MPAS-Model-hotfix-v7.1]$ ll src/core_init_atmosphere
total 1160
drwxr-xr-x  4 bakamotokatas bakamotokatas   4096 Jan 28 22:04 ./
drwxr-xr-x 14 bakamotokatas bakamotokatas   4096 Jan 28 22:04 ../
-rw-r--r--  1 bakamotokatas bakamotokatas 105905 Jan 28 22:04 atm_advection.mod
-rw-r--r--  1 bakamotokatas bakamotokatas    170 Nov 19 13:47 build_options.mk
drwxr-xr-x  2 bakamotokatas bakamotokatas   4096 Jan 28 22:04 default_inputs/
drwxr-xr-x  2 bakamotokatas bakamotokatas   4096 Jan 28 22:04 inc/
-rw-r--r--  1 bakamotokatas bakamotokatas   1463 Jan 28 22:04 init_atm_bitarray.mod
-rw-r--r--  1 bakamotokatas bakamotokatas  41421 Jan 28 22:04 init_atm_hinterp.mod
-rw-r--r--  1 bakamotokatas bakamotokatas  40867 Jan 28 22:04 init_atm_llxy.mod
-rw-r--r--  1 bakamotokatas bakamotokatas   2319 Jan 28 22:04 init_atm_queue.mod
-rw-r--r--  1 bakamotokatas bakamotokatas   1752 Jan 28 22:04 init_atm_read_met.mod
-rw-r--r--  1 bakamotokatas bakamotokatas   3037 Nov 19 13:47 Makefile
-rw-r--r--  1 bakamotokatas bakamotokatas  31722 Nov 19 13:47 mpas_atm_advection.F
-rw-r--r--  1 bakamotokatas bakamotokatas  43152 Jan 28 22:04 mpas_atm_advection.o
-rwxrwxrwx  1 bakamotokatas bakamotokatas     51 Nov 19 13:47 mpas_atmphys_constants.F*
-rwxrwxrwx  1 bakamotokatas bakamotokatas     51 Nov 19 13:47 mpas_atmphys_date_time.F*
-rwxrwxrwx  1 bakamotokatas bakamotokatas     51 Nov 19 13:47 mpas_atmphys_functions.F*
-rwxrwxrwx  1 bakamotokatas bakamotokatas     57 Nov 19 13:47 mpas_atmphys_initialize_real.F*
-rwxrwxrwx  1 bakamotokatas bakamotokatas     51 Nov 19 13:47 mpas_atmphys_utilities.F*
-rw-r--r--  1 bakamotokatas bakamotokatas   6486 Nov 19 13:47 mpas_init_atm_bitarray.F
-rw-r--r--  1 bakamotokatas bakamotokatas   6304 Jan 28 22:04 mpas_init_atm_bitarray.o
-rw-r--r--  1 bakamotokatas bakamotokatas 261141 Nov 19 13:47 mpas_init_atm_cases.F
-rw-r--r--  1 bakamotokatas bakamotokatas   4200 Nov 19 13:47 mpas_init_atm_core.F
-rw-r--r--  1 bakamotokatas bakamotokatas  16132 Nov 19 13:47 mpas_init_atm_core_interface.F
-rw-r--r--  1 bakamotokatas bakamotokatas  37421 Nov 19 13:47 mpas_init_atm_gwd.F
-rw-r--r--  1 bakamotokatas bakamotokatas  43967 Nov 19 13:47 mpas_init_atm_hinterp.F
-rw-r--r--  1 bakamotokatas bakamotokatas  31768 Jan 28 22:04 mpas_init_atm_hinterp.o
-rw-r--r--  1 bakamotokatas bakamotokatas  79809 Nov 19 13:47 mpas_init_atm_llxy.F
-rw-r--r--  1 bakamotokatas bakamotokatas  60528 Jan 28 22:04 mpas_init_atm_llxy.o
-rw-r--r--  1 bakamotokatas bakamotokatas   6639 Nov 19 13:47 mpas_init_atm_queue.F
-rw-r--r--  1 bakamotokatas bakamotokatas   6216 Jan 28 22:04 mpas_init_atm_queue.o
-rw-r--r--  1 bakamotokatas bakamotokatas  17656 Nov 19 13:47 mpas_init_atm_read_met.F
-rw-r--r--  1 bakamotokatas bakamotokatas  20824 Jan 28 22:04 mpas_init_atm_read_met.o
-rw-r--r--  1 bakamotokatas bakamotokatas  55895 Nov 19 13:47 mpas_init_atm_static.F
-rw-r--r--  1 bakamotokatas bakamotokatas  15954 Nov 19 13:47 mpas_init_atm_surface.F
-rw-r--r--  1 bakamotokatas bakamotokatas   3303 Nov 19 13:47 mpas_init_atm_vinterp.F
-rw-r--r--  1 bakamotokatas bakamotokatas   4553 Nov 19 13:47 read_geogrid.c
-rw-r--r--  1 bakamotokatas bakamotokatas   6944 Jan 28 22:04 read_geogrid.o
-rw-r--r--  1 bakamotokatas bakamotokatas  67458 Jan 28 22:04 Registry_processed.xml
-rw-r--r--  1 bakamotokatas bakamotokatas  67447 Nov 19 13:47 Registry.xml

Also when I look inside the file, with the code;
Code:
nano src/core_init_atmosphere/mpas_atmphys_utilities.F

it showed me just this line;
Code:
../core_atmosphere/physics/mpas_atmphys_utilities.F

Also, the uncompiled version showed as below. Also, there is any symlink in the folder and src/core_init_atmosphere/mpas_atmphys_utilities.F show same pattern.
Code:
[bakamotokatas@bakamotokatas MPAS-Model-hotfix-v7.1]$ ll src/core_init_atmosphere/
total 700
drwxr-xr-x  2 bakamotokatas bakamotokatas   4096 Nov 19 13:47 ./
drwxr-xr-x 14 bakamotokatas bakamotokatas   4096 Nov 19 13:47 ../
-rw-r--r--  1 bakamotokatas bakamotokatas    170 Nov 19 13:47 build_options.mk
-rw-r--r--  1 bakamotokatas bakamotokatas   3037 Nov 19 13:47 Makefile
-rw-r--r--  1 bakamotokatas bakamotokatas  31722 Nov 19 13:47 mpas_atm_advection.F
-rwxrwxrwx  1 bakamotokatas bakamotokatas     51 Nov 19 13:47 mpas_atmphys_constants.F*
-rwxrwxrwx  1 bakamotokatas bakamotokatas     51 Nov 19 13:47 mpas_atmphys_date_time.F*
-rwxrwxrwx  1 bakamotokatas bakamotokatas     51 Nov 19 13:47 mpas_atmphys_functions.F*
-rwxrwxrwx  1 bakamotokatas bakamotokatas     57 Nov 19 13:47 mpas_atmphys_initialize_real.F*
-rwxrwxrwx  1 bakamotokatas bakamotokatas     51 Nov 19 13:47 mpas_atmphys_utilities.F*
-rw-r--r--  1 bakamotokatas bakamotokatas   6486 Nov 19 13:47 mpas_init_atm_bitarray.F
-rw-r--r--  1 bakamotokatas bakamotokatas 261141 Nov 19 13:47 mpas_init_atm_cases.F
-rw-r--r--  1 bakamotokatas bakamotokatas   4200 Nov 19 13:47 mpas_init_atm_core.F
-rw-r--r--  1 bakamotokatas bakamotokatas  16132 Nov 19 13:47 mpas_init_atm_core_interface.F
-rw-r--r--  1 bakamotokatas bakamotokatas  37421 Nov 19 13:47 mpas_init_atm_gwd.F
-rw-r--r--  1 bakamotokatas bakamotokatas  43967 Nov 19 13:47 mpas_init_atm_hinterp.F
-rw-r--r--  1 bakamotokatas bakamotokatas  79809 Nov 19 13:47 mpas_init_atm_llxy.F
-rw-r--r--  1 bakamotokatas bakamotokatas   6639 Nov 19 13:47 mpas_init_atm_queue.F
-rw-r--r--  1 bakamotokatas bakamotokatas  17656 Nov 19 13:47 mpas_init_atm_read_met.F
-rw-r--r--  1 bakamotokatas bakamotokatas  55895 Nov 19 13:47 mpas_init_atm_static.F
-rw-r--r--  1 bakamotokatas bakamotokatas  15954 Nov 19 13:47 mpas_init_atm_surface.F
-rw-r--r--  1 bakamotokatas bakamotokatas   3303 Nov 19 13:47 mpas_init_atm_vinterp.F
-rw-r--r--  1 bakamotokatas bakamotokatas   4553 Nov 19 13:47 read_geogrid.c
-rw-r--r--  1 bakamotokatas bakamotokatas  67447 Nov 19 13:47 Registry.xml
 
It appears as though the symbolic links have been converted into regular files. I'm not sure whether this might be due to an issue on GitHub's side when creating the tar file or to an issue in unpacking the tar file. An alternative way to obtain the 'hotfix-v7.1' code would be to use the 'git' command-line tool. Could you see whether the following results in a copy of the code with symbolic links?
Code:
git clone https://github.com/MPAS-Dev/MPAS-Model.git
cd MPAS-Model
git checkout hotfix-v7.1
 
Thank you very much to you and mcury for your help.

Yes, by downloading with the git method, it showed symlink in the folder. I also tried compiling it and compiled it successfully.
 
Glad it work!

Interesting that the symbolic links did not work earlier. As a test I downloaded the zip file for the main MPAS-Model repository. After using the `unzip` command I noticed the following at the end of the decompression:

Code:
finishing deferred symbolic links:
  MPAS-Model-master/src/core_init_atmosphere/mpas_atmphys_constants.F -> ../core_atmosphere/physics/mpas_atmphys_constants.F
  MPAS-Model-master/src/core_init_atmosphere/mpas_atmphys_date_time.F -> ../core_atmosphere/physics/mpas_atmphys_date_time.F
  MPAS-Model-master/src/core_init_atmosphere/mpas_atmphys_functions.F -> ../core_atmosphere/physics/mpas_atmphys_functions.F
  MPAS-Model-master/src/core_init_atmosphere/mpas_atmphys_initialize_real.F -> ../core_atmosphere/physics/mpas_atmphys_initialize_real.F
  MPAS-Model-master/src/core_init_atmosphere/mpas_atmphys_utilities.F -> ../core_atmosphere/physics/mpas_atmphys_utilities.F
  MPAS-Model-master/testing_and_setup/compass/landice/EISMINT2/25000m/decomposition_test/config_setup_mesh_step.xml -> ../standard_experiments/config_setup_mesh_step.xml
  MPAS-Model-master/testing_and_setup/compass/ocean/isomip_plus/5km/Ocean1/config_adjust_ssh.xml -> ../Ocean0/config_adjust_ssh.xml
  MPAS-Model-master/testing_and_setup/compass/ocean/isomip_plus/5km/Ocean1/config_driver.xml -> ../Ocean0/config_driver.xml
  MPAS-Model-master/testing_and_setup/compass/ocean/isomip_plus/5km/Ocean1/config_forward.xml -> ../Ocean0/config_forward.xml
  MPAS-Model-master/testing_and_setup/compass/ocean/isomip_plus/5km/Ocean2/config_adjust_ssh.xml -> ../Ocean0/config_adjust_ssh.xml
  MPAS-Model-master/testing_and_setup/compass/ocean/isomip_plus/5km/Ocean2/config_driver.xml -> ../Ocean0/config_driver.xml
  MPAS-Model-master/testing_and_setup/compass/ocean/isomip_plus/5km/Ocean2/config_forward.xml -> ../Ocean0/config_forward.xml

I was then able to compile both the init_atmosphere and atmosphere model. Perhaps the tool that was used to unzip did not deffer the symbolic links correctly?
 
Yes, it seems there was a problem with the tool(Ark) I was using. When I just right-click and extract the archive here, there is no symlink. But, when I extracted the archive like you with unzip command, the symlinks were created without any problems :(.
 
Thanks for the response on the tool you were using. Looks like Ark uses Libzip and doesn't preserve symbolic links and it looks like a bug report for KDE has been submitted for it. Good to know, thanks again for the follow up!

Now that this post has been answered I will alter the title to help other users looking for a solution if they have a similar problem.
 
Top