Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleExample Process:
Code Block
[@blog1 src]$ cp test_real.c test_real.c.original

# Make the following updates:
# The elpa_init("version") needs to match: elpa_version.h: #define ELPA_API_VERSION 20211125
[@blog1 src]$ diff test_real.c test_real.c.original
56,57d55
< #define C_INT_MPI_TYPE int
<
83,85c81
<    //MPI_Init(&argc, &argv);
<    C_INT_MPI_TYPE provided_mpi_thread_level;
<    MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &provided_mpi_thread_level);
---
>    MPI_Init(&argc, &argv);
114c110
<    if (elpa_init(20211125) != ELPA_OK) {
---
>    if (elpa_init(20170403) != ELPA_OK) {
172,173c168,169
<    elpa_deallocate(handle, 0);
<    elpa_uninit(0);
---
>    elpa_deallocate(handle);
>    elpa_uninit();

[@blog1 test]$ ./autogen.sh
[@blog1 test]$ export CC=mpicc
[@blog1 test]$ export FC=mpifort
[@blog1 test]$ ./configure --with-openmp
[@blog1 test]$ make

[@blog1 test]$ salloc -A arcc<your_project> -t 10:00 -N 2 -c 4
[@m001 test]$ export ELPA_DEFAULT_omp_threads=4
[@m001 test]$ export OMP_NUM_THREADS=4
[@m001 test]$ srun test_real
ELPA: Default for option 'omp_threads' is set to '4' due to environment variable ELPA_DEFAULT_omp_threads
ELPA: Default for option 'omp_threads' is set to '4' due to environment variable ELPA_DEFAULT_omp_threads
init done
setup done
solve..
solve done

...