Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when compiling with intel #108

Closed
XinlongSBU opened this issue Oct 17, 2019 · 6 comments
Closed

error when compiling with intel #108

XinlongSBU opened this issue Oct 17, 2019 · 6 comments

Comments

@XinlongSBU
Copy link
Contributor

XinlongSBU commented Oct 17, 2019

When I use COMP = intel. An error occurs:

ifort: remark #10397: optimization reports are generated in *.optrpt files in the output location
extern.F90(165): error #6576: If a namelist-group-name has the PUBLIC attribute, no item in the namelist-group-object-list may have the PRIVATE attribute.   [VELPERT_AMPLITUDE]
  namelist /probin/ velpert_amplitude
--------------------^
extern.F90(166): error #6576: If a namelist-group-name has the PUBLIC attribute, no item in the namelist-group-object-list may have the PRIVATE attribute.   [VELPERT_RADIUS]
  namelist /probin/ velpert_radius
--------------------^
extern.F90(167): error #6576: If a namelist-group-name has the PUBLIC attribute, no item in the namelist-group-object-list may have the PRIVATE attribute.   [VELPERT_SCALE]
  namelist /probin/ velpert_scale
--------------------^
extern.F90(168): error #6576: If a namelist-group-name has the PUBLIC attribute, no item in the namelist-group-object-list may have the PRIVATE attribute.   [VELPERT_STEEP]
  namelist /probin/ velpert_steep
--------------------^
extern.F90(169): error #6576: If a namelist-group-name has the PUBLIC attribute, no item in the namelist-group-object-list may have the PRIVATE attribute.   [TAG_DENSITY_1]
  namelist /probin/ tag_density_1
--------------------^
extern.F90(170): error #6576: If a namelist-group-name has the PUBLIC attribute, no item in the namelist-group-object-list may have the PRIVATE attribute.   [TAG_DENSITY_2]
  namelist /probin/ tag_density_2
--------------------^
extern.F90(171): error #6576: If a namelist-group-name has the PUBLIC attribute, no item in the namelist-group-object-list may have the PRIVATE attribute.   [TAG_DENSITY_3]
  namelist /probin/ tag_density_3
--------------------^
extern.F90(172): error #6576: If a namelist-group-name has the PUBLIC attribute, no item in the namelist-group-object-list may have the PRIVATE attribute.   [PARTICLE_TEMP_CUTOFF]
  namelist /probin/ particle_temp_cutoff

.......
@zingale @dwillcox @harpolea

@XinlongSBU
Copy link
Contributor Author

xinlong@cori01:~> module avail intel
------------------------------------------------------------- /opt/modulefiles --------------------------------------------------------------
intel/18.0.1.163          intel/18.0.3.222          intel/19.0.3.199(default)
----------------------------------------------------- /usr/common/software/modulefiles ------------------------------------------------------
intel/16.0.3.210 intel/17.0.1.132 intel/17.0.2.174 intel/19.0.0.117

xinlong@cori01:~> module list intel
Currently Loaded Modulefiles:
  1) modules/3.2.11.1                                 13) ugni/6.0.14.0-7.0.0.1_7.35__ge78e5b0.ari
  2) nsg/1.2.0                                        14) pmi/5.0.14
  3) altd/2.0                                         15) dmapp/7.1.1-7.0.0.1_5.29__g25e5077.ari
  4) darshan/3.1.7                                    16) gni-headers/5.0.12.0-7.0.0.1_7.46__g3b1768f.ari
  5) intel/19.0.3.199                                 17) xpmem/2.2.17-7.0.0.1_3.28__g7acee3a.ari
  6) craype-haswell                                   18) job/2.2.4-7.0.0.1_3.36__g36b56f4.ari
  7) craype-hugepages2M                               19) dvs/2.11_2.2.140-7.0.0.1_13.5__gdf9ebba2
  8) craype-network-aries                             20) alps/6.6.50-7.0.0.1_3.44__g962f7108.ari
  9) craype/2.5.18                                    21) rca/2.2.20-7.0.0.1_4.42__g8e3fb5b.ari
 10) cray-mpich/7.7.6                                 22) atp/2.1.3
 11) cray-libsci/19.02.1                              23) PrgEnv-intel/6.0.5
 12) udreg/2.3.2-7.0.0.1_4.31__g8175d3d.ari

