Skip to content

Instantly share code, notes, and snippets.

@lijikun
Created July 4, 2021 13:12
Show Gist options
  • Save lijikun/476d0f6877424dd31e46d4a9aac5864f to your computer and use it in GitHub Desktop.
Save lijikun/476d0f6877424dd31e46d4a9aac5864f to your computer and use it in GitHub Desktop.
Make Gaussian 16 Linux Work with Ryzen CPUs

Just install g16 as you normally would with any Intel CPU, and add PGI_FASTMATH_CPU=haswell at the end of $g16root/g16/bsd/g16.profile. source it as you normally would.

Tested to work with G16 Rev. A03 AVX2 version on AMD Ryzen 7 4800U, with Ubuntu 20.04 LTS.

@SingletC
Copy link

tested Ryzen 5800X. wsl2 Ubuntu 20.04.1 LTS

@LeoFHall
Copy link

tested with RYZEN 9 5900HS under ubuntu 21.10

@hrishiksh
Copy link

hrishikesh-vm@hrishikesh:~$ g16 sds.com &
[1] 32759
hrishikesh-vm@hrishikesh:~$ Error: illegal instruction, illegal opcode
   rax 0000000000e51dd0, rbx 00007ffceb72e990, rcx 00007ffceb72e990
   rdx 00007ffceb72e960, rsp 00007ffceb72e8b8, rbp 00007ffceb72e8c0
   rsi 00007ffceb72e968, rdi 00007ffceb72e8f8, r8  0000000000000044
   r9  0000000000e38370, r10 0000000000000012, r11 0000000000000012
   r12 00000000010dc930, r13 00007f5ea2a2dc78, r14 00007f5ea2a1be28
   r15 00007f5ea2a185e8
  /lib/x86_64-linux-gnu/libpthread.so.0(+0x143c0) [0x7f5ec45723c0]
  /home/hrishikesh-vm/Downloads/gaussian/g16/l101.exe() [0xe51e7a]
Aborted (core dumped)

[1]+  Exit 1                  g16 sds.com
hrishikesh-vm@hrishikesh:~$ 

I have this error. What should I do now

@hrishiksh
Copy link

I have followed this video tutorial on youtube

@SingletC
Copy link

Update: I noticed some non-consistency in the result between Intel and AMD. Use with caution!

@ruixif
Copy link

ruixif commented Dec 18, 2022

@hrishiksh Do you mind sharing your cpu arch information? The flag PGI_FASTMATH_CPU=haswell is arch-dependent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment