vpath build fails

Open
#1,862 8 comments 0 reactions 1 assignee View on GitHub

@edwardhartnett is already working on this.

Since May 12, 2021.

Assessment

This issue has not been assessed yet.

Description

I am attempting to build PIO 2.5.3 on Linux with the Intel 17 compilers using MVAPICH2-2.2. I cloned the github repository, checked out the 2.5.3 tag, and ran autoconf -i. I am attempting a vpath (out of source) build using the configure script. here is a (severely) slimmed down version of the configure command I'm using:

../../pio/configure CC=mpicc FC=mpifort --enable-fortran --disable-shared --enable-netcdf-integration

the configure completes so I execute make and it errors here:

libtool: compile:  mpifort -DHAVE_CONFIG_H -I. -I../../../../pio/tests/unit -I../.. -I../../../../pio/src/flib -I/projects/dmcs_1/sw/packages/intel-17.0.4/mvapich2-2.2/netcdf/4.7.4/include -I/projects/dmcs_1/sw/packages/intel-17.0.4/mvapich2-2.2/phdf5/1.10.6/include -I/projects/dmcs_1/sw/packages/intel-17.0.4/mvapich2-2.2/pnetcdf/1.12.2/include -O3 -c ../../../../pio/tests/unit/global_vars.F90 -o global_vars.o
../../../../pio/tests/unit/global_vars.F90(9): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [PIO]
  use pio
------^
../../../../pio/tests/unit/global_vars.F90(15): error #6592: This symbol must be a defined parameter, an enumerator, or an argument of an inquiry function that evaluates to a compile-time constant.   [PIO_MAX_NAME]
  integer, parameter :: str_len = pio_max_name, ntest=4
----------------------------------^
../../../../pio/tests/unit/global_vars.F90(27): error #6457: This derived type name has not been declared.   [IOSYSTEM_DESC_T]
  type(iosystem_desc_t), save :: pio_iosystem
-------^
../../../../pio/tests/unit/global_vars.F90(28): error #6457: This derived type name has not been declared.   [FILE_DESC_T]
  type(file_desc_t), save     :: pio_file
-------^
../../../../pio/tests/unit/global_vars.F90(36): error #6592: This symbol must be a defined parameter, an enumerator, or an argument of an inquiry function that evaluates to a compile-time constant.   [PIO_IOTYPE_NETCDF]
  integer, dimension(ntest) :: iotypes =  (/ PIO_iotype_netcdf,         &
---------------------------------------------^
../../../../pio/tests/unit/global_vars.F90(36): error #6973: This is not a valid initialization expression.
  integer, dimension(ntest) :: iotypes =  (/ PIO_iotype_netcdf,         &
---------------------------------------------^
../../../../pio/tests/unit/global_vars.F90(15): error #6404: This name does not have a type, and must have an explicit type.   [PIO_MAX_NAME]
  integer, parameter :: str_len = pio_max_name, ntest=4
----------------------------------^
../../../../pio/tests/unit/global_vars.F90(36): error #6404: This name does not have a type, and must have an explicit type.   [PIO_IOTYPE_NETCDF]
  integer, dimension(ntest) :: iotypes =  (/ PIO_iotype_netcdf,         &
---------------------------------------------^
../../../../pio/tests/unit/global_vars.F90(51): error #6404: This name does not have a type, and must have an explicit type.   [PIO_IOTYPE_NETCDF4P]
           (iotype.eq.PIO_iotype_netcdf4p) .or. &
----------------------^
../../../../pio/tests/unit/global_vars.F90(52): error #6404: This name does not have a type, and must have an explicit type.   [PIO_IOTYPE_NETCDF4C]
           (iotype.eq.PIO_iotype_netcdf4c) .or. &
----------------------^
../../../../pio/tests/unit/global_vars.F90(53): error #6404: This name does not have a type, and must have an explicit type.   [PIO_IOTYPE_PNETCDF]
           (iotype.eq.PIO_iotype_pnetcdf)
----------------------^
compilation aborted for ../../../../pio/tests/unit/global_vars.F90 (code 1)
gmake[3]: *** [global_vars.lo] Error 1
gmake[3]: Leaving directory `/projectsp/dmcs_1/src/vbuilds-pio/2.5.3-intel17mvapich2/tests/unit'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/projectsp/dmcs_1/src/vbuilds-pio/2.5.3-intel17mvapich2/tests'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/projectsp/dmcs_1/src/vbuilds-pio/2.5.3-intel17mvapich2'
gmake: *** [all] Error 2

The issue is that the compiled pio.mod file is at ../../src/flib (inside the build directory) not ../../../../pio/src/flib (inside the source directory). The compile line should have an include for src/flib in the build directory.

I'm not yet sure if the includes need to be corrected or if an extra include needs to be added. I will let you know if I gather any more details. For now I will try cmake or an in-source build and see if that goes more smoothly.

Interestingly, the 2.5.3 gzipped tarball downloaded from github actually has compiled .mod files in the source code so the error changes to error #7013: This module file was not generated by any release of this compiler.

Dominant language
C
Stars
160
Forks
60
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NCAR/ParallelIO

All issues in NCAR/ParallelIO

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.