FAQ

How do I execute Fortan program on MPC?

  1. Be sure that you don’t have disabled the fortran support (-disable-fortran of the MPC configure).

  2. Rename your main fortran function to subroutine mpc_user_main. For example, change

    program main_program
    

    to

    subroutine mpc_user_main
    

     

    Now you can execute your fortran program using the mpcrun command.

How do I disable the MPC SHared Memory module (SHM)?

The SHM module is enabled by default. To disable it, pass the argument -disable-shm to the MPC configure. Don’t forget to recompile MPC.

MPC configure gives me a “FATAL ERROR” message. What can I do?

####################### FATAL ERROR #######################
MPC *WILL* overwrite the following include file(s):
include/mpi.h
include/pthread.h
include/semaphore.h
include/omp.h

Please set your --prefix correctly and run configure again.
If you know what you are doing, you can use the configure
flag --disable-prefix-check. Keep in mind that your headers
will be *DEFINITIVELY* overwritten.
Configure exiting with no Makefile generated....
###########################################################

You must be careful with this error message. MPC detected that the prefix path you have given already includes header files, e.g mpi.h, pthread.h, semaphore.h, and omp.h. If you continue the MPC installation using this prefix path, these files will be DEFINITIVELY overwritten. As a conclusion, either you change the prefix path (recommended choice), or you pass the argument -disable-prefix-check to MPC configure being aware that your headers WILL be overwritten.

Why is my MPI program crashing when I use the MPC compilers?

In MPC, every MPI task is a thread and thus all tasks share global variables with each other. This sharing can cause undefined behavior, so we propose several solutions to ease the removal of global variables:

  1. Use the compiler option -fmpc-privatize to automatically privatize the global variables. In this mode, every global variable is duplicated for every MPI task such as the code can run correctly with MPC. Note than in versions older than 2.4.0, the application has to be compiled as a dynamic library for this solution to work.

  2. Use the option -Wmpc with the patched GCC compiler to generate warnings. In this mode, the compiler will warn you about every global variable declared in the program.

Can I tune the MPC SHared Memory module (SHM) according to my needs?

You need to edit the file located at mpc/MPC_Message_Passing/sctk_low_level_comm/sctk_shm_consts.h.

In this file, you can modify the number of cells in each queue (PTP queues, collective queues, etc.) as well as the size allocated by each cell. Don’t forget to recompile MPC after each modification.

How do I fix this error: “undefined reference to mpc_user_main__”?

The file containing your main should include mpi.h or mpc.h.

How do I fix this error: “forrtl: severe (40): recursive I/O operation, unit -1, file unknown”

This error may be seen while performing I/O from a Fortran program compiled with mpc_ifort using the Intel v14+ compilers for privatization of global variables using MPC. Please add the -thread flag to the command line while compiling the Fortran program to prevent multiple threads from mixing the data in the same file.

How do I use the new configuration procedure?

See the Getting Started Guide.