23
23
# $HEADER$
24
24
#
25
25
26
- SUBDIRS = profile
27
-
28
26
include $(top_srcdir ) /Makefile.ompi-rules
29
27
30
28
# Note that Automake's Fortran-buidling rules uses CPPFLAGS and
@@ -45,14 +43,14 @@ AM_FCFLAGS = -I$(top_srcdir)/ompi/mpi/fortran/use-mpi-f08/mod \
45
43
$(OMPI_FC_MODULE_FLAG )$(top_builddir ) /ompi/$(OMPI_FORTRAN_USEMPI_DIR ) \
46
44
$(OMPI_FC_MODULE_FLAG ) mod \
47
45
$(OMPI_FC_MODULE_FLAG ) bindings \
48
- -I$(top_srcdir ) -I$(top_builddir ) $(FCFLAGS_f90 ) \
49
- -DOMPI_BUILD_MPI_PROFILING=0
46
+ -I$(top_srcdir ) -I$(top_builddir ) $(FCFLAGS_f90 )
50
47
51
48
MOSTLYCLEANFILES = *.mod
52
49
53
50
CLEANFILES += *.i90
54
51
55
52
lib_LTLIBRARIES = lib@OMPI_LIBMPI_NAME@_usempif08.la
53
+ noinst_LTLIBRARIES = lib@OMPI_LIBMPI_NAME@_usempif08_profile.la
56
54
57
55
module_sentinel_files = \
58
56
mod/libforce_usempif08_internal_modules_to_be_built.la \
@@ -97,9 +95,9 @@ sizeof_f08.f90:
97
95
--complex4=$(OMPI_HAVE_FORTRAN_COMPLEX4 ) \
98
96
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32 )
99
97
100
- profile/ psizeof_f08.f90 : $(top_builddir ) /config.status
101
- profile/ psizeof_f08.f90 : $(sizeof_pl )
102
- profile/ psizeof_f08.f90 :
98
+ psizeof_f08.f90 : $(top_builddir ) /config.status
99
+ psizeof_f08.f90 : $(sizeof_pl )
100
+ psizeof_f08.f90 :
103
101
$(OMPI_V_GEN ) $(sizeof_pl ) \
104
102
--impl=$@ --ierror=optional --pmpi \
105
103
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK ) \
@@ -110,34 +108,25 @@ profile/psizeof_f08.f90:
110
108
--complex4=$(OMPI_HAVE_FORTRAN_COMPLEX4 ) \
111
109
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32 )
112
110
113
- CLEANFILES += sizeof_f08.h sizeof_f08.f90 profile/ psizeof_f08.f90
111
+ CLEANFILES += sizeof_f08.h sizeof_f08.f90 psizeof_f08.f90
114
112
115
113
mpi_api_files = \
116
114
abort_f08.F90 \
117
- accumulate_f08.F90 \
118
115
add_error_class_f08.F90 \
119
116
add_error_code_f08.F90 \
120
117
add_error_string_f08.F90 \
121
118
aint_add_f08.F90 \
122
119
aint_diff_f08.F90 \
123
- allgather_f08.F90 \
124
120
allgather_init_f08.F90 \
125
- allgatherv_f08.F90 \
126
121
allgatherv_init_f08.F90 \
127
122
alloc_mem_f08.F90 \
128
- allreduce_f08.F90 \
129
123
allreduce_init_f08.F90 \
130
- alltoall_f08.F90 \
131
124
alltoall_init_f08.F90 \
132
- alltoallv_f08.F90 \
133
125
alltoallv_init_f08.F90 \
134
- alltoallw_f08.F90 \
135
126
alltoallw_init_f08.F90 \
136
127
barrier_f08.F90 \
137
128
barrier_init_f08.F90 \
138
- bcast_f08.F90 \
139
129
bcast_init_f08.F90 \
140
- bsend_f08.F90 \
141
130
bsend_init_f08.F90 \
142
131
buffer_attach_f08.F90 \
143
132
buffer_detach_f08.F90 \
@@ -255,7 +244,6 @@ mpi_api_files = \
255
244
file_write_at_all_end_f08.F90 \
256
245
file_write_at_all_f08.F90 \
257
246
file_write_at_f08.F90 \
258
- file_write_f08.F90 \
259
247
file_write_ordered_begin_f08.F90 \
260
248
file_write_ordered_end_f08.F90 \
261
249
file_write_ordered_f08.F90 \
@@ -334,15 +322,13 @@ mpi_api_files = \
334
322
intercomm_create_from_groups_f08.F90 \
335
323
intercomm_merge_f08.F90 \
336
324
iprobe_f08.F90 \
337
- irecv_f08.F90 \
338
325
ireduce_f08.F90 \
339
326
ireduce_scatter_f08.F90 \
340
327
ireduce_scatter_block_f08.F90 \
341
328
irsend_f08.F90 \
342
329
iscan_f08.F90 \
343
330
iscatter_f08.F90 \
344
331
iscatterv_f08.F90 \
345
- isend_f08.F90 \
346
332
isendrecv_f08.F90 \
347
333
isendrecv_replace_f08.F90 \
348
334
issend_f08.F90 \
@@ -380,9 +366,7 @@ mpi_api_files = \
380
366
put_f08.F90 \
381
367
query_thread_f08.F90 \
382
368
raccumulate_f08.F90 \
383
- recv_f08.F90 \
384
369
recv_init_f08.F90 \
385
- reduce_f08.F90 \
386
370
reduce_init_f08.F90 \
387
371
reduce_local_f08.F90 \
388
372
reduce_scatter_f08.F90 \
@@ -403,7 +387,6 @@ mpi_api_files = \
403
387
scatter_init_f08.F90 \
404
388
scatterv_f08.F90 \
405
389
scatterv_init_f08.F90 \
406
- send_f08.F90 \
407
390
send_init_f08.F90 \
408
391
sendrecv_f08.F90 \
409
392
sendrecv_replace_f08.F90 \
@@ -427,7 +410,6 @@ mpi_api_files = \
427
410
status_set_elements_f08.F90 \
428
411
status_set_elements_x_f08.F90 \
429
412
testall_f08.F90 \
430
- testany_f08.F90 \
431
413
test_cancelled_f08.F90 \
432
414
test_f08.F90 \
433
415
testsome_f08.F90 \
@@ -468,13 +450,11 @@ mpi_api_files = \
468
450
unpack_external_f08.F90 \
469
451
unpack_f08.F90 \
470
452
unpublish_name_f08.F90 \
471
- waitall_f08.F90 \
472
453
waitany_f08.F90 \
473
454
wait_f08.F90 \
474
455
waitsome_f08.F90 \
475
456
win_allocate_f08.F90 \
476
457
win_allocate_shared_f08.F90 \
477
- win_attach_f08.F90 \
478
458
win_call_errhandler_f08.F90 \
479
459
win_complete_f08.F90 \
480
460
win_create_dynamic_f08.F90 \
@@ -508,28 +488,25 @@ mpi_api_files = \
508
488
win_test_f08.F90 \
509
489
win_unlock_f08.F90 \
510
490
win_unlock_all_f08.F90 \
511
- win_wait_f08.F90
512
-
513
- # JMS Somehow this variable substitution isn't quite working, and I
514
- # don't have time to figure it out. So just wholesale copy the file
515
- # list. :-(
516
- # pmpi_api_files = $(mpi_api_files:%=profile/p%)
491
+ win_wait_f08.F90 \
492
+ api_f08_generated.F90
517
493
518
494
lib@OMPI_LIBMPI_NAME@_usempif08_la_SOURCES = \
519
495
$(mpi_api_files ) \
520
496
mpi-f08.F90
521
497
522
- # These are generated; do not ship them
523
- nodist_lib@OMPI_LIBMPI_NAME@_usempif08_la_SOURCES =
524
-
525
498
if BUILD_FORTRAN_SIZEOF
526
499
SIZEOF_H = sizeof_f08.h
527
- nodist_lib@OMPI_LIBMPI_NAME@_usempif08_la_SOURCES + = \
500
+ nodist_lib@OMPI_LIBMPI_NAME@_usempif08_la_SOURCES = \
528
501
sizeof_f08.h \
529
502
sizeof_f08.f90 \
530
- profile/ psizeof_f08.f90
503
+ psizeof_f08.f90
531
504
endif
532
505
506
+ lib@OMPI_LIBMPI_NAME@_usempif08_la_FCFLAGS = \
507
+ $(AM_FCFLAGS ) \
508
+ -DOMPI_BUILD_MPI_PROFILING=0
509
+
533
510
#
534
511
# Include the mpi_f08-based MPI extensions in libmpi_usempif08, too.
535
512
#
@@ -539,13 +516,20 @@ endif
539
516
#
540
517
541
518
lib@OMPI_LIBMPI_NAME@_usempif08_la_LIBADD = \
542
- profile/libmpi_usempif08_pmpi .la \
519
+ lib@OMPI_LIBMPI_NAME@_usempif08_profile .la \
543
520
$(OMPI_MPIEXT_USEMPIF08_LIBS ) \
544
521
$(top_builddir ) /ompi/mpi/fortran/mpif-h/lib@OMPI_LIBMPI_NAME@_mpifh.la \
545
522
$(top_builddir ) /ompi/lib@
[email protected] \
546
523
mod/libusempif08_internal_modules.la \
547
524
base/libusempif08_ccode.la
548
- lib@OMPI_LIBMPI_NAME@_usempif08_la_DEPENDENCIES = $(module_sentinel_files )
525
+
526
+ #
527
+ # Make sure to build the profile library before this library, since adding it
528
+ # to LIBADD doesn't enforce any ordering
529
+ #
530
+ lib@OMPI_LIBMPI_NAME@_usempif08_la_DEPENDENCIES = \
531
+ $(module_sentinel_files ) \
532
+ lib@OMPI_LIBMPI_NAME@_usempif08_profile.la
549
533
lib@OMPI_LIBMPI_NAME@_usempif08_la_LDFLAGS = -version-info $(libmpi_usempif08_so_version )
550
534
551
535
#
@@ -558,6 +542,44 @@ mpi_api_lo_files = $(mpi_api_files:.F90=.lo)
558
542
$(mpi_api_lo_files ) : bindings/libforce_usempif08_internal_bindings_to_be_built.la
559
543
560
544
mpi-f08.lo : $(module_sentinel_files ) $(SIZEOF_H )
545
+ mpi-f08.F90 : $(SIZEOF_H )
546
+
547
+ #
548
+ # Profiling interface
549
+ #
550
+
551
+ lib@OMPI_LIBMPI_NAME@_usempif08_profile_la_SOURCES = \
552
+ $(mpi_api_files )
553
+
554
+ lib@OMPI_LIBMPI_NAME@_usempif08_profile_la_FCFLAGS = \
555
+ $(AM_FCFLAGS ) \
556
+ -DOMPI_BUILD_MPI_PROFILING=1
557
+
558
+
559
+ #
560
+ # Generate the Fortran bindings and C wrapper functions for bindings with a
561
+ # *.in template.
562
+ #
563
+
564
+ if OMPI_GENERATE_BINDINGS
565
+
566
+ include Makefile.prototype_files
567
+
568
+ api_f08_generated.F90 : $(prototype_files )
569
+ $(OMPI_V_GEN ) $(PYTHON ) $(top_srcdir ) /ompi/mpi/bindings/bindings.py \
570
+ --builddir $(abs_top_builddir ) \
571
+ --srcdir $(abs_top_srcdir ) \
572
+ --output $(abs_builddir ) /$@ \
573
+ fortran \
574
+ code \
575
+ --lang fortran \
576
+ --prototype-files $(ready_prototype_files )
577
+
578
+ EXTRA_DIST = $(extra_dist_prototype_files )
579
+
580
+ # Delete generated file on maintainer-clean
581
+ MAINTAINERCLEANFILES = api_f08_generated.F90
582
+ endif
561
583
562
584
# ##########################################################################
563
585
0 commit comments