Skip to content
New issue

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

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

Already on GitHub? # to your account

DP_main.f(340): error #8807: An OpenMP* directive may not appear in a PURE procedure. #6

Open
omsai opened this issue Jul 29, 2019 · 3 comments

Comments

@omsai
Copy link

omsai commented Jul 29, 2019

What version of the Intel compiler are you using?

If I use the Intel 2013 suite, it complains about not understanding MPI_Ibcast, presumably because it does not support MPI version 3:

mpiifort -xHost -ip -fpp -I/apps/intelics/2013.1.039/composer_xe_2013_sp1.0.080/mkl/include/intel64/lp64 -I/apps/intelics/2013.1.039/composer_xe_2013_sp1.0.080/mkl/include/fftw -static-intel\
 -lmpi -L /apps/intelics/2013.1.039/impi/4.1.1.036/intel64/lib -o a integ-Coul.o Coul0sim.o m2caux3-Coul.o abcpes-Coul.o ckplm-Coul.o util-Coul.o constants_m.o Matrix_math.o exec_time.o type\
s_EHT.o types_MM.o parameters.o MPI_defs.o OPT_parent.o parameters_MM.o allocation_m.o util.o EHT_input.o tuning.o IdentifyNonBonded.o babel_routines.o babel.o gmx2mdflex.o namd2mdflex.o str\
ucture.o md_read.o md_setup.o f_intra.o f_inter.o md_output.o pbc.o overlap_D.o Ehrenfest.o diabatic-Ehren.o HuckelForces.o STO.o multip_routines.o electron_hole_DP.o LCMO_Builder.o FMO.o DP\
_main.o td_dp.o DP_FMO.o dipole_phi.o Coulomb.o polarizability.o CoulInt_QMMM.o QCModel_Huckel.o QCModel_ElHl.o AlphaPolar.o data_output.o backup_MM.o Berendsen.o NoseHoover.o NoseHoover_Rev\
ersible.o NVE.o VDOS_m.o MM_dynamics.o MM_driver.o film_STO.o DOS_m.o oscillator.o ga_QCModel.o cost_tuning_EH.o cost_tuning_MM.o nonlinearCG.o CG_class.o MM_ERG_class.o nonlinear-sidekick.o\
 FF_OPT_class.o CG_EH_driver.o ga_routines.o CG_MM_driver.o vibes_driver.o solvated_M.o DOS_tool.o backup.o auto_correlation.o ElHl_schroedinger.o diagnostic.o qdynamics.o Chebyshev.o Taylor\
.o ElHl_Chebyshev_GPU.o ElHl_Chebyshev.o AO_adiabatic.o ElHl_adiabatic.o Chebyshev_driver.o eigen_driver.o ga_driver.o avrg_confgs.o main.o GPU_Interface.o Taylor_gpu.o   -lmkl_blas95_lp64 -\
lmkl_lapack95_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lrt
diabatic-Ehren.o: In function `diabaticehrenfest_builder_mp_diabatic_ehrenfest_':
diabatic-Ehren.f:(.text+0x1c3d): undefined reference to `mpi_ibcast_'
ElHl_Chebyshev.o: In function `elhl_chebyshev_m_mp_elhl_chebyshev_':
ElHl_Chebyshev.f:(.text+0x3ad7): undefined reference to `mpi_ibcast_'
ElHl_Chebyshev.f:(.text+0x3b0f): undefined reference to `mpi_ibcast_'
ElHl_Chebyshev.f:(.text+0x42f3): undefined reference to `mpi_ibcast_'
ElHl_Chebyshev.f:(.text+0x5f47): undefined reference to `mpi_ibcast_'
make: *** [a] Error 1

... but if I use Intel 2016 or 2017 I get this error:

mpiifort -xHost -ip -fpp -O2 -align -fopenmp -parallel -free  -I/apps2/intelics/2017/compilers_and_libraries_2017.0.098/linux/mkl/include/intel64/lp64 -I/apps2/intelics/2017/compilers_and_li\
braries_2017.0.098/linux/mkl/include/fftw  -c DP_main.f
DP_main.f(340): error #8807: An OpenMP* directive may not appear in a PURE procedure.
!$OMP parallel
------^
DP_main.f(341): error #8807: An OpenMP* directive may not appear in a PURE procedure.
!$OMP single
------^
DP_main.f(343): error #8807: An OpenMP* directive may not appear in a PURE procedure.
!$OMP task untied
------^
DP_main.f(349): error #8807: An OpenMP* directive may not appear in a PURE procedure.
!$OMP end task
------^
DP_main.f(351): error #8807: An OpenMP* directive may not appear in a PURE procedure.
!$OMP end single
------^
DP_main.f(352): error #8807: An OpenMP* directive may not appear in a PURE procedure.
!$OMP end parallel
------^
compilation aborted for DP_main.f (code 1)
make: *** [DP_main.o] Error 1

I don't edit your makefile but I override some of the variables from the command line like so:

    # Re-use the ifort flags defined in the makefile.                                                                                                                                          
    #                                                                                                                                                                                          
    # 1) Use Intel mpiifort instead of GNU mpif90.                                                                                                                                             
    # 2) For our older version of 2013 ifort, replace -qopenmp with -fopenmp.
    make \
        FC="mpiifort -xHost -ip -fpp" \
        FFLAGS2='-O2 -align -fopenmp -parallel $(FREE) $(SAFE)' \
        CFLAGS='-O2 -align -xHost -ip -fopenmp -fno-exceptions -restrict $(SAFE_CXX)' \
        LDFLAGS='-static-intel' # -lmpi -L /apps/intelics/2013.1.039/impi/4.1.1.036/intel64/lib'
@omsai
Copy link
Author

omsai commented Aug 2, 2019

@lgcrego if you are not using the Intel compiler, can you please advise which compiler versions you have tried using and know works so that I can help build your software for my university student user? Thank you!

@albertotrj
Copy link
Collaborator

Just remove the PURE keyword from the affected routine.

@omsai
Copy link
Author

omsai commented Aug 10, 2019

@albertotrj Thanks! That removing pure worked.

lgcrego pushed a commit that referenced this issue Dec 19, 2020
adapting dynamics routines to spin handling and output
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants