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

Compilation error #12

Open
devounoide opened this issue Nov 28, 2018 · 2 comments
Open

Compilation error #12

devounoide opened this issue Nov 28, 2018 · 2 comments

Comments

@devounoide
Copy link

When I compile the binary using the source code, I get this error.
Did any one else get this error? How to solve the problem? Thanks!

ifort -mkl -fpp -c -qopenmp -recursive -Ddouble_precision -I /export/intel/compilers_and_libraries_2017.6.256/linux/mkl/include/fftw -I /export/intel/compilers_and_libraries_2017.6.256/linux/mkl/include/ -c m_potential.f90
m_potential.f90(775): error #6401: The attributes of this name conflict with those made accessible by a USE statement. [N_SLICES]
integer4,intent(in)::nopiy,nopix,n_slices
------------------------------------------^
m_potential.f90(775): error #6445: A dummy argument is required in this context. [N_SLICES]
integer
4,intent(in)::nopiy,nopix,n_slices
------------------------------------------^
m_potential.f90(791): error #6405: The same named entity from different modules and/or program units cannot be referenced. [N_SLICES]
do j = 1, n_slices
------------------^
m_potential.f90(792): error #6405: The same named entity from different modules and/or program units cannot be referenced. [N_SLICES]
write(,'(1x, a, a, a, a, a)') 'Calculating transmission functions for slice ', to_string(j), '/', to_string(n_slices), '...'
-----------------------------------------------------------------------------------------------------------------------------^
m_potential.f90(775): error #6279: A specification expression object must be a dummy argument, a COMMON block object, or an object accessible through host or use association. [N_SLICES]
integer
4,intent(in)::nopiy,nopix,n_slices
------------------------------------------^
m_potential.f90(763): error #6404: This name does not have a type, and must have an explicit type. [N_SLICES]
function make_absorptive_grates(nopiy,nopix,n_slices) result(projected_potential)
------------------------------------------------^
compilation aborted for m_potential.f90 (code 1)
make: *** [m_potential.o] Error 1
[root@mgt2 CPU_routines]# make all
ifort -mkl -fpp -c -Ddouble_precision -I /export/intel/compilers_and_libraries_2017.6.256/linux/mkl/include/fftw -I /export/intel/compilers_and_libraries_2017.6.256/linux/mkl/include/ -c m_potential.f90
m_potential.f90(775): error #6401: The attributes of this name conflict with those made accessible by a USE statement. [N_SLICES]
integer4,intent(in)::nopiy,nopix,n_slices
------------------------------------------^
m_potential.f90(775): error #6445: A dummy argument is required in this context. [N_SLICES]
integer
4,intent(in)::nopiy,nopix,n_slices
------------------------------------------^
m_potential.f90(791): error #6405: The same named entity from different modules and/or program units cannot be referenced. [N_SLICES]
do j = 1, n_slices
------------------^
m_potential.f90(792): error #6405: The same named entity from different modules and/or program units cannot be referenced. [N_SLICES]
write(,'(1x, a, a, a, a, a)') 'Calculating transmission functions for slice ', to_string(j), '/', to_string(n_slices), '...'
-----------------------------------------------------------------------------------------------------------------------------^
m_potential.f90(775): error #6279: A specification expression object must be a dummy argument, a COMMON block object, or an object accessible through host or use association. [N_SLICES]
integer
4,intent(in)::nopiy,nopix,n_slices
------------------------------------------^
m_potential.f90(763): error #6404: This name does not have a type, and must have an explicit type. [N_SLICES]
function make_absorptive_grates(nopiy,nopix,n_slices) result(projected_potential)
------------------------------------------------^
compilation aborted for m_potential.f90 (code 1)
make: *** [m_potential.o] Error 1

@HamishGBrown
Copy link
Owner

Hi David,

The error you're getting is because n_slices (sub-slicing of the unit cell in the multislice algorithm) is a variable defined within the module m_multislice which many of the routines in m_potential use. Many of these routines redefine n_slices locally. I didn't have this error when I compiled: an issue I've had working with people who have different versions of the PGI compiler to the one I was using when I compiled v5.3 of the code is that different version of the compiler throw up different errors.

As it happens, the staff at the Monash super computer ran into the same issue when they tried to compile the code and suggested a fix via a pull request. I accepted the pull request but have just realised that I didn't properly merge this into the master version of the code. I've just done this so please redownload the code and attempt to compile. Let me know how you go.

Cheers,
Hamish

@devounoide
Copy link
Author

Thanks for your update, Hamish. Now everything works.

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