I'm trying to run a Visual Studio cpp project created by a friend of mine. I'm trying to run the file without VS. But I'm getting a list of errors, all in the same format:
inlining failed in call to always_inline '__m256d _mm256_broadcast_sd(const double*)': target specific option mismatch|
It runs correctly in VS with release mode and breaks when run in debug mode.
The include
s are as follows:
#include "stdafx.h"
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <vector>
# include <omp.h>
#include <chrono>
#include <fstream>
#include <algorithm>
#include <immintrin.h>
using namespace std::chrono;
using namespace std;
and the error is called from here:
double zero = 0;
__m256d acc = _mm256_broadcast_sd(&zero);
Update:
I'm using the this command to run it: g++ -std=c++0x multip.cpp -o multip
, is there an additional parameter to add -mavx to the compiler invocation?
"Target specific option mismatch" means that you're missing a feature flag from your GCC invocation. You probably need to add -mavx
to your compiler invocation.
If you're intending to run this on your computer only, -march=native
will turn on all the feature flags that your own machine supports.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With