ホーム » 2010 » 3月 » 31

日別アーカイブ: 2010/03/31

2010年3月
 123456
78910111213
14151617181920
21222324252627
28293031  

カテゴリー

アーカイブ

ブログ統計情報

  • 77,348 アクセス



OpenMP エラー 1002

—————————
致命的なユーザー エラー 1002:
—————————
同一名の 1 つで ‘#pragma omp critical’ が不適切に入れ子にされています
致命的なユーザー エラー 1002: 同一名の 1 つで ‘#pragma omp critical’ が不適切に入れ子にされています
2.9 ディレクティブの入れ子
局所的になる様に,呼び出し元での “#pragma omp critical” を削除.

class Profile {
  ...
protected:
  LPCTSTR  LastProfileName ;
  CString  C_T_ProfileName ;
  ...
  } ;

BOOL Profile::SaveProfileName(void)
{
  CWinApp* app = AfxGetApp() ;
  if (app== NULL) { return FALSE ; }
  LastProfileName = AfxGetApp()->m_pszProfileName ;
  AfxGetApp()->m_pszProfileName = C_T_ProfileName ;
  return TRUE ;
  }
BOOL Profile::LoadProfileName(void)
{
  AfxGetApp()->m_pszProfileName = LastProfileName ;
  return TRUE ;
  }

omp critical ではなく,MFC 同期クラスを使用する様に変更.

//  以下は,テスト用のコード
BOOL Profile::?et??? (LPCTSTR lpszSection,LPCTSTR lpszEntry,...)
{
  ...
  CMutex m(FALSE,MN_LPN) ;
  m.Lock() ;
// return    ???Profile??? (lpszSection, lpszEntry, ...) ;
  BOOL ret = ???Profile??? (lpszSection, lpszEntry, ...) ;
  m.Unlock() ;
  return ret ;
  }
//  MFC 同期クラスの呼出しはコストがかからない様に修正する
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.