PrincetonUniversity / tristan-mp-v2

Tristan-MP v2 [public]
https://princetonuniversity.github.io/tristan-v2/
BSD 3-Clause "New" or "Revised" License
12 stars 3 forks source link

Having trouble compiling on an intel machine #8

Closed rgill3141 closed 1 year ago

rgill3141 commented 2 years ago

Hi Hayk,

I'm trying to compile the code using the configuration:

python configure.py -intel -mpi -2d --user=user_twostream

I'm using openmpi-intel-1.10.3, and I'm getting the following errors:

Makefile:34: Makefile.depend: No such file or directory ifort: command line warning #10156: ignoring option '-O'; no argument required ifort: command line warning #10006: ignoring unknown option '-qopenmp-simd' ifort: command line warning #10006: ignoring unknown option '-qopt-report=5' ifort: command line warning #10006: ignoring unknown option '-qopt-streaming-stores' ifort: error #10236: File not found: 'auto' /tmp/ifortXWQEyn.i90: catastrophic error: Internal Compiler Error: Unrecognized characters in value qualifier: 1e compilation aborted for src/global_namespace.F90 (code 1) make: *** [build/src/global_namespace.o] Error 1

Please let me know what additional information you'd need to provide any help with this. Any help will be greatly appreciated!

I'm not sure if the compilers on my machine are old. It would help to know what are the lowest versions of all the different libraries and compilers one needs to compile this code.

Thanks, Ramandeep Gill IRyA - UNAM

haykh commented 2 years ago

Hi, thanks for asking. So I tried with the oldest version of intel and openmpi available for me at the moment (see PS), and it seems to compile with no problem for me. Citing the compatible version for intel is a bit problematic, since intel compilers are proprietary, and I don't have access to all the legacy versions.

  1. It's very much possible you are using a non-avx CPU (I don't have access to one with intel compilers installed unfortunately, so I can't check). Could you try replacing the line in configure.py and trying the same thing again (i.e., configure then compile)?

Replace this line

makefile_options['COMPILER_FLAGS'] += '-O3 -DSoA -ipo -qopenmp-simd -qopt-report=5 -qopt-streaming-stores auto '

with this

makefile_options['COMPILER_FLAGS'] += '-O3 -DSoA -ipo '
  1. For some reason it looks like the depend target does not run for you. Could you try running (after configuration) make depend. It should run without any error and produce a file called Makefile.depend (maybe that error pops out because of the other compilation errors). This will ensure everything is in order.

  2. In general, I recommend using -mpi08 to enable the latest mpi. The older one works, but the new one is a bit more reliable from my experience.

PS. The modules I used:

Currently Loaded Modulefiles:
 1) intel-mkl/2020.1   2) intel/19.1.1.217   3) openmpi/intel-19.1/4.1.0
rgill3141 commented 2 years ago

Hi, thanks for writing back so promptly!

I tried the solution you offered and still no go. The compile command from the configure script is:

mpif90 -DMPI08 -DtwoD -DNGHOST=3_2 -Ofast -O3 -DSoA -ipo -diag-disable 10397 -diag-disable 10346 -DSTR_MAX=280 -DTINYXYZ=1e-6 -DTINYREAL=1e-3 -DTINYFLD=1e-8 -DTINYWEI=1e-6 -DM_PI=3.141592653589793 -Ddefault_h5_real=H5T_NATIVE_REAL

Now, I'm getting the following error messages:

ifort: command line warning #10156: ignoring option '-O'; no argument required /tmp/ifortpTP5qb.i90: catastrophic error: Internal Compiler Error: Unrecognized characters in value qualifier: 1e compilation aborted for src/global_namespace.F90 (code 1) make: *** [build/src/global_namespace.o] Error 1

I'm going to try and see if I can get the same modules as the ones loaded on your machine. I'll report back.

-Ramandeep

haykh commented 2 years ago

oh, i think i understand (although that's pretty weird). could you try fixing line 227 in configure.py to something like this:

makefile_options['DEFS'] = '-DSTR_MAX=280 -DTINYXYZ="1e-6" -DTINYREAL="1e-3" -DTINYFLD="1e-8" -DTINYWEI="1e-6" -DM_PI="3.141592653589793" '
rgill3141 commented 2 years ago

Okay, I modified line 227 in the configure script and now the compile command reads:

mpif90 -DMPI08 -DtwoD -DNGHOST=3_2 -Ofast -O3 -DSoA -ipo -diag-disable 10397 -diag-disable 10346 -DSTR_MAX=280 -DTINYXYZ="1e-6" -DTINYREAL="1e-3" -DTINYFLD="1e-8" -DTINYWEI="1e-6" -DM_PI="3.141592653589793" -Ddefault_h5_real=H5T_NATIVE_REAL

However, this changed nothing and gives the same error as above.

haykh commented 2 years ago

it's very hard to troubleshoot when i can't reproduce the error. would you be willing to zoom so i could see the issue first hand? if so, email me haykh.astro[at]gmail.com and i can send a zoom link.

rgill3141 commented 1 year ago

In the end, I had to use the latest gcc, openmpi and hdf5 compilers to be able to compile. These were easily obtained using conda and also installed locally.