Commit 5669d21d authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Ensure that OMP calls are protected under OMP compilation flags

parent f761ef2b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -240,6 +240,7 @@ void cluster(const string& config_file, const string& data_file, const string& o
      message = "INFO: iteration data requires " + (string)virtual_line + "GB of RAM.\n";
      logger->log(message);
      int omp_wavelength_threads = 1;
#ifdef _OPENMP
#pragma omp parallel
      {
	int threadId = omp_get_thread_num();
@@ -247,6 +248,7 @@ void cluster(const string& config_file, const string& data_file, const string& o
	  omp_wavelength_threads = omp_get_num_threads();
	}
      }
#endif //_OPENMP
      if (gconf->host_ram_gb > 0.0) {
	if (omp_wavelength_threads * cid_size_gb > gconf->host_ram_gb) {
	  // ERROR: host system does not have the necessary RAM