joeatodd / HiDEM

The Helsinki Discrete Element Model
GNU General Public License v3.0
19 stars 2 forks source link

Recompile issue typedefs.f90 on CSC Puhti #2

Open eefvandongen opened 4 years ago

eefvandongen commented 4 years ago

Computing system (please complete the following information):

Issue Type Error message in compilation

Error message or symptoms mpif-sizeof.h:395.47: Included at mpif.h:63: Included at /users/eefvan/sources/puhti/HiDEM/src/typedefs.f90:14:

  COMPLEX(REAL64), DIMENSION(1,1,1,1,1,1,1,*)::x
                                           1

Error: Array specification at (1) has more than 7 dimensions Fatal Error: Error count reached limit of 25.

This same error (more than 7 dimensions) came up 25 times. Maybe related to: CMake Warning: Manually-specified variables were not used by the project: CMAKE_TOOLCHAIN_FILE

Describe the context Due to problems on Puhti, I had to recompile HiDEM. I have removed the build directory and tried to use the same compilation file as before, but then the above errors came up.

joeatodd commented 4 years ago

I guess this isn't the log from a fresh (rm -r build/*) build? Otherwise, the fact that its not using the toolchain file is probably an issue.

Which toolchain are you using?

eefvandongen commented 4 years ago

I did remove the build directory (I tried first not to remove it, but then the recompiled HiDEM still caused problems on puhti so I hoped that a fresh recompilation may solve those problems). Below are the .sh and .cmake (but with changed .txt extension here for Github upload) compile_cray.txt HiDEM-cray-taito.txt

joeatodd commented 4 years ago

So, to be totally clear, even when you remove everything from the build directory, your log still warns: 'CMake Warning: Manually-specified variables were not used by the project: CMAKE_TOOLCHAIN_FILE' ?

eefvandongen commented 4 years ago

yes

eefvandongen commented 4 years ago

Indeed, the problem is related to not using the toolchain, which leads to wrong compilers being used and therefore the error messages came up. When I copied the CMake files/folders from the previous builddir to the new builddir, but made sure the builddir was empty besides those copies, it indeed compiles without errors. So the issue is partly solved, except that it would be good to fix the compilation script such that the right toolchain is automatically used.

joeatodd commented 4 years ago

I cannot understand why the toolchain wouldn't be used. I suspect maybe you accidentally have CMakeCache.txt or something in amongst your source files?