Commit c57fee92 authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Merge branch 'prepare_v_0_10_9' into 'master'

Prepare v0.10.9

See merge request giacomo.mulas/np_tmcode!115
parents a6005a6d 52c6de29
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -345,6 +345,11 @@ testing_stage:
      - echo "Comparing output of CLUSTER with 48 spheres"
      - export FFILE=../../test_data/cluster/OCLU_48
      - python3 ../../src/scripts/pycompare.py --no-progress --ffile $FFILE --cfile c_OCLU --html=pycompare_48.html
      - echo "Testing cluster on CASE 3"
      - OMP_NUM_THREADS=2 ./np_cluster ../../test_data/cluster/DEDFB_case3_short ../../test_data/cluster/DCLU_case3_short .
      - echo "Comparing output of CLUSTER on CASE 3"
      - export FFILE=../../test_data/cluster/OCLU_case3_short
      - python3 ../../src/scripts/pycompare.py --no-progress --ffile $FFILE --cfile c_OCLU --html=pycompare_case3.html
      - cd ../testing
      - echo "Checking consistency of HDF5 cluster output"
      - chmod u+x test_cluster_outputs
+5 −5
Original line number Diff line number Diff line
@@ -1763,7 +1763,7 @@ ClusterIterationData::ClusterIterationData(const ClusterIterationData& rhs) {
    }
  }
  am_vector = new dcomplex[ndit * ndit]();
  for (np_int ai = 0; ai < ndit * ndit; ai++) am_vector[ai] = rhs.am_vector[ai];
  // for (np_int ai = 0; ai < ndit * ndit; ai++) am_vector[ai] = rhs.am_vector[ai];
  am = new dcomplex*[ndit];
  for (np_int ai = 0; ai < ndit; ai++) {
    am[ai] = (am_vector + ai * ndit);
@@ -1898,7 +1898,7 @@ ClusterIterationData::ClusterIterationData(const mixMPI *mpidata, const int devi
  am = new dcomplex*[ndit];
  for (np_int ai = 0; ai < ndit; ai++) {
    am[ai] = (am_vector + ai * ndit);
    MPI_Bcast(am[ai], ndit, MPI_C_DOUBLE_COMPLEX, 0, MPI_COMM_WORLD);
    // MPI_Bcast(am[ai], ndit, MPI_C_DOUBLE_COMPLEX, 0, MPI_COMM_WORLD);
  }
  MPI_Bcast(&arg, 1, MPI_C_DOUBLE_COMPLEX, 0, MPI_COMM_WORLD);
  MPI_Bcast(&scan, 1, MPI_DOUBLE, 0, MPI_COMM_WORLD);
@@ -1975,9 +1975,9 @@ void ClusterIterationData::mpibcast(const mixMPI *mpidata) {
    }
  }
  // since MPI expects an int argument for the number of elements to transfer in one go, transfer am one row at a time
  for (int ai = 0; ai < ndit; ai++) {
    MPI_Bcast(am[ai], ndit, MPI_C_DOUBLE_COMPLEX, 0, MPI_COMM_WORLD);
  }
  // for (int ai = 0; ai < ndit; ai++) {
  //   MPI_Bcast(am[ai], ndit, MPI_C_DOUBLE_COMPLEX, 0, MPI_COMM_WORLD);
  // }
  MPI_Bcast(&arg, 1, MPI_C_DOUBLE_COMPLEX, 0, MPI_COMM_WORLD);
  MPI_Bcast(&scan, 1, MPI_DOUBLE, 0, MPI_COMM_WORLD);
  MPI_Bcast(&cfmp, 1, MPI_DOUBLE, 0, MPI_COMM_WORLD);
+15 −5
Original line number Diff line number Diff line
@@ -88,12 +88,22 @@ int main(int argc, char **argv) {
  string config_file = "../../test_data/cluster/DEDFB";
  string data_file = "../../test_data/cluster/DCLU";
  string output_path = ".";
  if (argc != 2) {
    if (argc == 4) {
      config_file = string(argv[1]);
      data_file = string(argv[2]);
      output_path = string(argv[3]);
    }
    cluster(config_file, data_file, output_path, mpidata);
  } else { // argc == 2
    string arg = argv[1];
    if (arg.compare("--version") == 0) {
      printf("np_cluster v%s.\n", NPTM_VERSION);
    } else {
      printf("ERROR: unrecognized argument \"%s\".\n", argv[1]);
      ierr = 1;
    }
  }
#ifdef MPI_VERSION
  MPI_Finalize();
#endif
Loading