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

tech-gpu and v5.3 not compiling on LUMI with OpenMP-GPU enabled #180

Closed
nicspalla opened this issue Feb 4, 2025 · 4 comments
Closed

tech-gpu and v5.3 not compiling on LUMI with OpenMP-GPU enabled #180

nicspalla opened this issue Feb 4, 2025 · 4 comments
Assignees

Comments

@nicspalla
Copy link
Contributor

The branch tech-gpu is not anymore compilable on LUMI-G (with OpenMP-GPU enabled) after alignment with version 5.3:

ftn -E -ffree -D_HDF5_LIB -D_HDF5_IO -D_PAR_IO -D_MPI -D_FFTW -D_FFTW_OMP -D_SCALAPACK -D_OPENMP -D_TIMING -D_MEM_CHECK -D_GPU -D_OPENMP_GPU -D_HIP -D_yambo -D_linux -I/projappl/projec\
t_465001576/spallanz/src/yambo/include -I/projappl/project_465001576/spallanz/src/yambo/include/headers/common -I/projappl/project_465001576/spallanz/src/yambo/include/headers/parser -\
I/projappl/project_465001576/spallanz/src/yambo/include/driver -I/projappl/project_465001576/spallanz/src/yambo/include/version -I/projappl/project_465001576/spallanz/opt/ext-libs/cray\
/ftn/include/ -I/opt/cray/pe/netcdf-hdf5parallel/4.9.0.11/crayclang/17.0/include -I/opt/cray/pe/netcdf-hdf5parallel/4.9.0.11/crayclang/17.0/include   -I/opt/cray/pe/hdf5-parallel/1.12.\
2.11/crayclang/17.0/include -I/projappl/project_465001576/spallanz/opt/ext-libs/cray/ftn/include -I/projappl/project_465001576/spallanz/opt/devicexlib-develop/include  -I/opt/cray/pe/f\
ftw/3.3.10.7/x86_trento/include   -I/projappl/project_465001576/spallanz/src/yambo/include/driver -I/projappl/project_465001576/spallanz/src/yambo/include/version /projappl/project_465\
001576/spallanz/src/yambo/src/modules/mod_parallel.F >> mod_parallel.tmp_source
ftn -c -O1 -g -emf -eZ   -fopenmp -fopenmp -I/projappl/project_465001576/spallanz/src/yambo/include -I/projappl/project_465001576/spallanz/src/yambo/include/headers/common -I/projappl/\
project_465001576/spallanz/src/yambo/include/headers/parser -I/projappl/project_465001576/spallanz/src/yambo/include/driver -I/projappl/project_465001576/spallanz/src/yambo/include/ver\
sion -I/projappl/project_465001576/spallanz/opt/ext-libs/cray/ftn/include/ -I/opt/cray/pe/netcdf-hdf5parallel/4.9.0.11/crayclang/17.0/include -I/opt/cray/pe/netcdf-hdf5parallel/4.9.0.1\
1/crayclang/17.0/include   -I/opt/cray/pe/hdf5-parallel/1.12.2.11/crayclang/17.0/include -I/projappl/project_465001576/spallanz/opt/ext-libs/cray/ftn/include -I/projappl/project_465001\
576/spallanz/opt/devicexlib-develop/include  -I/opt/cray/pe/fftw/3.3.10.7/x86_trento/include   -I/projappl/project_465001576/spallanz/src/yambo/include/driver -I/projappl/project_46500\
1576/spallanz/src/yambo/include/version mod_parallel.f90

ftn-855 ftn: ERROR PARALLEL_M, File = ../../../pfs/lustrep1/projappl/project_465001576/spallanz/src/yambo/src/modules/mod_parallel.F, Line = 8, Column = 8
  The compiler has detected errors in module "PARALLEL_M".  No module information file will be created for this module.

ftn-233 ftn: ERROR PAR_SCHEME_RESET, File = ../../../pfs/lustrep1/projappl/project_465001576/spallanz/src/yambo/src/modules/mod_parallel.F, Line = 630, Column = 10
  IMPLICIT NONE is specified in the host scope, therefore an explicit type must be specified for function "DEVXLIB_MAPPED".

ftn-233 ftn: ERROR PP_INDEXES_RESET, File = ../../../pfs/lustrep1/projappl/project_465001576/spallanz/src/yambo/src/modules/mod_parallel.F, Line = 711, Column = 10
  IMPLICIT NONE is specified in the host scope, therefore an explicit type must be specified for function "DEVXLIB_MAPPED".

