IBM Support

Where can I setup module file for openmpi complied with PGI's FORTRAN Compiler and GCC?

Troubleshooting


Problem

Where can I setup module file for openmpi complied with PGI's FORTRAN Compiler and GCC?

Resolving The Problem

I just recompiled Open-MPI with PGI's FORTRAN Compiler and GCC. Does Platform provide module file example? If so, how can I set it up?
In some circumstances, administrators may want to recompile Open-MPI because they need a newer version or they'd like to exploit commerical compiler other than GNU compiler suite.

In this KB, we deliver an example module file for Open-MPI compiled by PGI's FORTRAN Compiler and GCC. Note that the install path is hard-coded in this module file and you need to change it according to your environment.

Here is the procedure for this particular module file setup. The module file itself is attached.

1- copy the attached module file to /share/apps/modulefiles.custom/ompi114.pgf.
Please note that we used the module command prereq in this module file. This is just because as mpif77 and mpif90 use the portland, they have to be in the current PATH. If not, you will not be able to compile any f77 or f90 mpi code.

2- do a symlink to the correct place :
ln -s /share/apps/modulefiles.custom/ompi114.pgf /opt/modules/modulefiles/hpc/ompi114.pgf

3- test :
3.1- check the prereq statement :

[someone@Seadog openmpi-1.1.4]$ module list
Currently Loaded Modulefiles:

1) hpc/portland

[someone@Seadog openmpi-1.1.4]$ module unload hpc/portland
[someone@Seadog openmpi-1.1.4]$ module load hpc/ompi114.pgf
hpc/ompi114.pgf(30):ERROR:151: Module 'hpc/ompi114.pgf' depends on one of the module(s) 'hpc/portland '
hpc/ompi114.pgf(30):ERROR:102: Tcl command execution failed: prereq hpc/portland

3.2- check the module itself :

[someone@Seadog openmpi-1.1.4]$ module load hpc/portland
portland compilers module
****************************************************
This module sets up the following environment
variables for the portland compilers
PGI
PATH
LM_LICENSE_FILE
MANPATH
Version 3.1.6
****************************************************
[someone@Seadog openmpi-1.1.4]$ module load hpc/ompi114.pgf
ompi114-pgf module
****************************************************
This module sets up the following environment
variables for openmpi 1.1.4 (gnu / portland pgf77/90):
PATH
LD_LIBRARY_PATH
MPIHOME
MANPATH
Version 3.1.6
****************************************************

And then check what are the backend compilers and the environment :

[someone@Seadog openmpi-1.1.4]$ which mpicc
/share/apps/openmpi-1.1.4.pgf/bin/mpicc
[someone@Seadog openmpi-1.1.4]$ which mpif90
/share/apps/openmpi-1.1.4.pgf/bin/mpif90
[someone@Seadog openmpi-1.1.4]$ which mpif77
/share/apps/openmpi-1.1.4.pgf/bin/mpif77
[someone@Seadog openmpi-1.1.4]$ which mpicxx
/share/apps/openmpi-1.1.4.pgf/bin/mpicxx
[someone@Seadog openmpi-1.1.4]$ echo $MPIHOME
/share/apps/openmpi-1.1.4.pgf
[someone@Seadog openmpi-1.1.4]$ mpicc -V
gcc: `-V' option must have argument
[someone@Seadog openmpi-1.1.4]$ mpicc -v
Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=x86_64-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)
[someone@Seadog openmpi-1.1.4]$ mpicxx -v
Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=x86_64-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)
[someone@Seadog openmpi-1.1.4]$ mpif77 -V
pgf77 6.2-5 64-bit target on x86-64 Linux
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2006, STMicroelectronics, Inc. All Rights Reserved.
[someone@Seadog openmpi-1.1.4]$ mpif90 -V
pgf90 6.2-5 64-bit target on x86-64 Linux
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2006, STMicroelectronics, Inc. All Rights Reserved.
[{"Product":{"code":"SSZUCA","label":"IBM Spectrum Cluster Foundation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"4.1.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Product":{"code":"SSZUCA","label":"IBM Spectrum Cluster Foundation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":null,"Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

More support for:
IBM Spectrum Cluster Foundation

Software version:
4.1.1

Document number:
702415

Modified date:
16 September 2018

UID

isg3T1014415