grasp icon indicating copy to clipboard operation
grasp copied to clipboard

when compile grasp/src/lib/lib9290/iniest2.f90:82:23

Open hf6391964 opened this issue 4 years ago • 13 comments

Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1) make[2]: *** [src/lib/lib9290/CMakeFiles/9290.dir/build.make:933: src/lib/lib9290/CMakeFiles/9290.dir/iniest2.f90.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:652: src/lib/lib9290/CMakeFiles/9290.dir/all] Error 2 make: *** [Makefile:146: all] Error 2

hf6391964 avatar Nov 10 '21 01:11 hf6391964

79 | CALL DCOPY (NS, VEC(NS*(J-1)+1), 1, BASIS(NCF*(J-1)+1), 1) | 2 ...... 82 | CALL DCOPY (NIV, EIGVAL, 1, BASIS(NIV*NCF+1), 1) | 1

hf6391964 avatar Nov 10 '21 01:11 hf6391964

Are you saying that you're actually getting a compilation error with unmodified GRASP here? Because I can't really replicate that.

mortenpi avatar Nov 14 '21 21:11 mortenpi

It is better to describe the details of your compilation, such as your operating system, complier (gfortran, intel fortran), and the command you used for compilation. Because there are very limited information about the error, it is not easy to give more suggestions.

On Mon, Nov 15, 2021 at 5:58 AM Morten Piibeleht @.***> wrote:

Are you saying that you're actually getting a compilation error with unmodified GRASP here? Because I can't really replicate that.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/compas/grasp/issues/76#issuecomment-968371207, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACAFBSTAAG36QO36EBYCDJ3UMAWI3ANCNFSM5HWVE5BQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Ding Xiaobin

College Of Physics and Electronic Engineering Northwest Normal University Lanzhou, China 730070 Mob:0086+139+09441978 ORCID: 0000-0003-0004-3206 https://orcid.org/0000-0003-0004-3206 Researchgate: Xiaobin-Ding's work https://www.researchgate.net/profile/Xiaobin-Ding-2

QuantumGuy avatar Nov 16 '21 01:11 QuantumGuy

Thank you! Operating system is fedora35 and gfortran. Using default set and cmake. The problem is without F77. Since fedora35 without F77. Can you help me?

hf6391964 avatar Nov 16 '21 01:11 hf6391964

What's the gfortran version? It might be that it has become more picky about what it does and doesn't allow.

mortenpi avatar Nov 16 '21 02:11 mortenpi

gcc 11. We have changed to gcc 7. But no help. While lower version of gcc can't be accepted by fedora35.

hf6391964 avatar Nov 16 '21 08:11 hf6391964

Please describe it in detail. What you have done? And please give a full record of your operation and the system response.

It might be helpful.

On Tue, Nov 16, 2021 at 4:27 PM hf6391964 @.***> wrote:

gcc 11. We have changed to gcc 7. But no help. While lower version of gcc can't be accepted by fedora35.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/compas/grasp/issues/76#issuecomment-970021911, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACAFBSTZQZVN2CUYAGMAWTDUMIIWFANCNFSM5HWVE5BQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Ding Xiaobin

College Of Physics and Electronic Engineering Northwest Normal University Lanzhou, China 730070 Mob:0086+139+09441978 ORCID: 0000-0003-0004-3206 https://orcid.org/0000-0003-0004-3206 Researchgate: Xiaobin-Ding's work https://www.researchgate.net/profile/Xiaobin-Ding-2

QuantumGuy avatar Nov 16 '21 10:11 QuantumGuy

  1. with default step like readme.md
  2. ./configur.sh
  3. cd bulid
  4. make install
  5. 79 | CALL DCOPY (NS, VEC(NS*(J-1)+1), 1, BASIS(NCF*(J-1)+1), 1) | 2 ...... 82 | CALL DCOPY (NIV, EIGVAL, 1, BASIS(NIV*NCF+1), 1) | 1 Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1) make[2]: *** [src/lib/lib9290/CMakeFiles/9290.dir/build.make:933: src/lib/lib9290/CMakeFiles/9290.dir/iniest2.f90.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:652: src/lib/lib9290/CMakeFiles/9290.dir/all] Error 2 make: *** [Makefile:146: all] Error 2

But when compile the grasp2018-12-03, it is ok.

hf6391964 avatar Nov 22 '21 00:11 hf6391964

The problem is still the version of gcc.
https://gcc.gnu.org/gcc-10/porting_to.html -fallow-argument-mismatch (implied by -std=legacy)
but how to add this in cmake?

hf6391964 avatar Nov 22 '21 01:11 hf6391964

@mortenpi Do you mind answering this perhaps? You're the CMake expert here ;) Once we have settled on a way to customize the CMake build, this info should be given in the main page readme, just like how we describe it for the Makefile compilation with the Make.user files.

jongrumer avatar Nov 22 '21 11:11 jongrumer

Alright, so it is that the compiler has become more strict. It should be sufficient then to pass the appropriate CMAKE_Fortran_FLAGS to CMake. For that you need to bypass configure.sh and set up the CMake build manually:

mkdir build/
cd build/
cmake .. -DCMAKE_Fortran_FLAGS="-fallow-argument-mismatch"

@jongrumer I agree that we should update that section. I reckon we should just briefly describe how to invoke CMake directly in case you need to configure something (as opposed to making configure.sh more complex). In short: use ./configure.sh if the default works, but if you need to customise, invoke CMake directly.

mortenpi avatar Nov 22 '21 22:11 mortenpi

I think this is a duplicate of #46

jagot avatar Nov 23 '21 10:11 jagot

Good catch @jagot!

@hf6391964 Have you had any luck with the proposed CMake workaround? If it looks like it is working, I would go ahead and close this in favour of #77 (which is for fixing the underlying issue).

mortenpi avatar Nov 24 '21 22:11 mortenpi