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,662 @@
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
+ # CXX - C compiler
81
+ # WRAPPER_CXXFLAGS - 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
+ prefix=I_MPI_SUBSTITUTE_INSTALLDIR
97
+ # The environment variable I_MPI_ROOT may be used to override installation folder path
98
+ if [ -n "${I_MPI_ROOT}" ] ; then
99
+ prefix="${I_MPI_ROOT}";
100
+ fi
101
+
102
+ exec_prefix=__EXEC_PREFIX_TO_BE_FILLED_AT_INSTALL_TIME__
103
+ sysconfdir=${prefix}/etc
104
+ includedir=${prefix}/include
105
+ libdir=${prefix}/lib
106
+
107
+ if [ ! -f "${prefix}/lib/mpi/debug/libmpi.so" ]; then
108
+ release_lib_dir="/release"
109
+ debug_lib_dir="/debug"
110
+ else
111
+ sysconfdir=${prefix}/opt/mpi/etc
112
+ release_lib_dir=""
113
+ debug_lib_dir="/mpi/debug"
114
+ fi
115
+ MPILIBDIR=${release_lib_dir}
116
+ # The environment variable I_MPI_COMPILER_CONFIG_DIR may be used to override
117
+ # folder where *.conf files are placed
118
+ if [ -n "$I_MPI_COMPILER_CONFIG_DIR" ] ; then
119
+ sysconfdir=$I_MPI_COMPILER_CONFIG_DIR;
120
+ fi
121
+
122
+ # Default settings for compiler, flags, and libraries
123
+ CXX="g++"
124
+ MPICH_VERSION="3.4a2"
125
+ CXXFLAGS=""
126
+ MPIVERSION="2021.14"
127
+ MPILIBNAME="mpi"
128
+ MPICXXLIBNAME="mpicxx"
129
+
130
+
131
+ # How to pass a linker flag through the compiler.
132
+ wl="-Wl,"
133
+
134
+ # Static library suffix (normally "a").
135
+ libext="a"
136
+
137
+ # Shared library suffix (normally "so").
138
+ shlibext="so"
139
+
140
+ # Format of library name prefix.
141
+ libname_spec="lib\$name"
142
+
143
+ # Library names that the linker finds when passed -lNAME.
144
+ library_names_spec="\$libname\$shrext"
145
+
146
+ # Flag to hardcode $libdir into a binary during linking.
147
+ # This must work even if $libdir does not exist.
148
+ hardcode_libdir_flag_spec="\${wl}-rpath \${wl}\$libdir"
149
+
150
+ # Flag to add dtags to allow using runpath instead of rpath
151
+ enable_dtags_flag="-Wl,--enable-new-dtags"
152
+ disable_dtags_flag="-Wl,--disable-new-dtags"
153
+
154
+ # Whether we need a single -rpath flag with a separated argument.
155
+ hardcode_libdir_separator=""
156
+
157
+ # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
158
+ # resulting binary.
159
+ hardcode_direct="no"
160
+
161
+ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
162
+ # resulting binary.
163
+ hardcode_minus_L="no"
164
+
165
+
166
+ strip_debug_info=
167
+ handle_executable=
168
+ fortran_binding=
169
+ executable=a.out
170
+ static_log=yes
171
+ ilp64=no
172
+ trace_opt=no
173
+ no_rpath=no
174
+ # Attempt to construct dynamic loading info, based on the user
175
+ # preference of rpath, runpath or none and on the detected libdir
176
+ # flags.
177
+ with_wrapper_dl_type=no
178
+ if test "X${with_wrapper_dl_type}" = "Xrunpath" ; then
179
+ eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${enable_dtags_flag}\"
180
+ elif test "X${with_wrapper_dl_type}" = "Xrpath" ; then
181
+ eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${disable_dtags_flag}\"
182
+ else
183
+ wrapper_dl_type_flags=""
184
+ fi
185
+
186
+ # Internal variables
187
+ # Show is set to echo to cause the compilation command to be echoed instead
188
+ # of executed.
189
+ Show=eval
190
+ #
191
+ # End of initialization of variables
192
+ #---------------------------------------------------------------------
193
+ # Environment Variables.
194
+ # The environment variables I_MPI_CXX, MPICH_CXX may be used to override the
195
+ # default choices. I_MPI_CXX has higher priority than MPICH_CXX.
196
+ # In addition, if there is a file $sysconfdir/mpicxx-$CXXname.conf,
197
+ # where CXXname is the name of the compiler with all spaces replaced by hyphens
198
+ # (e.g., "CC -64" becomes "CC--64", that file is sources, allowing other
199
+ # changes to the compilation environment. See the variables used by the
200
+ # script (defined above)
201
+ # Added MPICH_CXX_OLD, MPICH_CXX can be used to prefix CXX
202
+ # with external utility, e.g. setenv MPICH_CXX 'eval linkcache $MPICH_CXX_OLD'
203
+ if [ -n "$I_MPI_CXXFLAGS" ] ; then
204
+ CXXFLAGS=" "$I_MPI_CXXFLAGS
205
+ fi
206
+ if [ -n "$I_MPI_LDFLAGS" ] ; then
207
+ LDFLAGS=" -ldl "$I_MPI_LDFLAGS
208
+ fi
209
+ if [ -n "$I_MPI_CXX" ] ; then
210
+ CXX="$I_MPI_CXX"
211
+
212
+ CXXname=`echo $CXX | sed 's/ /-/g'`
213
+ if [ -s $sysconfdir/mpicxx-$(basename $CXXname).conf ] ; then
214
+ . $sysconfdir/mpicxx-$(basename $CXXname).conf
215
+ fi
216
+ else
217
+ if [ -n "$MPICH_CXX" ] ; then
218
+ CXX="$MPICH_CXX"
219
+ CXXname=`echo $CXX | sed 's/ /-/g'`
220
+ if [ -s $sysconfdir/mpicxx-$(basename $CXXname).conf ] ; then
221
+ . $sysconfdir/mpicxx-$(basename $CXXname).conf
222
+ fi
223
+ fi
224
+ fi
225
+ if [ -n "$I_MPI_DEBUG_INFO_STRIP" ] ; then
226
+ for comp_val in "0" "off" "no" "disable"
227
+ do
228
+ if [ "$I_MPI_DEBUG_INFO_STRIP" = "$comp_val" ] ; then
229
+ strip_debug_info=no
230
+ break
231
+ fi
232
+ done
233
+ fi
234
+ if [ -n "$I_MPI_FORT_BIND" ] ; then
235
+ for comp_val in "0" "off" "no" "disable"
236
+ do
237
+ if [ "$I_MPI_FORT_BIND" = "$comp_val" ] ; then
238
+ fortran_binding=no
239
+ break
240
+ fi
241
+ done
242
+ fi
243
+ # Allow a profiling option to be selected through an environment variable
244
+ if [ -n "$MPICXX_PROFILE" ] ; then
245
+ profConf=$MPICXX_PROFILE
246
+ fi
247
+ if [ -n "$I_MPI_CXX_PROFILE" ] ; then
248
+ profConf=$I_MPI_CXX_PROFILE
249
+ fi
250
+
251
+ # Override default mpi library
252
+ if [ -n "$I_MPI_LINK" ] ; then
253
+ mpilib_override=$I_MPI_LINK
254
+ fi
255
+ #
256
+ # ------------------------------------------------------------------------
257
+ # Argument processing.
258
+ # This is somewhat awkward because of the handling of arguments within
259
+ # the shell. We want to handle arguments that include spaces without
260
+ # loosing the spacing (an alternative would be to use a more powerful
261
+ # scripting language that would allow us to retain the array of values,
262
+ # which the basic (rather than enhanced) Bourne shell does not.
263
+ #
264
+ # Look through the arguments for arguments that indicate compile only.
265
+ # If these are *not* found, add the library options
266
+
267
+ linking=yes
268
+ allargs=""
269
+ argno=0
270
+ interlib_deps=yes
271
+ static_mpi=no
272
+ for arg in "$@" ; do
273
+ # Set addarg to no if this arg should be ignored by the C compiler
274
+ addarg=yes
275
+ qarg=$arg
276
+ if [ "x$handle_executable" = "xyes" ] ; then
277
+ executable=$arg
278
+ handle_executable=
279
+ fi
280
+ case "$arg" in
281
+ # ----------------------------------------------------------------
282
+ # Compiler options that affect whether we are linking or no
283
+ -c|-S|-E|-M|-MM)
284
+ # The compiler links by default
285
+ linking=no
286
+ ;;
287
+ -o )
288
+ handle_executable=yes
289
+ addarg=yes
290
+ ;;
291
+ # ----------------------------------------------------------------
292
+ # Options that control how we use mpicxx (e.g., -show,
293
+ # -cxx=* -config=*
294
+ -static)
295
+ interlib_deps=no
296
+ static_log=yes
297
+ static_mpi=yes
298
+ CXXFLAGS="$CXXFLAGS -Xlinker --export-dynamic"
299
+ addarg=yes
300
+ ;;
301
+ -static-mpi)
302
+ interlib_deps=no
303
+ static_mpi=yes
304
+ CXXFLAGS="$CXXFLAGS -Xlinker --export-dynamic"
305
+ addarg=no
306
+ ;;
307
+ -echo)
308
+ addarg=no
309
+ set -x
310
+ ;;
311
+ -cxx=*)
312
+ CXX=`echo A$arg | sed -e 's/A-cxx=//g'`
313
+ addarg=no
314
+ ;;
315
+ # Backwards compatibility for MPICH1 - scripts
316
+ -CC=*)
317
+ CXX=`echo A$arg | sed -e 's/A-CC=//g'`
318
+ addarg=no
319
+ ;;
320
+ -show)
321
+ addarg=no
322
+ Show=echo
323
+ ;;
324
+ -config=*)
325
+ addarg=no
326
+ CXXname=`echo A$arg | sed -e 's/A-config=//g'`
327
+ if [ -s "$sysconfdir/mpicxx-$CXXname.conf" ] ; then
328
+ . "$sysconfdir/mpicxx-$CXXname.conf"
329
+ else
330
+ echo "Configuration file mpicxx-$CXXname.conf not found"
331
+ fi
332
+ ;;
333
+ -compile-info|-compile_info)
334
+ # -compile_info included for backward compatibility
335
+ Show=echo
336
+ addarg=no
337
+ ;;
338
+ -link-info|-link_info)
339
+ # -link_info included for backward compatibility
340
+ Show=echo
341
+ addarg=no
342
+ ;;
343
+ -v)
344
+ # Pass this argument to the compiler as well.
345
+ echo "$(basename $0) for the Intel(R) MPI Library $MPIVERSION for Linux*"
346
+ echo "Copyright Intel Corporation."
347
+ # if there is only 1 argument, it must be -v.
348
+ if [ "$#" -eq "1" ] ; then
349
+ linking=no
350
+ fi
351
+ ;;
352
+ -profile=*)
353
+ # Pass the name of a profiling configuration. As
354
+ # a special case, lib<name>.so or lib<name>.la may be used
355
+ # if the library is in $libdir
356
+ profConf=`echo A$arg | sed -e 's/A-profile=//g'`
357
+ addarg=no
358
+ # Loading the profConf file is handled below
359
+ ;;
360
+ -help)
361
+ # Print mini-help if started without parameters
362
+ echo "Simple script to compile and/or link MPI programs."
363
+ echo "Usage: `basename $0` [options] <files>"
364
+ echo "----------------------------------------------------------------------------"
365
+ echo "The following options are supported:"
366
+ echo " -cxx=<name> specify a C++ compiler name: i.e. -cxx=g++"
367
+ echo " -echo print the scripts during their execution"
368
+ echo " -show show command lines without real calling"
369
+ echo " -config=<name> specify a configuration file: i.e. -config=g++ for mpicc-g++.conf file"
370
+ echo " -v print version info of $(basename $0) and its native compiler"
371
+ echo " -profile=<name> specify a profile configuration file (an MPI profiling"
372
+ echo " library): i.e. -profile=myprofile for the myprofile.cfg file."
373
+ echo " As a special case, lib<name>.so or lib<name>.a may be used"
374
+ echo " if the library is found"
375
+ echo " -check_mpi link against the Intel(R) Trace Collector (-profile=vtmc)."
376
+ echo " -static_mpi link the Intel(R) MPI Library statically"
377
+ echo " -mt_mpi link the thread safe version of the Intel(R) MPI Library"
378
+ echo " -ilp64 link the ILP64 support of the Intel(R) MPI Library"
379
+ echo " -t or -trace"
380
+ echo " link against the Intel(R) Trace Collector"
381
+ echo " -trace-imbalance"
382
+ echo " link against the Intel(R) Trace Collector imbalance library"
383
+ echo " (-profile=vtim)"
384
+ echo " -static use static linkage method"
385
+ echo " -nostrip turn off the debug information stripping during static linking"
386
+ echo " -nofortran or -nofortbind"
387
+ echo " disable the linkage Fortran bindings"
388
+ echo " -dynamic_log link against the Intel(R) Trace Collector dynamically"
389
+ echo " -O enable optimization"
390
+ echo " -link_mpi=<name>"
391
+ echo " link against the specified version of the Intel(R) MPI Library"
392
+ echo " i.e -link_mpi=opt|opt_mt|dbg|dbg_mt"
393
+ echo " -norpath disable rpath for compiler wrapper of the Intel(R) MPI Library"
394
+ echo "All other options will be passed to the compiler without changing."
395
+ echo "----------------------------------------------------------------------------"
396
+ echo "The following environment variables are used:"
397
+ echo " I_MPI_ROOT the Intel(R) MPI Library installation directory path"
398
+ echo " I_MPI_CXX or MPICH_CXX"
399
+ echo " the path/name of the underlying compiler to be used"
400
+ echo " I_MPI_CXX_PROFILE or MPICXX_PROFILE"
401
+ echo " the name of profile file (without extension)"
402
+ echo " I_MPI_COMPILER_CONFIG_DIR"
403
+ echo " the folder which contains configuration files *.conf"
404
+ echo " I_MPI_TRACE_PROFILE"
405
+ echo " specify a default profile for the -trace option"
406
+ echo " I_MPI_CHECK_PROFILE"
407
+ echo " specify a default profile for the -check_mpi option"
408
+ echo " I_MPI_LINK specify the version of the Intel(R) MPI Library"
409
+ echo " I_MPI_DEBUG_INFO_STRIP"
410
+ echo " turn on/off the debug information stripping during static linking"
411
+ echo " I_MPI_CXXFLAGS"
412
+ echo " special flags needed for compilation"
413
+ echo " I_MPI_LDFLAGS "
414
+ echo " special flags needed for linking"
415
+ echo " I_MPI_FORT_BIND"
416
+ echo " disable the linkage Fortran bindings"
417
+ echo "----------------------------------------------------------------------------"
418
+ exit 0
419
+ ;;
420
+ -nolinkage)
421
+ # This internal option is used by wrapper driver scripts mpicc, mpicxx, mpifc when -v option is used.
422
+ linking=no
423
+ addarg=no
424
+ ;;
425
+ -g)
426
+ MPILIBDIR=${release_lib_dir}
427
+ ;;
428
+ -static_log)
429
+ static_log=yes
430
+ addarg=no
431
+ ;;
432
+ -dynamic_log)
433
+ static_log=no
434
+ addarg=no
435
+ ;;
436
+ -mt_mpi)
437
+ addarg=no
438
+ ;;
439
+ -ilp64)
440
+ ilp64=yes
441
+ addarg=no
442
+ ;;
443
+ -check_mpi)
444
+ if [ -z "$profConf" ]; then
445
+ if [ -z "$I_MPI_CHECK_PROFILE" ]; then
446
+ profConf="vtmc"
447
+ else
448
+ profConf="$I_MPI_CHECK_PROFILE"
449
+ fi
450
+ else
451
+ echo "Warning: the -check_mpi option will be ignored because the profile was set."
452
+ fi
453
+ addarg=no
454
+ ;;
455
+ -trace-imbalance)
456
+ if [ -z "$profConf" ]; then
457
+ profConf="vtim"
458
+ else
459
+ echo "Warning: the -trace-imbalance option will be ignored because the profile was set."
460
+ fi
461
+ addarg=no
462
+ ;;
463
+ -t | -trace | -t=* | -trace=* )
464
+ if [ -z "$profConf" ]; then
465
+ if [ -z "$I_MPI_TRACE_PROFILE" ]; then
466
+ profConf="vt"
467
+ else
468
+ profConf="$I_MPI_TRACE_PROFILE"
469
+ fi
470
+ else
471
+ echo "Warning: the -trace option will be ignored because the profile was set."
472
+ fi
473
+ addarg=no
474
+ ;;
475
+ -nativelinking)
476
+ # Internal option to use native compiler for linking without MPI libraries
477
+ nativelinking=yes
478
+ addarg=no
479
+ ;;
480
+ -link_mpi=* )
481
+ mpilib_override=`echo A$arg | sed -e 's/A-link_mpi=//g'`
482
+ addarg=no
483
+ ;;
484
+ -mmic )
485
+ addarg=no
486
+ ;;
487
+ -nostrip )
488
+ strip_debug_info=no
489
+ addarg=no
490
+ ;;
491
+ -nofortran | -nofortbind )
492
+ fortran_binding=no
493
+ ;;
494
+ -norpath )
495
+ no_rpath=yes
496
+ addarg=no
497
+ ;;
498
+ # Other arguments. We are careful to handle arguments with
499
+ # quotes (we try to quote all arguments in case they include
500
+ # any spaces)
501
+ *\"*)
502
+ qarg="'"$arg"'"
503
+ ;;
504
+ *\'*)
505
+ qarg=`echo \"$arg\"`
506
+ ;;
507
+ *)
508
+ qarg="'$arg'"
509
+ ;;
510
+ esac
511
+ if [ $addarg = yes ] ; then
512
+ allargs="$allargs $qarg"
513
+ fi
514
+ done
515
+
516
+ if [ $# -eq 0 ] ; then
517
+ echo "Error: Command line argument is needed!"
518
+ "$0" -help
519
+ exit 1
520
+ fi
521
+
522
+ if [ -n "$mpilib_override" ] ; then
523
+ case "$mpilib_override" in
524
+ opt )
525
+ MPILIBDIR=${release_lib_dir}
526
+ ;;
527
+ opt_mt )
528
+ MPILIBDIR=${release_lib_dir}
529
+ ;;
530
+ dbg )
531
+ MPILIBDIR=${debug_lib_dir}
532
+ ;;
533
+ dbg_mt )
534
+ MPILIBDIR=${debug_lib_dir}
535
+ ;;
536
+ * )
537
+ echo "Warning: incorrect library version specified. Automatically selected library will be used."
538
+ ;;
539
+ esac
540
+ fi
541
+ # -----------------------------------------------------------------------
542
+ if [ "$static_mpi" = yes ] ; then
543
+ if [ "x$fortran_binding" = "x" ]; then
544
+ mpilibs="${libdir}/libmpifort.a ${libdir}${MPILIBDIR}/lib${MPILIBNAME}.a"
545
+ else
546
+ mpilibs="${libdir}${MPILIBDIR}/lib${MPILIBNAME}.a"
547
+ fi
548
+ I_MPI_OTHERLIBS=" -lrt -lpthread "
549
+ if [ "$ilp64" = yes ]; then
550
+ mpilibs="$libdir/libmpi_ilp64.a $mpilibs"
551
+ fi
552
+ CXX_BIND_LIB="$libdir/libmpicxx.a"
553
+ if [ "x$strip_debug_info" = "x" ] ; then
554
+ strip_debug_info=yes
555
+ fi
556
+ else
557
+ if [ "x$fortran_binding" = "x" ]; then
558
+ mpilibs="-lmpifort -l$MPILIBNAME"
559
+ else
560
+ mpilibs="-l$MPILIBNAME"
561
+ fi
562
+ I_MPI_OTHERLIBS=" -lrt -lpthread "
563
+ if [ "$ilp64" = yes ]; then
564
+ mpilibs="-lmpi_ilp64 $mpilibs"
565
+ fi
566
+ CXX_BIND_LIB="-lmpicxx"
567
+ fi
568
+ # Derived variables. These are assembled from variables set from the
569
+ # default, environment, configuration file (if any) and command-line
570
+ # options (if any)
571
+ cxxlibs=
572
+ if [ "mpicxx" != "mpi" ] ; then
573
+ if [ "${static_mpi}" = yes ] ; then
574
+ cxxlibs="$libdir/libmpicxx.a"
575
+ else
576
+ cxxlibs="-lmpicxx"
577
+ fi
578
+ fi
579
+
580
+ PROFILE_FOO=
581
+ # Handle the case of a profile switch
582
+ if [ -n "$profConf" ] ; then
583
+ profConffile=
584
+ if [ -s "$libdir/lib$profConf.a" -o -s "$libdir/lib$profConf.so" ] ; then
585
+ PROFILE_FOO="-l$profConf"
586
+ mpilibs="-l$profConf $mpilibs"
587
+ elif [ -s "$sysconfdir/$profConf.conf" ] ; then
588
+ profConffile="$sysconfdir/$profConf.conf"
589
+ elif [ -s "$profConf.conf" ] ; then
590
+ profConffile="$profConf.conf"
591
+ else
592
+ echo "Profiling configuration file $profConf.conf not found in $sysconfdir"
593
+ fi
594
+ if [ -n "$profConffile" -a -s "$profConffile" ] ; then
595
+ . $profConffile
596
+ if [ -n "$PROFILE_INCPATHS" ] ; then
597
+ CFLAGS="$PROFILE_INCPATHS $CFLAGS"
598
+ fi
599
+ if [ -n "$PROFILE_PRELIB" ] ; then
600
+ mpilibs="$PROFILE_PRELIB $mpilibs"
601
+ fi
602
+ if [ -n "$PROFILE_POSTLIB" ] ; then
603
+ mpilibs="$mpilibs $PROFILE_POSTLIB"
604
+ fi
605
+ fi
606
+ fi
607
+
608
+ if [ "${static_mpi}" = "yes" ] ; then
609
+ final_cxxflags=" -Xlinker --export-dynamic "
610
+ else
611
+ final_cxxflags=" "
612
+ fi
613
+
614
+ final_cppflags=" "
615
+ final_ldflags=" -Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -Xlinker --enable-new-dtags -ldl "
616
+ final_libs="-lpthread -lrt "
617
+
618
+ # A temporary statement to invoke the compiler
619
+ # Place the -L before any args incase there are any mpi libraries in there.
620
+ # Eventually, we'll want to move this after any non-MPI implementation
621
+ # libraries
622
+ if [ "$no_rpath" = "yes" ]; then
623
+ rpath_opt="-Xlinker --enable-new-dtags"
624
+ else
625
+ rpath_opt="-Xlinker --enable-new-dtags -Xlinker -rpath -Xlinker \"${libdir}${MPILIBDIR}\" -Xlinker -rpath -Xlinker \"${libdir}\""
626
+ fi
627
+ if [ "$linking" = yes ] ; then
628
+ if [ "$nativelinking" = yes ] ; then
629
+ $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} $allargs -I\"${includedir}\"
630
+ rc=$?
631
+ else
632
+ $Show $CXX $CXXFLAGS $allargs -I\"${includedir}\" -L\"${libdir}${MPILIBDIR}\" -L\"${libdir}\" $rpath_opt $shllibpath $cxxlibs $mpilibs $I_MPI_OTHERLIBS ${final_ldflags}
633
+ rc=$?
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
+ fi
640
+ # if [ "$static_mpi" = no ] ; then
641
+ # $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} -lmpi $PROFILE_POSTLIB ${final_libs}
642
+ # else
643
+ # $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} $libdir/libmpi.a $PROFILE_POSTLIB ${final_libs}
644
+ # fi
645
+ # rc=$?
646
+ # if [ $rc -eq 0 -a "x$strip_debug_info" = "xyes" ] ; then
647
+ # $Show objcopy --only-keep-debug ${executable} ${executable}.dbg
648
+ # $Show objcopy --strip-debug ${executable}
649
+ # $Show objcopy --add-gnu-debuglink=${executable}.dbg ${executable}
650
+ # fi
651
+ # fi
652
+ else
653
+ cmd_line="$CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} $allargs -I\"${includedir}\""
654
+ if [ "$Show" = echo ] ; then
655
+ echo $cmd_line
656
+ else
657
+ eval `echo $cmd_line`
658
+ rc=$?
659
+ fi
660
+ fi
661
+
662
+ exit $rc
@@ -0,0 +1,42 @@
1
+ #!/bin/bash
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
+
16
+ COMPILER="icc"
17
+ TARGET_WRAPPER="mpiicx"
18
+ user_set_compiler=0
19
+
20
+ if [ -z "$1" ] ; then
21
+ ${TARGET_WRAPPER} -help
22
+ exit 0
23
+ fi
24
+
25
+ for arg in "$@" ; do
26
+ case $arg in
27
+ -cc=*)
28
+ COMPILER=$(echo $arg | sed -e 's/-cc=//g')
29
+ user_set_compiler=1
30
+ ;;
31
+ esac
32
+ done
33
+
34
+ if [ -n "$I_MPI_CC" ] || [ -n "$MPICH_CC" ]; then
35
+ user_set_compiler=1
36
+ fi
37
+
38
+ if [ $user_set_compiler -eq 1 ] ; then
39
+ ${TARGET_WRAPPER} "$@"
40
+ else
41
+ ${TARGET_WRAPPER} -cc="${COMPILER}" "$@"
42
+ fi