impi-devel 2021.14.0__py2.py3-none-manylinux_2_28_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of impi-devel might be problematic. Click here for more details.

@@ -0,0 +1,661 @@
1
+ #! /bin/sh
2
+ #
3
+ # Copyright Intel Corporation.
4
+ #
5
+ # This software and the related documents are Intel copyrighted materials, and
6
+ # your use of them is governed by the express license under which they were
7
+ # provided to you (License). Unless the License provides otherwise, you may
8
+ # not use, modify, copy, publish, distribute, disclose or transmit this
9
+ # software or the related documents without Intel's prior written permission.
10
+ #
11
+ # This software and the related documents are provided as is, with no express
12
+ # or implied warranties, other than those that are expressly stated in the
13
+ # License.
14
+ ##
15
+ ## Copyright (C) by Argonne National Laboratory
16
+ #
17
+ # COPYRIGHT
18
+ #
19
+ # The following is a notice of limited availability of the code, and disclaimer
20
+ # which must be included in the prologue of the code and in all source listings
21
+ # of the code.
22
+ #
23
+ # Copyright Notice
24
+ # 1998--2020, Argonne National Laboratory
25
+ #
26
+ # Permission is hereby granted to use, reproduce, prepare derivative works, and
27
+ # to redistribute to others. This software was authored by:
28
+ #
29
+ # Mathematics and Computer Science Division
30
+ # Argonne National Laboratory, Argonne IL 60439
31
+ #
32
+ # (and)
33
+ #
34
+ # Department of Computer Science
35
+ # University of Illinois at Urbana-Champaign
36
+ #
37
+ #
38
+ # GOVERNMENT LICENSE
39
+ #
40
+ # Portions of this material resulted from work developed under a U.S.
41
+ # Government Contract and are subject to the following license: the Government
42
+ # is granted for itself and others acting on its behalf a paid-up, nonexclusive,
43
+ # irrevocable worldwide license in this computer software to reproduce, prepare
44
+ # derivative works, and perform publicly and display publicly.
45
+ #
46
+ # DISCLAIMER
47
+ #
48
+ # This computer code material was prepared, in part, as an account of work
49
+ # sponsored by an agency of the United States Government. Neither the United
50
+ # States, nor the University of Chicago, nor any of their employees, makes any
51
+ # warranty express or implied, or assumes any legal liability or responsibility
52
+ # for the accuracy, completeness, or usefulness of any information, apparatus,
53
+ # product, or process disclosed, or represents that its use would not infringe
54
+ # privately owned rights.
55
+ #
56
+ # EXTERNAL CONTRIBUTIONS
57
+ #
58
+ # Portions of this code have been contributed under the above license by:
59
+ #
60
+ # * Intel Corporation
61
+ # * Cray
62
+ # * IBM Corporation
63
+ # * Microsoft Corporation
64
+ # * Mellanox Technologies Ltd.
65
+ # * DataDirect Networks.
66
+ # * Oak Ridge National Laboratory
67
+ # * Sun Microsystems, Lustre group
68
+ # * Dolphin Interconnect Solutions Inc.
69
+ # * Institut Polytechnique de Bordeaux
70
+ #
71
+ ##
72
+ ##
73
+
74
+ # Simple script to compile and/or link MPI programs.
75
+ # This script knows the default flags and libraries, and can handle
76
+ # alternative C compilers and the associated flags and libraries.
77
+ # The important terms are:
78
+ # includedir, libdir - Directories containing an *installed* mpich
79
+ # prefix, execprefix - Often used to define includedir and libdir
80
+ # CC - C compiler
81
+ # WRAPPER_CFLAGS - Any special flags needed to compile
82
+ # WRAPPER_LDFLAGS - Any special flags needed to link
83
+ # WRAPPER_LIBS - Any special libraries needed in order to link
84
+ #
85
+ # We assume that (a) the C compiler can both compile and link programs
86
+ #
87
+ # Handling of command-line options:
88
+ # This is a little tricky because some options may contain blanks.
89
+ #
90
+ # Special issues with shared libraries - todo
91
+ #
92
+ # --------------------------------------------------------------------------
93
+ # Set the default values of all variables.
94
+ #
95
+ # Directory locations: Fixed for any MPI implementation.
96
+ # Set from the directory arguments to configure (e.g., --prefix=/usr/local)
97
+ prefix=I_MPI_SUBSTITUTE_INSTALLDIR
98
+ # The environment variable I_MPI_ROOT may be used to override installation folder path
99
+ if [ -n "${I_MPI_ROOT}" ] ; then
100
+ prefix="${I_MPI_ROOT}";
101
+ fi
102
+
103
+ exec_prefix=__EXEC_PREFIX_TO_BE_FILLED_AT_INSTALL_TIME__
104
+ sysconfdir=${prefix}/etc
105
+ includedir=${prefix}/include
106
+ libdir=${prefix}/lib
107
+
108
+ if [ ! -f "${prefix}/lib/mpi/debug/libmpi.so" ]; then
109
+ release_lib_dir="/release"
110
+ debug_lib_dir="/debug"
111
+ else
112
+ sysconfdir=${prefix}/opt/mpi/etc
113
+ release_lib_dir=""
114
+ debug_lib_dir="/mpi/debug"
115
+ fi
116
+ MPILIBDIR=${release_lib_dir}
117
+ # The environment variable I_MPI_COMPILER_CONFIG_DIR may be used to override
118
+ # folder where *.conf files are placed
119
+ if [ -n "$I_MPI_COMPILER_CONFIG_DIR" ] ; then
120
+ sysconfdir=$I_MPI_COMPILER_CONFIG_DIR;
121
+ fi
122
+ # Default settings for compiler, flags, and libraries.
123
+ # Determined by a combination of environment variables and tests within
124
+ # configure (e.g., determining whehter -lsocket is needee)
125
+ CC="gcc"
126
+ MPICH_VERSION="3.4a2"
127
+ CFLAGS=""
128
+ CPPFLAGS=""
129
+ MPIVERSION="2021.14"
130
+ MPILIBNAME="mpi"
131
+
132
+
133
+ # How to pass a linker flag through the compiler.
134
+ wl="-Wl,"
135
+
136
+ # Static library suffix (normally "a").
137
+ libext="a"
138
+
139
+ # Shared library suffix (normally "so").
140
+ shlibext="so"
141
+
142
+ # Format of library name prefix.
143
+ libname_spec="lib\$name"
144
+
145
+ # Library names that the linker finds when passed -lNAME.
146
+ library_names_spec="\$libname\$shrext"
147
+
148
+ # Flag to hardcode $libdir into a binary during linking.
149
+ # This must work even if $libdir does not exist.
150
+ hardcode_libdir_flag_spec="\${wl}-rpath \${wl}\$libdir"
151
+
152
+ # Flag to add dtags to allow using runpath instead of rpath
153
+ enable_dtags_flag="-Wl,--enable-new-dtags"
154
+ disable_dtags_flag="-Wl,--disable-new-dtags"
155
+
156
+ # Whether we need a single -rpath flag with a separated argument.
157
+ hardcode_libdir_separator=""
158
+
159
+ # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
160
+ # resulting binary.
161
+ hardcode_direct="no"
162
+
163
+ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
164
+ # resulting binary.
165
+ hardcode_minus_L="no"
166
+
167
+
168
+ strip_debug_info=
169
+ handle_executable=
170
+ fortran_binding=
171
+ executable=a.out
172
+ static_log=yes
173
+ ilp64=no
174
+ trace_opt=no
175
+ no_rpath=no
176
+ # Attempt to construct dynamic loading info, based on the user
177
+ # preference of rpath, runpath or none and on the detected libdir
178
+ # flags.
179
+ with_wrapper_dl_type=no
180
+ if test "X${with_wrapper_dl_type}" = "Xrunpath" ; then
181
+ eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${enable_dtags_flag}\"
182
+ elif test "X${with_wrapper_dl_type}" = "Xrpath" ; then
183
+ eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${disable_dtags_flag}\"
184
+ else
185
+ wrapper_dl_type_flags=""
186
+ fi
187
+
188
+ # Internal variables
189
+ # Show is set to echo to cause the compilation command to be echoed instead
190
+ # of executed.
191
+ Show=eval
192
+ #
193
+ # End of initialization of variables
194
+ #---------------------------------------------------------------------
195
+ # Environment Variables.
196
+ ## The environment variables I_MPI_CC, MPICH_CC may be used to override the
197
+ # default choices. I_MPI_CC has higher priority than MPICH_CC.
198
+ # In addition, if there is a file $sysconfdir/mpicc-$CCname.conf,
199
+ # where CCname is the name of the compiler with all spaces replaced by hyphens
200
+ # (e.g., "cc -64" becomes "cc--64", that file is sources, allowing other
201
+ # changes to the compilation environment. See the variables used by the
202
+ # script (defined above)
203
+ # Added MPICH_CC_OLD, MPICH_CC can be used to prefix CC with external utility,
204
+ # e.g. setenv MPICH_CC 'eval linkcache $MPICH_CC_OLD'
205
+ if [ -n "$I_MPI_CFLAGS" ] ; then
206
+ CFLAGS=" "$I_MPI_CFLAGS
207
+ fi
208
+ if [ -n "$I_MPI_LDFLAGS" ] ; then
209
+ LDFLAGS=" -ldl "$I_MPI_LDFLAGS
210
+ fi
211
+ if [ -n "$I_MPI_CC" ] ; then
212
+ CC="$I_MPI_CC"
213
+
214
+ CCname=`echo $CC | sed 's/ /-/g'`
215
+ if [ -s $sysconfdir/mpicc-$(basename $CCname).conf ] ; then
216
+ . $sysconfdir/mpicc-$(basename $CCname).conf
217
+ fi
218
+ else
219
+ if [ -n "$MPICH_CC" ] ; then
220
+ CC="$MPICH_CC"
221
+ CCname=`echo $CC | sed 's/ /-/g'`
222
+ if [ -s $sysconfdir/mpicc-$(basename $CCname).conf ] ; then
223
+ . $sysconfdir/mpicc-$(basename $CCname).conf
224
+ fi
225
+ fi
226
+ fi
227
+ if [ -n "$I_MPI_DEBUG_INFO_STRIP" ] ; then
228
+ for comp_val in "0" "off" "no" "disable"
229
+ do
230
+ if [ "$I_MPI_DEBUG_INFO_STRIP" = "$comp_val" ] ; then
231
+ strip_debug_info=no
232
+ break
233
+ fi
234
+ done
235
+ fi
236
+ if [ -n "$I_MPI_FORT_BIND" ] ; then
237
+ for comp_val in "0" "off" "no" "disable"
238
+ do
239
+ if [ "$I_MPI_FORT_BIND" = "$comp_val" ] ; then
240
+ fortran_binding=no
241
+ break
242
+ fi
243
+ done
244
+ fi
245
+ # Allow a profiling option to be selected through an environment variable
246
+ if [ -n "$MPICC_PROFILE" ] ; then
247
+ profConf=$MPICC_PROFILE
248
+ fi
249
+ if [ -n "$I_MPI_CC_PROFILE" ] ; then
250
+ profConf=$I_MPI_CC_PROFILE
251
+ fi
252
+
253
+ # Override default mpi library
254
+ if [ -n "$I_MPI_LINK" ] ; then
255
+ mpilib_override=$I_MPI_LINK
256
+ fi
257
+
258
+ #
259
+ # ------------------------------------------------------------------------
260
+ # Argument processing.
261
+ # This is somewhat awkward because of the handling of arguments within
262
+ # the shell. We want to handle arguments that include spaces without
263
+ # loosing the spacing (an alternative would be to use a more powerful
264
+ # scripting language that would allow us to retain the array of values,
265
+ # which the basic (rather than enhanced) Bourne shell does not.
266
+ #
267
+ # Look through the arguments for arguments that indicate compile only.
268
+ # If these are *not* found, add the library options
269
+
270
+ linking=yes
271
+ allargs=""
272
+ argno=0
273
+ interlib_deps=yes
274
+ static_mpi=no
275
+ for arg in "$@" ; do
276
+ # Set addarg to no if this arg should be ignored by the C compiler
277
+ addarg=yes
278
+ qarg=$arg
279
+ if [ "x$handle_executable" = "xyes" ] ; then
280
+ executable=$arg
281
+ handle_executable=
282
+ fi
283
+ case "$arg" in
284
+
285
+ # ----------------------------------------------------------------
286
+ # Compiler options that affect whether we are linking or no
287
+ -c|-S|-E|-M|-MM)
288
+ # The compiler links by default
289
+ linking=no
290
+ ;;
291
+ -o )
292
+ handle_executable=yes
293
+ addarg=yes
294
+ ;;
295
+ # ----------------------------------------------------------------
296
+ # Options that control how we use mpicc (e.g., -show,
297
+ # -cc=* -config=*
298
+ -static)
299
+ CFLAGS="$CFLAGS -Xlinker --export-dynamic"
300
+ static_mpi=yes
301
+ addarg=no
302
+ interlib_deps=no
303
+ ;;
304
+ -static-mpi)
305
+ interlib_deps=no
306
+ static_mpi=yes
307
+ addarg=no
308
+ CFLAGS="$CFLAGS -Xlinker --export-dynamic"
309
+ ;;
310
+ -echo)
311
+ addarg=no
312
+ set -x
313
+ ;;
314
+ -cc=*)
315
+ CC=`echo A$arg | sed -e 's/A-cc=//g'`
316
+ addarg=no
317
+ ;;
318
+ -show)
319
+ addarg=no
320
+ Show=echo
321
+ ;;
322
+ -config=*)
323
+ addarg=no
324
+ CCname=`echo A$arg | sed -e 's/A-config=//g'`
325
+ if [ -s "$sysconfdir/mpicc-$CCname.conf" ] ; then
326
+ . "$sysconfdir/mpicc-$CCname.conf"
327
+ else
328
+ echo "Configuration file mpicc-$CCname.conf not found"
329
+ fi
330
+ ;;
331
+ -compile-info|-compile_info)
332
+ # -compile_info included for backward compatibility
333
+ Show=echo
334
+ addarg=no
335
+ ;;
336
+ -link-info|-link_info)
337
+ # -link_info included for backward compatibility
338
+ Show=echo
339
+ addarg=no
340
+ ;;
341
+ -v)
342
+ # Pass this argument to the compiler as well.
343
+ echo "$(basename $0) for the Intel(R) MPI Library $MPIVERSION for Linux*"
344
+ echo "Copyright Intel Corporation."
345
+ # if there is only 1 argument, it must be -v.
346
+ if [ "$#" -eq "1" ] ; then
347
+ linking=no
348
+ fi
349
+ ;;
350
+ -profile=*)
351
+ # Pass the name of a profiling configuration. As
352
+ # a special case, lib<name>.so or lib<name>.la may be used
353
+ # if the library is in $libdir
354
+ profConf=`echo A$arg | sed -e 's/A-profile=//g'`
355
+ addarg=no
356
+ # Loading the profConf file is handled below
357
+ ;;
358
+ -help)
359
+ # Print mini-help if started without parameters
360
+ echo "Simple script to compile and/or link MPI programs."
361
+ echo "Usage: `basename $0` [options] <files>"
362
+ echo "----------------------------------------------------------------------------"
363
+ echo "The following options are supported:"
364
+ echo " -cc=<name> specify a C compiler name: i.e. -cc=gcc"
365
+ echo " -echo print the scripts during their execution"
366
+ echo " -show show command lines without real calling"
367
+ echo " -config=<name> specify a configuration file: i.e. -config=gcc for mpicc-gcc.conf file"
368
+ echo " -v print version info of $(basename $0) and its native compiler"
369
+ echo " -profile=<name> specify a profile configuration file (an MPI profiling"
370
+ echo " library): i.e. -profile=myprofile for the myprofile.cfg file."
371
+ echo " As a special case, lib<name>.so or lib<name>.a may be used"
372
+ echo " if the library is found"
373
+ echo " -check_mpi link against the Intel(R) Trace Collector (-profile=vtmc)."
374
+ echo " -static_mpi link the Intel(R) MPI Library statically"
375
+ echo " -mt_mpi link the thread safe version of the Intel(R) MPI Library"
376
+ echo " -ilp64 link the ILP64 support of the Intel(R) MPI Library"
377
+ echo " -t or -trace"
378
+ echo " link against the Intel(R) Trace Collector"
379
+ echo " -trace-imbalance"
380
+ echo " link against the Intel(R) Trace Collector imbalance library"
381
+ echo " (-profile=vtim)"
382
+ echo " -dynamic_log link against the Intel(R) Trace Collector dynamically"
383
+ echo " -static use static linkage method"
384
+ echo " -nostrip turn off the debug information stripping during static linking"
385
+ echo " -nofortran or -nofortbind"
386
+ echo " disable the linkage Fortran bindings"
387
+ echo " -O enable optimization"
388
+ echo " -link_mpi=<name>"
389
+ echo " link against the specified version of the Intel(R) MPI Library"
390
+ echo " i.e -link_mpi=opt|opt_mt|dbg|dbg_mt"
391
+ echo " -norpath disable rpath for compiler wrapper of the Intel(R) MPI Library"
392
+ echo "All other options will be passed to the compiler without changing."
393
+ echo "----------------------------------------------------------------------------"
394
+ echo "The following environment variables are used:"
395
+ echo " I_MPI_ROOT the Intel(R) MPI Library installation directory path"
396
+ echo " I_MPI_CC or MPICH_CC"
397
+ echo " the path/name of the underlying compiler to be used"
398
+ echo " I_MPI_CC_PROFILE or MPICC_PROFILE"
399
+ echo " the name of profile file (without extension)"
400
+ echo " I_MPI_COMPILER_CONFIG_DIR"
401
+ echo " the folder which contains configuration files *.conf"
402
+ echo " I_MPI_TRACE_PROFILE"
403
+ echo " specify a default profile for the -trace option"
404
+ echo " I_MPI_CHECK_PROFILE"
405
+ echo " specify a default profile for the -check_mpi option"
406
+ echo " I_MPI_LINK specify the version of the Intel(R) MPI Library"
407
+ echo " I_MPI_DEBUG_INFO_STRIP"
408
+ echo " turn on/off the debug information stripping during static linking"
409
+ echo " I_MPI_CFLAGS"
410
+ echo " special flags needed for compilation"
411
+ echo " I_MPI_LDFLAGS "
412
+ echo " special flags needed for linking"
413
+ echo " I_MPI_FORT_BIND"
414
+ echo " disable the linkage Fortran bindings"
415
+ echo "----------------------------------------------------------------------------"
416
+ exit 0
417
+ ;;
418
+ -nolinkage)
419
+ # This internal option is used by wrapper driver scripts mpicc, mpicxx, mpifc when -v option is used.
420
+ linking=no
421
+ addarg=no
422
+ ;;
423
+ -g)
424
+ MPILIBDIR=${release_lib_dir}
425
+ ;;
426
+ -static_log)
427
+ static_log=yes
428
+ addarg=no
429
+ ;;
430
+ -dynamic_log)
431
+ static_log=no
432
+ addarg=no
433
+ ;;
434
+ -mt_mpi)
435
+ addarg=no
436
+ ;;
437
+ -ilp64)
438
+ ilp64=yes
439
+ addarg=no
440
+ ;;
441
+ -check_mpi)
442
+ if [ -z "$profConf" ]; then
443
+ if [ -z "$I_MPI_CHECK_PROFILE" ]; then
444
+ profConf="vtmc"
445
+ else
446
+ profConf="$I_MPI_CHECK_PROFILE"
447
+ fi
448
+ else
449
+ echo "Warning: the -check_mpi option will be ignored because the profile was set."
450
+ fi
451
+ addarg=no
452
+ ;;
453
+ -trace-imbalance)
454
+ if [ -z "$profConf" ]; then
455
+ profConf="vtim"
456
+ else
457
+ echo "Warning: the -trace-imbalance option will be ignored because the profile was set."
458
+ fi
459
+ addarg=no
460
+ ;;
461
+ -t | -trace | -t=* | -trace=* )
462
+ if [ -z "$profConf" ]; then
463
+ if [ -z "$I_MPI_TRACE_PROFILE" ]; then
464
+ profConf="vt"
465
+ else
466
+ profConf="$I_MPI_TRACE_PROFILE"
467
+ fi
468
+ else
469
+ echo "Warning: the -trace option will be ignored because the profile was set."
470
+ fi
471
+ addarg=no
472
+ ;;
473
+ -nativelinking)
474
+ # Internal option to use native compiler for linking without MPI libraries
475
+ nativelinking=yes
476
+ addarg=no
477
+ ;;
478
+ -link_mpi=* )
479
+ mpilib_override=`echo A$arg | sed -e 's/A-link_mpi=//g'`
480
+ addarg=no
481
+ ;;
482
+ -mmic )
483
+ addarg=no
484
+ ;;
485
+ -nostrip )
486
+ strip_debug_info=no
487
+ addarg=no
488
+ ;;
489
+ -nofortran | -nofortbind)
490
+ fortran_binding=no
491
+ ;;
492
+ -norpath )
493
+ no_rpath=yes
494
+ addarg=no
495
+ ;;
496
+ # Other arguments. We are careful to handle arguments with
497
+ # quotes (we try to quote all arguments in case they include
498
+ # any spaces)
499
+ *\"*)
500
+ qarg="'"$arg"'"
501
+ ;;
502
+ *\'*)
503
+ qarg=`echo \"$arg\"`
504
+ ;;
505
+ *)
506
+ qarg="'$arg'"
507
+ ;;
508
+ esac
509
+ if [ $addarg = yes ] ; then
510
+ allargs="$allargs $qarg"
511
+ fi
512
+ done
513
+
514
+ if [ $# -eq 0 ] ; then
515
+ echo "Error: Command line argument is needed!"
516
+ "$0" -help
517
+ exit 1
518
+ fi
519
+
520
+ if [ -n "$mpilib_override" ] ; then
521
+ case "$mpilib_override" in
522
+ opt )
523
+ MPILIBDIR=${release_lib_dir}
524
+ ;;
525
+ opt_mt )
526
+ MPILIBDIR=${release_lib_dir}
527
+ ;;
528
+ dbg )
529
+ MPILIBDIR=${debug_lib_dir}
530
+ ;;
531
+ dbg_mt )
532
+ MPILIBDIR=${debug_lib_dir}
533
+ ;;
534
+ * )
535
+ echo "Warning: incorrect library version specified. Automatically selected library will be used."
536
+ ;;
537
+ esac
538
+ fi
539
+ # -----------------------------------------------------------------------
540
+
541
+ if [ "$static_mpi" = yes ] ; then
542
+ if [ "x$fortran_binding" = "x" ]; then
543
+ mpilibs="${libdir}/libmpifort.a ${libdir}${MPILIBDIR}/lib${MPILIBNAME}.a"
544
+ else
545
+ mpilibs="${libdir}${MPILIBDIR}/lib${MPILIBNAME}.a"
546
+ fi
547
+ I_MPI_OTHERLIBS=" -lrt -lpthread "
548
+ if [ "$ilp64" = yes ]; then
549
+ mpilibs="$libdir/libmpi_ilp64.a $mpilibs"
550
+ fi
551
+ if [ "x$strip_debug_info" = "x" ] ; then
552
+ strip_debug_info=yes
553
+ fi
554
+ else
555
+ if [ "x$fortran_binding" = "x" ]; then
556
+ mpilibs="-lmpifort -l$MPILIBNAME"
557
+ else
558
+ mpilibs="-l$MPILIBNAME"
559
+ fi
560
+ I_MPI_OTHERLIBS=" -lrt -lpthread "
561
+ if [ "$ilp64" = yes ]; then
562
+ mpilibs="-lmpi_ilp64 $mpilibs"
563
+ fi
564
+ fi
565
+
566
+ # -----------------------------------------------------------------------
567
+ # Derived variables. These are assembled from variables set from the
568
+ # default, environment, configuration file (if any) and command-line
569
+ # options (if any)
570
+
571
+ PROFILE_FOO=
572
+ # Handle the case of a profile switch
573
+ if [ -n "$profConf" ] ; then
574
+ profConffile=
575
+ if [ -s "$libdir/lib$profConf.a" -o -s "$libdir/lib$profConf.so" ] ; then
576
+ PROFILE_FOO="-l$profConf"
577
+ mpilibs="-l$profConf $mpilibs"
578
+ elif [ -s "$sysconfdir/$profConf.conf" ] ; then
579
+ profConffile="$sysconfdir/$profConf.conf"
580
+ elif [ -s "$profConf.conf" ] ; then
581
+ profConffile="$profConf.conf"
582
+ else
583
+ echo "Profiling configuration file $profConf.conf not found in $sysconfdir"
584
+ fi
585
+ if [ -n "$profConffile" -a -s "$profConffile" ] ; then
586
+ . $profConffile
587
+ if [ -n "$PROFILE_INCPATHS" ] ; then
588
+ CFLAGS="$PROFILE_INCPATHS $CFLAGS"
589
+ fi
590
+ if [ -n "$PROFILE_PRELIB" ] ; then
591
+ mpilibs="$PROFILE_PRELIB $mpilibs"
592
+ fi
593
+ if [ -n "$PROFILE_POSTLIB" ] ; then
594
+ mpilibs="$mpilibs $PROFILE_POSTLIB"
595
+ fi
596
+ fi
597
+ fi
598
+ final_cflags=" "
599
+ if [ "${static_mpi}" = "yes" ] ; then
600
+ final_cflags=" -Xlinker --export-dynamic "
601
+ else
602
+ final_cflags=" "
603
+ fi
604
+ final_cppflags=" "
605
+ final_ldflags=" -Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -Xlinker --enable-new-dtags -ldl "
606
+ final_libs="-lpthread -lrt "
607
+
608
+ # -----------------------------------------------------------------------
609
+ #
610
+ # A temporary statement to invoke the compiler
611
+ # Place the -L before any args incase there are any mpi libraries in there.
612
+ # Eventually, we'll want to move this after any non-MPI implementation
613
+ # libraries.
614
+ # We use a single invocation of the compiler. This will be adequate until
615
+ # we run into a system that uses a separate linking command. With any luck,
616
+ # such archaic systems are no longer with us. This also lets us
617
+ # accept any argument; we don't need to know if we've seen a source
618
+ # file or an object file. Instead, we just check for an option that
619
+ # suppressing linking, such as -c or -M.
620
+ if [ "$no_rpath" = "yes" ]; then
621
+ rpath_opt="-Xlinker --enable-new-dtags"
622
+ else
623
+ rpath_opt="-Xlinker --enable-new-dtags -Xlinker -rpath -Xlinker \"${libdir}${MPILIBDIR}\" -Xlinker -rpath -Xlinker \"${libdir}\""
624
+ fi
625
+
626
+ if [ "$linking" = yes ] ; then
627
+ if [ "$nativelinking" = yes ] ; then
628
+ $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} $allargs -I\"${includedir}\"
629
+ rc=$?
630
+ else
631
+ $Show $CC $CPPFLAGS $CFLAGS $allargs -I\"${includedir}\" -L\"${libdir}${MPILIBDIR}\" -L\"${libdir}\" $rpath_opt $mpilibs $I_MPI_OTHERLIBS ${final_ldflags}
632
+ rc=$?
633
+
634
+ if [ $rc -eq 0 -a "x$strip_debug_info" = "xyes" ] ; then
635
+ $Show objcopy --only-keep-debug ${executable} ${executable}.dbg
636
+ $Show objcopy --strip-debug ${executable}
637
+ $Show objcopy --add-gnu-debuglink=${executable}.dbg ${executable}
638
+ fi
639
+ # if [ "$static_mpi" = no ] ; then
640
+ # $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} -lmpi $PROFILE_POSTLIB ${final_libs}
641
+ # else
642
+ # $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} $libdir/libmpi.a $PROFILE_POSTLIB ${final_libs}
643
+ # fi
644
+ # rc=$?
645
+ # if [ $rc -eq 0 -a "x$strip_debug_info" = "xyes" ] ; then
646
+ # $Show objcopy --only-keep-debug ${executable} ${executable}.dbg
647
+ # $Show objcopy --strip-debug ${executable}
648
+ # $Show objcopy --add-gnu-debuglink=${executable}.dbg ${executable}
649
+ # fi
650
+ fi
651
+ else
652
+ cmd_line="$CC $CPPFLAGS $CFLAGS $allargs -I\"${includedir}\""
653
+ if [ "$Show" = echo ] ; then
654
+ echo $cmd_line
655
+ else
656
+ eval `echo $cmd_line`
657
+ fi
658
+ rc=$?
659
+ fi
660
+
661
+ exit $rc