Cray Fortran : Version 17.0.1 (20240213000654_5ec9405551a8c8845cf14e81dc28bff7aa3935cb)
Cray Fortran : Compile time:  0.0874 seconds
Cray Fortran : 839 source lines
Cray Fortran : 3 errors, 0 warnings, 0 other messages, 0 ansi
Cray Fortran : "explain ftn-message number" gives more information about each message.

The issue is caused by the remove of these three lines in the file include/headers/common/y_memory.h that is included in all the source files that allocate or deallocate memory:

#if defined _OPENACC || defined _OPENMP_GPU
 use devxlib,      ONLY:devxlib_map,devxlib_unmap,devxlib_mapped,devxlib_memcpy_h2d
#endif

However, adding again these lines causes another issue:

ftn-878 ftn: WARNING INTERPOLATION_BZ_SETUP, File = ../../../pfs/lustrep1/projappl/project_465001576/spallanz/src/yambo/src/interpolate/INTERPOLATION_BZ_setup.F, Line = 17, Column = 6 
  A module named "DEVXLIB" has already been directly or indirectly use associated into this scope.

ftn-878 ftn: WARNING INTERPOLATION_BZ_SETUP, File = ../../../pfs/lustrep1/projappl/project_465001576/spallanz/src/yambo/include/headers/common/y_memory.h, Line = 13, Column = 6 
  A module named "DEVXLIB_MEMCPY" has already been directly or indirectly use associated into this scope.

ftn-878 ftn: WARNING INTERPOLATION_BZ_SETUP, File = ../../../pfs/lustrep1/projappl/project_465001576/spallanz/src/yambo/include/headers/common/y_memory.h, Line = 13, Column = 6 
  A module named "DEVXLIB_MAPPING" has already been directly or indirectly use associated into this scope.

ftn-113 ftn: ERROR INTERPOLATION_BZ_SETUP, File = ../../../pfs/lustrep1/projappl/project_465001576/spallanz/src/yambo/src/interpolate/INTERPOLATION_BZ_setup.F, Line = 139, Column = 2 
  IMPLICIT NONE is specified in the local scope, therefore an explicit type must be specified for data object "YAMBO_ALLOC_P".

ftn-724 ftn: ERROR INTERPOLATION_BZ_SETUP, File = ../../../pfs/lustrep1/projappl/project_465001576/spallanz/src/yambo/src/interpolate/INTERPOLATION_BZ_setup.F, Line = 139, Column = 15 
  Unknown statement.  Expected assignment statement but found "(" instead of "=" or "=>".

ftn-724 ftn: ERROR INTERPOLATION_BZ_SETUP, File = ../../../pfs/lustrep1/projappl/project_465001576/spallanz/src/yambo/src/interpolate/INTERPOLATION_BZ_setup.F, Line = 206, Column = 15 
  Unknown statement.  Expected assignment statement but found "(" instead of "=" or "=>".

Cray Fortran : Version 17.0.1 (20240213000654_5ec9405551a8c8845cf14e81dc28bff7aa3935cb)
Cray Fortran : Compile time:  0.0786 seconds
Cray Fortran : 305 source lines
Cray Fortran : 3 errors, 3 warnings, 0 other messages, 0 ansi
Cray Fortran : "explain ftn-message number" gives more information about each message.
@sangallidavide
Copy link
Member

Thanks Nicola for spotting this.

This looks a big bug to me, since we call these interfaces without declaring them through the whole source.

I'll restore the mentioned line asap in 5.3.

sangallidavide added a commit that referenced this issue Feb 4, 2025
MODIFIED *  configure include/headers/common/y_memory.h include/version/version.m4

Bugs:
- fix for issue #180

Patch sent by:  Davide Sangalli <davide.sangalli@gmail.com>
@andreamarini
Copy link
Member

Dear all, the release should remain stable up to when we all merge with it.

If the code moves the merging becomes troublesome.

We should discuss how to handle the validation period after a release has been proposed. Maybe new releases (5.3-alpha, 5.3-beta....) or (5.3.1, 5.3.2....).

@nicspalla
Copy link
Contributor Author

nicspalla commented Feb 4, 2025

The second issue after the restoring of the use devxlib line is caused by some temporary *.i files, kept together with the *.f90 files. So I'm checking if it is necessary to clean them or if it is possible to prevent their creation with the right preprocess flags.

EDIT: this is not true, the *.i files are not responsible for the second issue.

@nicspalla
Copy link
Contributor Author

Fixed with commit 04fe5ae

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

4 participants