@XinlongSBU
Copy link
Contributor Author

the GNUmakefile for wdconvect:

DEBUG      = FALSE
DIM        = 3
COMP       = intel
USE_MPI    = TRUE
USE_OMP    = TRUE
USE_REACT  = TRUE

TINY_PROFILE = FALSE
PROFILE      = FALSE # TRUE overrides TINY_PROFILE


# define the location of the MAESTROEX home directory
MAESTROEX_HOME  := ../../..

# if not already defined, point to Microphysics
MICROPHYSICS_HOME ?= ../../../../Microphysics

# Set the EOS, conductivity, and network directories
# We first check if these exist in $(MAESTROEX_HOME)/Microphysics/(EOS/conductivity/networks)
# If not we use the version in $(MICROPHYSICS_HOME)/Microphysics/(EOS/conductivity/networks)
EOS_DIR          := helmholtz
CONDUCTIVITY_DIR := stellar
NETWORK_DIR      := ECSN
#INTEGRATOR_DIR   := VODE90

Bpack   := ./Make.package
Blocs   := .
PROBIN_PARAMETER_DIRS := .

include $(MAESTROEX_HOME)/Exec/Make.Maestro

@ajnonaka
Copy link
Contributor

It compiles with intel/18.0.3.222

I'll file a report with NERSC.

@ajnonaka
Copy link
Contributor

ajnonaka commented Jan 8, 2020

Response #1 (of 2) from NERSC today:

Brian Friesen
Additional comments•2020-01-08 10:52:34
Hi Andy,

thanks for the report. I made a much simpler reproducer which results in the same compiler response:

----------8<----------8<----------8<----------8<----------8<----------8<----------8<----------8<
friesen@cori07:namelist> cat test.f90
module mymod
implicit none
private
integer, save, public :: myint = 5
end module mymod

module mymod2
use mymod
implicit none
namelist /probin/ myint
private
public :: probin
end module mymod2

program main
use mymod2
implicit none
print *, 'Hello, world'
end program main
friesen@cori07:namelist> ftn -V
Intel(R) Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.0.3.199 Build 20190206
Copyright (C) 1985-2019 Intel Corporation. All rights reserved.

friesen@cori07:namelist> ftn test.f90
test.f90(10): error #6576: If a namelist-group-name has the PUBLIC attribute, no item in the namelist-group-object-list may have the PRIVATE attribute. [MYINT]
namelist /probin/ myint
--------------------^
compilation aborted for test.f90 (code 1)
friesen@cori07:namelist> module swap intel{,/18.0.3.222}
friesen@cori07:namelist> ftn -V
Intel(R) Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 18.0.3.222 Build 20180410
Copyright (C) 1985-2018 Intel Corporation. All rights reserved.

friesen@cori07:namelist> ftn test.f90
friesen@cori07:namelist>
----------8<----------8<----------8<----------8<----------8<----------8<----------8<----------8<

I'll look through the Fortran standard to find out if this is a bug in the code or in the compiler. The rules about order of precedence of public/private attributes can get kind of hairy.

@ajnonaka
Copy link
Contributor

ajnonaka commented Jan 8, 2020

Response #2 (of 2) from NERSC today:

Brian Friesen
Additional comments•2020-01-08 11:04:38
It does look to me like this is a compiler bug. mymod sets a default accessibility of private, but explicitly makes myint public. So it is a public entity in a public namespace; I don't see how it could be private. Also the Cray compiler (usually a stickler for rules) does not complain about this code.

I'll report this to Intel. In the mean time, since you probably don't want to avoid using the default compiler on Cori, a workaround is to remove the PRIVATE default accessibility specifier in mymod2 in my small example, which corresponds to the runtime_init_module module in MAESTROeX. Since the default accessibility of module entities is PUBLIC, removing the PRIVATE default statement means you'll need to explicitly state the accessibility of every private entity in runtime_init_module.

Could you try that and let me know if it works?

@ajnonaka
Copy link
Contributor

ajnonaka commented Jan 8, 2020

Update: in MAESTROeX/Source/param/runtime.probin.template if I remove all instances of the word private, the code will now compile on NERSC with the default intel/19.0.3.199

So now there's a workaround and a bug report has been filed with Intel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants