-
Notifications
You must be signed in to change notification settings - Fork 0
/
AVX512_patch
4959 lines (4619 loc) · 179 KB
/
AVX512_patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
From 7b114a257f936ac26be81aab8af96d586c38c4e0 Mon Sep 17 00:00:00 2001
From: "j.m.o.rantaharju" <[email protected]>
Date: Thu, 19 Apr 2018 14:39:10 +0100
Subject: [PATCH] This patch extends openQCD-1.6 with an implementation of the
Dirac operator with intel Intrincic operations in order to use the full
vector width on Intel Skylake, Knights Landing and other processors.
Add patch file to reproduce changes
Removing assembly files
Compilation of AVX code with ICC is is now possible
---
CITATION.cff | 39 +
README-AVX512 | 24 +
devel/archive/Makefile | 37 +-
devel/block/Makefile | 36 +-
devel/dfl/Makefile | 36 +-
devel/dirac/Makefile | 39 +-
devel/forces/Makefile | 36 +-
devel/linalg/Makefile | 17 +-
devel/little/Makefile | 36 +-
devel/sap/Makefile | 36 +-
devel/sflds/Makefile | 34 +-
devel/sw_term/Makefile | 21 +-
devel/update/Makefile | 37 +-
devel/vflds/Makefile | 33 +-
include/avx512.h | 978 +++++++++++++++++++++
include/sw_term.h | 1 +
main/Makefile | 36 +-
modules/dirac/Dw.c | 22 +-
modules/dirac/Dw_dble.c | 74 +-
modules/dirac/avx512/Dw_avx512.c | 221 +++++
modules/dirac/avx512/Dw_dble_avx512.c | 261 ++++++
modules/linalg/avx512/salg_avx512.c | 154 ++++
modules/linalg/avx512/salg_dble_avx512.c | 402 +++++++++
modules/linalg/salg.c | 82 +-
modules/linalg/salg_dble.c | 165 +++-
modules/sw_term/avx512/pauli_avx512.c | 235 +++++
modules/sw_term/avx512/pauli_dble_avx512.c | 489 +++++++++++
modules/sw_term/pauli.c | 213 ++---
modules/sw_term/pauli_dble.c | 48 +-
29 files changed, 3512 insertions(+), 330 deletions(-)
create mode 100644 CITATION.cff
create mode 100644 README-AVX512
create mode 100644 include/avx512.h
create mode 100644 modules/dirac/avx512/Dw_avx512.c
create mode 100644 modules/dirac/avx512/Dw_dble_avx512.c
create mode 100644 modules/linalg/avx512/salg_avx512.c
create mode 100644 modules/linalg/avx512/salg_dble_avx512.c
create mode 100644 modules/sw_term/avx512/pauli_avx512.c
create mode 100644 modules/sw_term/avx512/pauli_dble_avx512.c
diff --git a/CITATION.cff b/CITATION.cff
new file mode 100644
index 0000000..c2e855d
--- /dev/null
+++ b/CITATION.cff
@@ -0,0 +1,39 @@
+
+cff-version: 1.0.3
+message: "Please cite the following works when using this software."
+
+title: OpenQCD AVX512 Extension
+version: 1.0
+date-released: 19 January 2018
+authors:
+ - name: "Swansea Academy of Advanced Computing"
+ website: http://www.swansea.ac.uk/iss/sa2c/
+ email: [email protected]
+ - family-names: Rantaharju
+ given-names: Jarno
+ orcid: https://orcid.org/0000-0002-0072-7707
+ - family-names: Messiti
+ given-names: Michele
+
+references:
+ - type: software-code
+ name: OpenQCD
+ version: 1.6
+ website: luscher.web.cern.ch/luscher/openQCD/
+ authors:
+ - family-names: Lüscher
+ given-names: Martin
+ - family-names: Schaefer
+ given-names: Stefan
+ - family-names: Bulava
+ given-names: John
+ - family-names: Del Debbio
+ given-names: Luigi
+ - family-names: Giusti
+ given-names: Leonardo
+ - family-names: Leder
+ given-names: Björn
+ - family-names: Palombi
+ given-names: Filippo
+ date-released: 22. April 2014
+ email: [email protected]
diff --git a/README-AVX512 b/README-AVX512
new file mode 100644
index 0000000..25a47ff
--- /dev/null
+++ b/README-AVX512
@@ -0,0 +1,24 @@
+An optimized version of openQCD-1.6 for Intel processors with 512 bit vector width
+==================================================================================
+
+DESCRIPTION
+
+ This code extends openQCD-1.6 with an implementation of the Dirac operator
+ with intel Intrincic operations in order to use the full vector width on Intel
+ Skylake, Knight Landing and other processors.
+
+ The extension is enabled with the -DAVX521 flag in CFLAGS in the Makefiles.
+
+
+
+AUTHORS
+
+ This patch extends the openQCD code written by Martin Luscher, Stefan
+ Schaefer and other contributors (see http://luscher.web.cern.ch/luscher/openQCD/).
+
+ The batch has been written by and tested by Jarno Rantaharju and Michele Messiti.
+
+LICENSE
+
+ The code may be used under the terms of the GNU General Public License (GPL)
+ http://www.fsf.org/licensing/licenses/gpl.html
diff --git a/devel/archive/Makefile b/devel/archive/Makefile
index 8c94a12..c5e949a 100644
--- a/devel/archive/Makefile
+++ b/devel/archive/Makefile
@@ -39,9 +39,13 @@ UFLDS = plaq_sum uflds udcom
UTILS = endian error hsum mutils utils wspace
-MODULES = $(FLAGS) $(LATTICE) $(ARCHIVE) $(LINALG) $(RANDOM) $(UFLDS) \
+STD_MODULES = $(FLAGS) $(LATTICE) $(ARCHIVE) $(LINALG) $(RANDOM) $(UFLDS) \
$(SFLDS) $(SU3FCTS) $(UTILS)
+AVX512_MODULES = salg_dble_avx512
+
+AVX512_ASM_MODULES = salg_dble_avx512_asm
+
# Logging option (-mpilog or -mpitrace or -mpianim)
@@ -54,7 +58,7 @@ MDIR = ../../modules
VPATH = .:$(MDIR)/flags:$(MDIR)/lattice:$(MDIR)/archive:$(MDIR)/linalg:\
$(MDIR)/random:$(MDIR)/uflds:$(MDIR)/sflds:\
- $(MDIR)/su3fcts:$(MDIR)/utils
+ $(MDIR)/su3fcts:$(MDIR)/utils:$(MDIR)/linalg/avx512:
# additional include directories
@@ -72,10 +76,10 @@ LIBPATH = $(MPI_HOME)/lib
# scheduling and optimization options
CFLAGS = -std=c89 -pedantic -fstrict-aliasing \
- -Wall -Wno-long-long -Wstrict-prototypes -Werror \
- -O -mno-avx -Dx64 -DPM
+ -Wall -Wno-long-long -Wstrict-prototypes \
+ -O2 -DAVX512
-LFLAGS =
+LFLAGS = $(CFLAGS)
############################## do not change ###################################
@@ -84,25 +88,40 @@ SHELL=/bin/bash
CC=mpicc
CLINKER=$(CC)
+#Check CFLAGS to find which AVX512 flags are active
+ifneq (,$(findstring AVX512_ASM,$(CFLAGS)))
+MODULES= $(STD_MODULES) $(AVX512_ASM_MODULES)
+else
+ifneq (,$(findstring AVX512,$(CFLAGS)))
+MODULES= $(STD_MODULES) $(AVX512_MODULES)
+else
+MODULES= $(STD_MODULES)
+endif
+endif
+
PGMS= $(MAIN) $(MODULES)
-include $(addsuffix .d,$(PGMS))
-# rule to make dependencies
+
+# rule to make dependencies
$(addsuffix .d,$(PGMS)): %.d: %.c Makefile
@ $(GCC) -ansi $< -MM $(addprefix -I,$(INCPATH)) -o $@
-
# rule to compile source programs
+$(addsuffix .o,$(MAIN) $(STD_MODULES)): %.o: %.c Makefile
+ $(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
-$(addsuffix .o,$(PGMS)): %.o: %.c Makefile
+# pattern to compile files in the avx512 directiories
+$(addsuffix .o,$(AVX512_MODULES)): %.o: %.c Makefile
$(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
+$(addsuffix .o,$(AVX512_ASM_MODULES)): %.o: %.s Makefile
+ $(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
# rule to link object files
-
$(MAIN): %: %.o $(addsuffix .o,$(MODULES)) Makefile
$(CLINKER) $< $(addsuffix .o,$(MODULES)) $(LFLAGS) $(LOGOPTION) \
$(addprefix -L,$(LIBPATH)) $(addprefix -l,$(LIBS)) -o $@
diff --git a/devel/block/Makefile b/devel/block/Makefile
index ad90f62..3856581 100644
--- a/devel/block/Makefile
+++ b/devel/block/Makefile
@@ -45,9 +45,15 @@ UFLDS = uflds udcom shift
UTILS = endian error hsum mutils utils wspace
-MODULES = $(FLAGS) $(RANDOM) $(LATTICE) $(BLOCK) $(UFLDS) $(SFLDS) \
+STD_MODULES = $(FLAGS) $(RANDOM) $(LATTICE) $(BLOCK) $(UFLDS) $(SFLDS) \
$(LINALG) $(SU3FCTS) $(UTILS) $(TCHARGE) $(SW_TERM) $(SAP)
+AVX512_MODULES = salg_avx512 salg_dble_avx512 \
+ pauli_avx512 pauli_dble_avx512
+
+AVX512_ASM_MODULES = salg_avx512_asm salg_dble_avx512_asm \
+ pauli_avx512_asm pauli_dble_avx512_asm
+
# Logging option (-mpilog or -mpitrace or -mpianim)
@@ -60,7 +66,7 @@ MDIR = ../../modules
VPATH = .:$(MDIR)/flags:$(MDIR)/random:$(MDIR)/lattice:$(MDIR)/block:\
$(MDIR)/uflds:$(MDIR)/sflds:$(MDIR)/su3fcts:$(MDIR)/utils:\
- $(MDIR)/linalg:$(MDIR)/tcharge:$(MDIR)/sw_term:$(MDIR)/sap
+ $(MDIR)/linalg:$(MDIR)/tcharge:$(MDIR)/sw_term:$(MDIR)/sap:$(MDIR)/linalg/avx512:$(MDIR)/dirac/avx512:$(MDIR)/sw_term/avx512
# additional include directories
@@ -78,10 +84,10 @@ LIBPATH = $(MPI_HOME)/lib
# scheduling and optimization options
CFLAGS = -std=c89 -pedantic -fstrict-aliasing \
- -Wall -Wno-long-long -Wstrict-prototypes -Werror \
- -O -mno-avx -Dx64 -DPM
+ -Wall -Wno-long-long -Wstrict-prototypes \
+ -O2 -DAVX512
-LFLAGS =
+LFLAGS = $(CFLAGS)
############################## do not change ###################################
@@ -90,25 +96,39 @@ SHELL=/bin/bash
CC=mpicc
CLINKER=$(CC)
+#Check CFLAGS to find which AVX512 flags are active
+ifneq (,$(findstring AVX512_ASM,$(CFLAGS)))
+MODULES= $(STD_MODULES) $(AVX512_ASM_MODULES)
+else
+ifneq (,$(findstring AVX512,$(CFLAGS)))
+MODULES= $(STD_MODULES) $(AVX512_MODULES)
+else
+MODULES= $(STD_MODULES)
+endif
+endif
+
PGMS= $(MAIN) $(MODULES)
-include $(addsuffix .d,$(PGMS))
# rule to make dependencies
-
$(addsuffix .d,$(PGMS)): %.d: %.c Makefile
@ $(GCC) -ansi $< -MM $(addprefix -I,$(INCPATH)) -o $@
# rule to compile source programs
+$(addsuffix .o,$(MAIN) $(STD_MODULES)): %.o: %.c Makefile
+ $(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
-$(addsuffix .o,$(PGMS)): %.o: %.c Makefile
+# pattern to compile files in the avx512 directiories
+$(addsuffix .o,$(AVX512_MODULES)): %.o: %.c Makefile
$(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
+$(addsuffix .o,$(AVX512_ASM_MODULES)): %.o: %.s Makefile
+ $(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
# rule to link object files
-
$(MAIN): %: %.o $(addsuffix .o,$(MODULES)) Makefile
$(CLINKER) $< $(addsuffix .o,$(MODULES)) $(LFLAGS) $(LOGOPTION) \
$(addprefix -L,$(LIBPATH)) $(addprefix -l,$(LIBS)) -o $@
diff --git a/devel/dfl/Makefile b/devel/dfl/Makefile
index 9def70f..0a6ce2e 100644
--- a/devel/dfl/Makefile
+++ b/devel/dfl/Makefile
@@ -57,10 +57,15 @@ UTILS = endian error hsum mutils utils wspace
VFLDS = vflds vinit vcom vdcom
-MODULES = $(FLAGS) $(LATTICE) $(LINALG) $(LINSOLV) $(RANDOM) $(UFLDS) \
+STD_MODULES = $(FLAGS) $(LATTICE) $(LINALG) $(LINSOLV) $(RANDOM) $(UFLDS) \
$(SU3FCTS) $(UTILS) $(SFLDS) $(TCHARGE) $(SW_TERM) $(DIRAC) \
$(BLOCK) $(SAP) $(ARCHIVE) $(DFL) $(VFLDS) $(LITTLE)
+AVX512_MODULES = Dw_avx512 Dw_dble_avx512 salg_avx512 salg_dble_avx512 \
+ pauli_avx512 pauli_dble_avx512
+
+AVX512_ASM_MODULES = Dw_avx512_asm Dw_dble_avx512_asm salg_avx512_asm \
+ salg_dble_avx512_asm pauli_avx512_asm pauli_dble_avx512_asm
# Logging option (-mpilog or -mpitrace or -mpianim)
@@ -75,7 +80,8 @@ VPATH = .:$(MDIR)/flags:$(MDIR)/lattice:$(MDIR)/linalg:$(MDIR)/linsolv:\
$(MDIR)/random:$(MDIR)/uflds:$(MDIR)/su3fcts:$(MDIR)/utils:\
$(MDIR)/sflds:$(MDIR)/tcharge:$(MDIR)/sw_term:$(MDIR)/dirac:\
$(MDIR)/block:$(MDIR)/sap:$(MDIR)/archive:$(MDIR)/dfl:\
- $(MDIR)/vflds:$(MDIR)/little
+ $(MDIR)/vflds:$(MDIR)/little\
+ $(MDIR)/linalg/avx512:$(MDIR)/dirac/avx512:$(MDIR)/sw_term/avx512
# additional include directories
@@ -92,10 +98,10 @@ LIBPATH = $(MPI_HOME)/lib
# scheduling and optimization options
CFLAGS = -std=c89 -pedantic -fstrict-aliasing \
- -Wall -Wno-long-long -Wstrict-prototypes -Werror \
- -O -mno-avx -Dx64 -DPM
+ -Wall -Wno-long-long -Wstrict-prototypes \
+ -O2 -DAVX512
-LFLAGS =
+LFLAGS = $(CFLAGS)
# -DFGCR_DBG -DFGCR4VD_DBG -DDFL_MODES_DBG
@@ -106,25 +112,39 @@ SHELL=/bin/bash
CC=mpicc
CLINKER=$(CC)
+#Check CFLAGS to find which AVX512 flags are active
+ifneq (,$(findstring AVX512_ASM,$(CFLAGS)))
+MODULES= $(STD_MODULES) $(AVX512_ASM_MODULES)
+else
+ifneq (,$(findstring AVX512,$(CFLAGS)))
+MODULES= $(STD_MODULES) $(AVX512_MODULES)
+else
+MODULES= $(STD_MODULES)
+endif
+endif
+
PGMS= $(MAIN) $(MODULES)
-include $(addsuffix .d,$(PGMS))
# rule to make dependencies
-
$(addsuffix .d,$(PGMS)): %.d: %.c Makefile
@ $(GCC) -ansi $< -MM $(addprefix -I,$(INCPATH)) -o $@
# rule to compile source programs
+$(addsuffix .o,$(MAIN) $(STD_MODULES)): %.o: %.c Makefile
+ $(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
-$(addsuffix .o,$(PGMS)): %.o: %.c Makefile
+# pattern to compile files in the avx512 directiories
+$(addsuffix .o,$(AVX512_MODULES)): %.o: %.c Makefile
$(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
+$(addsuffix .o,$(AVX512_ASM_MODULES)): %.o: %.s Makefile
+ $(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
# rule to link object files
-
$(MAIN): %: %.o $(addsuffix .o,$(MODULES)) Makefile
$(CLINKER) $< $(addsuffix .o,$(MODULES)) $(LFLAGS) $(LOGOPTION) \
$(addprefix -L,$(LIBPATH)) $(addprefix -l,$(LIBS)) -o $@
diff --git a/devel/dirac/Makefile b/devel/dirac/Makefile
index 8fac63d..f467889 100644
--- a/devel/dirac/Makefile
+++ b/devel/dirac/Makefile
@@ -12,6 +12,7 @@
# Dependencies on included files are automatically taken care of
#
################################################################################
+################################################################################
all: rmxeq mkdep mkxeq
.PHONY: all
@@ -48,10 +49,15 @@ UFLDS = plaq_sum shift uflds udcom
UTILS = endian error hsum mutils utils wspace
-MODULES = $(FLAGS) $(LATTICE) $(LINALG) $(RANDOM) $(UFLDS) \
+STD_MODULES = $(FLAGS) $(LATTICE) $(LINALG) $(RANDOM) $(UFLDS) \
$(SU3FCTS) $(UTILS) $(SFLDS) $(TCHARGE) $(SW_TERM) \
$(DIRAC) $(BLOCK) $(SAP)
+AVX512_MODULES = Dw_avx512 Dw_dble_avx512 salg_avx512 salg_dble_avx512 \
+ pauli_avx512 pauli_dble_avx512
+
+AVX512_ASM_MODULES = Dw_avx512_asm Dw_dble_avx512_asm salg_avx512_asm \
+ salg_dble_avx512_asm pauli_avx512_asm pauli_dble_avx512_asm
# Logging option (-mpilog or -mpitrace or -mpianim)
@@ -65,7 +71,7 @@ MDIR = ../../modules
VPATH = .:$(MDIR)/flags:$(MDIR)/lattice:$(MDIR)/linalg:$(MDIR)/random:\
$(MDIR)/uflds:$(MDIR)/su3fcts:$(MDIR)/utils:$(MDIR)/sflds:\
$(MDIR)/tcharge:$(MDIR)/sw_term:$(MDIR)/dirac:$(MDIR)/block:\
- $(MDIR)/sap
+ $(MDIR)/sap:$(MDIR)/dirac/avx512:$(MDIR)/sw_term/avx512:$(MDIR)/linalg/avx512
# additional include directories
@@ -82,11 +88,10 @@ LIBPATH = $(MPI_HOME)/lib
# scheduling and optimization options
CFLAGS = -std=c89 -pedantic -fstrict-aliasing \
- -Wall -Wno-long-long -Wstrict-prototypes -Werror \
- -O -mno-avx -Dx64 -DPM
-
-LFLAGS =
+ -Wall -Wno-long-long -Wstrict-prototypes \
+ -O2 -DAVX512 -DAVX -DPM
+LFLAGS = $(CFLAGS)
############################## do not change ###################################
@@ -94,30 +99,46 @@ SHELL=/bin/bash
CC=mpicc
CLINKER=$(CC)
+
+#Check CFLAGS to find which AVX512 flags are active
+ifneq (,$(findstring AVX512_ASM,$(CFLAGS)))
+MODULES= $(STD_MODULES) $(AVX512_ASM_MODULES)
+else
+ifneq (,$(findstring AVX512,$(CFLAGS)))
+MODULES= $(STD_MODULES) $(AVX512_MODULES)
+else
+MODULES= $(STD_MODULES)
+endif
+endif
+
PGMS= $(MAIN) $(MODULES)
-include $(addsuffix .d,$(PGMS))
# rule to make dependencies
-
$(addsuffix .d,$(PGMS)): %.d: %.c Makefile
@ $(GCC) -ansi $< -MM $(addprefix -I,$(INCPATH)) -o $@
# rule to compile source programs
+$(addsuffix .o,$(MAIN) $(STD_MODULES)): %.o: %.c Makefile
+ $(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
-$(addsuffix .o,$(PGMS)): %.o: %.c Makefile
+# pattern to compile files in the avx512 directiories
+$(addsuffix .o,$(AVX512_MODULES)): %.o: %.c Makefile
$(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
+$(addsuffix .o,$(AVX512_ASM_MODULES)): %.o: %.s Makefile
+ $(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
# rule to link object files
-
$(MAIN): %: %.o $(addsuffix .o,$(MODULES)) Makefile
$(CLINKER) $< $(addsuffix .o,$(MODULES)) $(LFLAGS) $(LOGOPTION) \
$(addprefix -L,$(LIBPATH)) $(addprefix -l,$(LIBS)) -o $@
+
# produce executables
mkxeq: $(MAIN)
diff --git a/devel/forces/Makefile b/devel/forces/Makefile
index e6955fb..7bf668c 100644
--- a/devel/forces/Makefile
+++ b/devel/forces/Makefile
@@ -68,11 +68,16 @@ UTILS = endian error hsum mutils utils wspace
VFLDS = vflds vinit vcom vdcom
-MODULES = $(ARCHIVE) $(BLOCK) $(DFL) $(DIRAC) $(FLAGS) $(FORCES) \
+STD_MODULES = $(ARCHIVE) $(BLOCK) $(DFL) $(DIRAC) $(FLAGS) $(FORCES) \
$(LATTICE) $(LINALG) $(LINSOLV) $(LITTLE) $(MDFLDS) $(RANDOM) \
$(RATFCTS) $(SAP) $(SFLDS) $(SU3FCTS) $(SW_TERM) $(TCHARGE) \
$(UFLDS) $(UPDATE) $(UTILS) $(VFLDS)
+AVX512_MODULES = Dw_avx512 Dw_dble_avx512 salg_avx512 salg_dble_avx512 \
+ pauli_avx512 pauli_dble_avx512
+
+AVX512_ASM_MODULES = Dw_avx512_asm Dw_dble_avx512_asm salg_avx512_asm \
+ salg_dble_avx512_asm pauli_avx512_asm pauli_dble_avx512_asm
# Logging option (-mpilog or -mpitrace or -mpianim)
@@ -88,7 +93,8 @@ VPATH = .:$(MDIR)/flags:$(MDIR)/lattice:$(MDIR)/archive:$(MDIR)/linalg:\
$(MDIR)/utils:$(MDIR)/forces:$(MDIR)/sflds:$(MDIR)/dirac:\
$(MDIR)/sw_term:$(MDIR)/tcharge:$(MDIR)/block:$(MDIR)/sap:\
$(MDIR)/linsolv:$(MDIR)/dfl:$(MDIR)/vflds:$(MDIR)/little:\
- $(MDIR)/update:$(MDIR)/ratfcts
+ $(MDIR)/update:$(MDIR)/ratfcts\
+ $(MDIR)/linalg/avx512:$(MDIR)/dirac/avx512:$(MDIR)/sw_term/avx512
# additional include directories
@@ -106,10 +112,10 @@ LIBPATH = $(MPI_HOME)/lib
# scheduling and optimization options
CFLAGS = -std=c89 -pedantic -fstrict-aliasing \
- -Wall -Wno-long-long -Wstrict-prototypes -Werror \
- -O -mno-avx -Dx64 -DPM
+ -Wall -Wno-long-long -Wstrict-prototypes \
+ -O2 -DAVX512
-LFLAGS =
+LFLAGS = $(CFLAGS)
# -DCGNE_DBG -DFGCR_DBG -DMSCG_DBG
# -DDFL_MODES_DBG
@@ -121,25 +127,39 @@ SHELL=/bin/bash
CC=mpicc
CLINKER=$(CC)
+#Check CFLAGS to find which AVX512 flags are active
+ifneq (,$(findstring AVX512_ASM,$(CFLAGS)))
+MODULES= $(STD_MODULES) $(AVX512_ASM_MODULES)
+else
+ifneq (,$(findstring AVX512,$(CFLAGS)))
+MODULES= $(STD_MODULES) $(AVX512_MODULES)
+else
+MODULES= $(STD_MODULES)
+endif
+endif
+
PGMS= $(MAIN) $(MODULES)
-include $(addsuffix .d,$(PGMS))
# rule to make dependencies
-
$(addsuffix .d,$(PGMS)): %.d: %.c Makefile
@ $(GCC) -ansi $< -MM $(addprefix -I,$(INCPATH)) -o $@
# rule to compile source programs
+$(addsuffix .o,$(MAIN) $(STD_MODULES)): %.o: %.c Makefile
+ $(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
-$(addsuffix .o,$(PGMS)): %.o: %.c Makefile
+# pattern to compile files in the avx512 directiories
+$(addsuffix .o,$(AVX512_MODULES)): %.o: %.c Makefile
$(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
+$(addsuffix .o,$(AVX512_ASM_MODULES)): %.o: %.s Makefile
+ $(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
# rule to link object files
-
$(MAIN): %: %.o $(addsuffix .o,$(MODULES)) Makefile
$(CLINKER) $< $(addsuffix .o,$(MODULES)) $(LFLAGS) $(LOGOPTION) \
$(addprefix -L,$(LIBPATH)) $(addprefix -l,$(LIBS)) -o $@
diff --git a/devel/linalg/Makefile b/devel/linalg/Makefile
index 76ff701..e13bd0b 100644
--- a/devel/linalg/Makefile
+++ b/devel/linalg/Makefile
@@ -25,7 +25,7 @@ FLAGS = flags lat_parms dfl_parms
LATTICE = bcnds uidx geometry
-LINALG = cmatrix_dble liealg salg salg_dble valg valg_dble
+LINALG = cmatrix_dble liealg salg salg_dble valg valg_dble salg_avx512 salg_dble_avx512
RANDOM = ranlux ranlxs ranlxd gauss
@@ -54,7 +54,7 @@ MDIR = ../../modules
VPATH = .:$(MDIR)/flags:$(MDIR)/lattice:$(MDIR)/random:$(MDIR)/linalg:\
$(MDIR)/utils:$(MDIR)/uflds:$(MDIR)/sflds:$(MDIR)/su3fcts:\
- $(MDIR)/vflds
+ $(MDIR)/vflds:$(MDIR)/linalg/avx512
# additional include directories
@@ -72,10 +72,10 @@ LIBPATH = $(MPI_HOME)/lib
# scheduling and optimization options
CFLAGS = -std=c89 -pedantic -fstrict-aliasing \
- -Wall -Wno-long-long -Wstrict-prototypes -Werror \
- -O -mno-avx -Dx64 -DPM
+ -Wall -Wno-long-long -Wstrict-prototypes \
+ -O2 -DAVX512 -DAVX -DPM
-LFLAGS =
+LFLAGS = $(CFLAGS)
############################## do not change ###################################
@@ -90,24 +90,19 @@ PGMS= $(MAIN) $(MODULES)
# rule to make dependencies
-
$(addsuffix .d,$(PGMS)): %.d: %.c Makefile
@ $(GCC) -ansi $< -MM $(addprefix -I,$(INCPATH)) -o $@
# rule to compile source programs
-
-$(addsuffix .o,$(PGMS)): %.o: %.c Makefile
+$(addsuffix .o,$(MAIN) $(MODULES)): %.o: %.c Makefile
$(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
-
# rule to link object files
-
$(MAIN): %: %.o $(addsuffix .o,$(MODULES)) Makefile
$(CLINKER) $< $(addsuffix .o,$(MODULES)) $(LFLAGS) $(LOGOPTION) \
$(addprefix -L,$(LIBPATH)) $(addprefix -l,$(LIBS)) -o $@
-
# produce executables
mkxeq: $(MAIN)
diff --git a/devel/little/Makefile b/devel/little/Makefile
index 3ab8aee..295f92c 100644
--- a/devel/little/Makefile
+++ b/devel/little/Makefile
@@ -57,10 +57,15 @@ UTILS = endian error hsum mutils utils wspace
VFLDS = vflds vinit vcom vdcom
-MODULES = $(FLAGS) $(LATTICE) $(LINALG) $(LINSOLV) $(RANDOM) $(UFLDS) \
+STD_MODULES = $(FLAGS) $(LATTICE) $(LINALG) $(LINSOLV) $(RANDOM) $(UFLDS) \
$(SU3FCTS) $(UTILS) $(SFLDS) $(TCHARGE) $(SW_TERM) $(DIRAC) \
$(BLOCK) $(SAP) $(ARCHIVE) $(DFL) $(VFLDS) $(LITTLE)
+AVX512_MODULES = Dw_avx512 Dw_dble_avx512 salg_avx512 salg_dble_avx512 \
+ pauli_avx512 pauli_dble_avx512
+
+AVX512_ASM_MODULES = Dw_avx512_asm Dw_dble_avx512_asm salg_avx512_asm \
+ salg_dble_avx512_asm pauli_avx512_asm pauli_dble_avx512_asm
# Logging option (-mpilog or -mpitrace or -mpianim)
@@ -75,7 +80,8 @@ VPATH = .:$(MDIR)/flags:$(MDIR)/lattice:$(MDIR)/linalg:$(MDIR)/linsolv:\
$(MDIR)/random:$(MDIR)/uflds:$(MDIR)/su3fcts:$(MDIR)/utils:\
$(MDIR)/sflds:$(MDIR)/tcharge:$(MDIR)/sw_term:$(MDIR)/dirac:\
$(MDIR)/block:$(MDIR)/sap:$(MDIR)/archive:$(MDIR)/dfl:\
- $(MDIR)/vflds:$(MDIR)/little
+ $(MDIR)/vflds:$(MDIR)/little\
+ $(MDIR)/linalg/avx512:$(MDIR)/dirac/avx512:$(MDIR)/sw_term/avx512
# additional include directories
@@ -93,10 +99,10 @@ LIBPATH = $(MPI_HOME)/lib
# scheduling and optimization options
CFLAGS = -std=c89 -pedantic -fstrict-aliasing \
- -Wall -Wno-long-long -Wstrict-prototypes -Werror \
- -O -mno-avx -Dx64 -DPM
+ -Wall -Wno-long-long -Wstrict-prototypes \
+ -O2 -DAVX512
-LFLAGS =
+LFLAGS = $(CFLAGS)
############################## do not change ###################################
@@ -105,25 +111,39 @@ SHELL=/bin/bash
CC=mpicc
CLINKER=$(CC)
+#Check CFLAGS to find which AVX512 flags are active
+ifneq (,$(findstring AVX512_ASM,$(CFLAGS)))
+MODULES= $(STD_MODULES) $(AVX512_ASM_MODULES)
+else
+ifneq (,$(findstring AVX512,$(CFLAGS)))
+MODULES= $(STD_MODULES) $(AVX512_MODULES)
+else
+MODULES= $(STD_MODULES)
+endif
+endif
+
PGMS= $(MAIN) $(MODULES)
-include $(addsuffix .d,$(PGMS))
# rule to make dependencies
-
$(addsuffix .d,$(PGMS)): %.d: %.c Makefile
@ $(GCC) -ansi $< -MM $(addprefix -I,$(INCPATH)) -o $@
# rule to compile source programs
+$(addsuffix .o,$(MAIN) $(STD_MODULES)): %.o: %.c Makefile
+ $(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
-$(addsuffix .o,$(PGMS)): %.o: %.c Makefile
+# pattern to compile files in the avx512 directiories
+$(addsuffix .o,$(AVX512_MODULES)): %.o: %.c Makefile
$(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
+$(addsuffix .o,$(AVX512_ASM_MODULES)): %.o: %.s Makefile
+ $(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
# rule to link object files
-
$(MAIN): %: %.o $(addsuffix .o,$(MODULES)) Makefile
$(CLINKER) $< $(addsuffix .o,$(MODULES)) $(LFLAGS) $(LOGOPTION) \
$(addprefix -L,$(LIBPATH)) $(addprefix -l,$(LIBS)) -o $@
diff --git a/devel/sap/Makefile b/devel/sap/Makefile
index f56144d..b39f521 100644
--- a/devel/sap/Makefile
+++ b/devel/sap/Makefile
@@ -51,10 +51,15 @@ UFLDS = plaq_sum shift uflds udcom
UTILS = endian error hsum mutils utils wspace
-MODULES = $(FLAGS) $(LATTICE) $(LINALG) $(LINSOLV) $(RANDOM) $(UFLDS) \
+STD_MODULES = $(FLAGS) $(LATTICE) $(LINALG) $(LINSOLV) $(RANDOM) $(UFLDS) \
$(SU3FCTS) $(UTILS) $(SFLDS) $(TCHARGE) $(SW_TERM) $(DIRAC) \
$(BLOCK) $(SAP) $(ARCHIVE)
+AVX512_MODULES = Dw_avx512 Dw_dble_avx512 salg_avx512 salg_dble_avx512 \
+ pauli_avx512 pauli_dble_avx512
+
+AVX512_ASM_MODULES = Dw_avx512_asm Dw_dble_avx512_asm salg_avx512_asm \
+ salg_dble_avx512_asm pauli_avx512_asm pauli_dble_avx512_asm
# Logging option (-mpilog or -mpitrace or -mpianim)
@@ -68,7 +73,8 @@ MDIR = ../../modules
VPATH = .:$(MDIR)/flags:$(MDIR)/lattice:$(MDIR)/linalg:$(MDIR)/linsolv:\
$(MDIR)/random:$(MDIR)/uflds:$(MDIR)/su3fcts:$(MDIR)/utils:\
$(MDIR)/sflds:$(MDIR)/tcharge:$(MDIR)/sw_term:$(MDIR)/dirac:\
- $(MDIR)/block:$(MDIR)/sap:$(MDIR)/archive:
+ $(MDIR)/block:$(MDIR)/sap:$(MDIR)/archive:\
+ $(MDIR)/linalg/avx512:$(MDIR)/dirac/avx512:$(MDIR)/sw_term/avx512
# additional include directories
@@ -86,10 +92,10 @@ LIBPATH = $(MPI_HOME)/lib
# scheduling and optimization options
CFLAGS = -std=c89 -pedantic -fstrict-aliasing \
- -Wall -Wno-long-long -Wstrict-prototypes -Werror \
- -O -mno-avx -Dx64 -DPM
+ -Wall -Wno-long-long -Wstrict-prototypes \
+ -O2 -DAVX512
-LFLAGS =
+LFLAGS = $(CFLAGS)
# -DFGCR_DBG
@@ -100,25 +106,39 @@ SHELL=/bin/bash
CC=mpicc
CLINKER=$(CC)
+#Check CFLAGS to find which AVX512 flags are active
+ifneq (,$(findstring AVX512_ASM,$(CFLAGS)))
+MODULES= $(STD_MODULES) $(AVX512_ASM_MODULES)
+else
+ifneq (,$(findstring AVX512,$(CFLAGS)))
+MODULES= $(STD_MODULES) $(AVX512_MODULES)
+else
+MODULES= $(STD_MODULES)
+endif
+endif
+
PGMS= $(MAIN) $(MODULES)
-include $(addsuffix .d,$(PGMS))
# rule to make dependencies
-
$(addsuffix .d,$(PGMS)): %.d: %.c Makefile
@ $(GCC) -ansi $< -MM $(addprefix -I,$(INCPATH)) -o $@
# rule to compile source programs
+$(addsuffix .o,$(MAIN) $(STD_MODULES)): %.o: %.c Makefile
+ $(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
-$(addsuffix .o,$(PGMS)): %.o: %.c Makefile
+# pattern to compile files in the avx512 directiories
+$(addsuffix .o,$(AVX512_MODULES)): %.o: %.c Makefile
$(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
+$(addsuffix .o,$(AVX512_ASM_MODULES)): %.o: %.s Makefile
+ $(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
# rule to link object files
-
$(MAIN): %: %.o $(addsuffix .o,$(MODULES)) Makefile
$(CLINKER) $< $(addsuffix .o,$(MODULES)) $(LFLAGS) $(LOGOPTION) \
$(addprefix -L,$(LIBPATH)) $(addprefix -l,$(LIBS)) -o $@
diff --git a/devel/sflds/Makefile b/devel/sflds/Makefile
index 111e826..b424540 100644
--- a/devel/sflds/Makefile
+++ b/devel/sflds/Makefile
@@ -37,9 +37,12 @@ UFLDS = uflds
UTILS = endian error hsum mutils utils wspace
-MODULES = $(FLAGS) $(LATTICE) $(RANDOM) $(LINALG) $(UTILS) \
+STD_MODULES = $(FLAGS) $(LATTICE) $(RANDOM) $(LINALG) $(UTILS) \
$(UFLDS) $(SFLDS) $(SU3FCTS)
+AVX512_MODULES = salg_avx512 salg_dble_avx512
+
+AVX512_ASM_MODULES = salg_avx512_asm salg_dble_avx512_asm
# Logging option (-mpilog or -mpitrace or -mpianim)
@@ -51,7 +54,8 @@ LOGOPTION =
MDIR = ../../modules
VPATH = .:$(MDIR)/flags:$(MDIR)/lattice:$(MDIR)/random:$(MDIR)/linalg:\
- $(MDIR)/utils:$(MDIR)/uflds:$(MDIR)/sflds:$(MDIR)/su3fcts
+ $(MDIR)/utils:$(MDIR)/uflds:$(MDIR)/sflds:$(MDIR)/su3fcts\
+ $(MDIR)/linalg/avx512:$(MDIR)/dirac/avx512:$(MDIR)/sw_term/avx512
# additional include directories
@@ -69,10 +73,10 @@ LIBPATH = $(MPI_HOME)/lib
# scheduling and optimization options
CFLAGS = -std=c89 -pedantic -fstrict-aliasing \
- -Wall -Wno-long-long -Wstrict-prototypes -Werror \
- -O -mno-avx -Dx64 -DPM
+ -Wall -Wno-long-long -Wstrict-prototypes \
+ -O2 -DAVX512
-LFLAGS =
+LFLAGS = $(CFLAGS)
############################## do not change ###################################
@@ -81,25 +85,39 @@ SHELL=/bin/bash
CC=mpicc
CLINKER=$(CC)
+#Check CFLAGS to find which AVX512 flags are active
+ifneq (,$(findstring AVX512_ASM,$(CFLAGS)))
+MODULES= $(STD_MODULES) $(AVX512_ASM_MODULES)
+else
+ifneq (,$(findstring AVX512,$(CFLAGS)))
+MODULES= $(STD_MODULES) $(AVX512_MODULES)
+else
+MODULES= $(STD_MODULES)
+endif
+endif
+
PGMS= $(MAIN) $(MODULES)
-include $(addsuffix .d,$(PGMS))
# rule to make dependencies
-
$(addsuffix .d,$(PGMS)): %.d: %.c Makefile
@ $(GCC) -ansi $< -MM $(addprefix -I,$(INCPATH)) -o $@
# rule to compile source programs
+$(addsuffix .o,$(MAIN) $(STD_MODULES)): %.o: %.c Makefile
+ $(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
-$(addsuffix .o,$(PGMS)): %.o: %.c Makefile
+# pattern to compile files in the avx512 directiories
+$(addsuffix .o,$(AVX512_MODULES)): %.o: %.c Makefile
$(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
+$(addsuffix .o,$(AVX512_ASM_MODULES)): %.o: %.s Makefile
+ $(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
# rule to link object files
-
$(MAIN): %: %.o $(addsuffix .o,$(MODULES)) Makefile
$(CLINKER) $< $(addsuffix .o,$(MODULES)) $(LFLAGS) $(LOGOPTION) \
$(addprefix -L,$(LIBPATH)) $(addprefix -l,$(LIBS)) -o $@
diff --git a/devel/sw_term/Makefile b/devel/sw_term/Makefile
index b9c80c4..c7f455f 100644
--- a/devel/sw_term/Makefile
+++ b/devel/sw_term/Makefile
@@ -25,7 +25,7 @@ FLAGS = flags lat_parms dfl_parms
LATTICE = bcnds uidx ftidx geometry
-LINALG = salg_dble liealg cmatrix_dble
+LINALG = salg_dble liealg cmatrix_dble salg_dble_avx512
RANDOM = ranlux ranlxs ranlxd gauss
@@ -33,7 +33,7 @@ SFLDS = sflds
SU3FCTS = chexp su3prod su3ren cm3x3 random_su3
-SW_TERM = pauli pauli_dble swflds sw_term
+SW_TERM = pauli pauli_dble swflds sw_term pauli_avx512 pauli_dble_avx512
TCHARGE = ftcom ftensor
@@ -44,7 +44,6 @@ UTILS = endian error hsum mutils utils wspace
MODULES = $(FLAGS) $(LATTICE) $(LINALG) $(RANDOM) $(UFLDS) \
$(SU3FCTS) $(UTILS) $(SFLDS) $(TCHARGE) $(SW_TERM)
-
# Logging option (-mpilog or -mpitrace or -mpianim)
LOGOPTION =
@@ -56,7 +55,8 @@ MDIR = ../../modules
VPATH = .:$(MDIR)/flags:$(MDIR)/lattice:$(MDIR)/linalg:$(MDIR)/random:\
$(MDIR)/uflds:$(MDIR)/su3fcts:$(MDIR)/utils:$(MDIR)/sflds:\
- $(MDIR)/tcharge:$(MDIR)/sw_term
+ $(MDIR)/tcharge:$(MDIR)/sw_term:\
+ $(MDIR)/linalg/avx512:$(MDIR)/sw_term/avx512
# additional include directories
@@ -74,10 +74,10 @@ LIBPATH = $(MPI_HOME)/lib
# scheduling and optimization options
CFLAGS = -std=c89 -pedantic -fstrict-aliasing \
- -Wall -Wno-long-long -Wstrict-prototypes -Werror \
- -O -mno-avx -Dx64 -DPM
+ -Wall -Wno-long-long -Wstrict-prototypes \
+ -O2 -DAVX512 -DAVX -DPM
-LFLAGS =
+LFLAGS = $(CFLAGS)
############################## do not change ###################################
@@ -91,24 +91,19 @@ PGMS= $(MAIN) $(MODULES)
# rule to make dependencies
-
$(addsuffix .d,$(PGMS)): %.d: %.c Makefile
@ $(GCC) -ansi $< -MM $(addprefix -I,$(INCPATH)) -o $@
# rule to compile source programs
-
-$(addsuffix .o,$(PGMS)): %.o: %.c Makefile
+$(addsuffix .o,$(MAIN) $(MODULES)): %.o: %.c Makefile
$(CC) $< -c $(CFLAGS) $(LOGOPTION) $(addprefix -I,$(INCPATH))
-
# rule to link object files
-
$(MAIN): %: %.o $(addsuffix .o,$(MODULES)) Makefile
$(CLINKER) $< $(addsuffix .o,$(MODULES)) $(LFLAGS) $(LOGOPTION) \
$(addprefix -L,$(LIBPATH)) $(addprefix -l,$(LIBS)) -o $@
-
# produce executables
mkxeq: $(MAIN)
diff --git a/devel/update/Makefile b/devel/update/Makefile
index d3e8910..749ade4 100644
--- a/devel/update/Makefile
+++ b/devel/update/Makefile
@@ -67,11 +67,16 @@ UTILS = endian error hsum mutils utils wspace
VFLDS = vflds vinit vcom vdcom
-MODULES = $(ARCHIVE) $(BLOCK) $(DFL) $(DIRAC) $(FLAGS) $(FORCES) \
+STD_MODULES = $(ARCHIVE) $(BLOCK) $(DFL) $(DIRAC) $(FLAGS) $(FORCES) \
$(LATTICE) $(LINALG) $(LINSOLV) $(LITTLE) $(MDFLDS) $(RANDOM) \
$(RATFCTS) $(SAP) $(SFLDS) $(SU3FCTS) $(SW_TERM) $(TCHARGE) \
$(UFLDS) $(UPDATE) $(UTILS) $(VFLDS)
+AVX512_MODULES = Dw_avx512 Dw_dble_avx512 salg_avx512 salg_dble_avx512 \