Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16556 Discussions

Quartus II bug and fix for dynamic frequency scaling multicore CPUs

Altera_Forum
Honored Contributor II
2,985 Views

At least in the UNIX versions of Quartus II 10.1, whenever you start any tool it sources quartus/adm/qenv.sh to setup a sane environment for the tool. In that script, there is a check for the CPU frequency (it is unclear what Quartus does with that information, but nevermind). 

 

On multicore systems it will extract all frequencies of all cores. The script then attempts to reduce the multiple returnvalues to a single value using "uniq", which works on multicore systems without per-core-independent frequency scaling. It fails rather annoyingly and (seemingly at first) randomly on multicore systems that use dynamic frequency scaling of the CPU-cores. 

 

To solve the problem, apply the attached patch.
0 Kudos
14 Replies
Altera_Forum
Honored Contributor II
831 Views

interesting. does Quartus fail to launch? are error messages printed to the console? have you reported this to Altera in an SR?

0 Kudos
Altera_Forum
Honored Contributor II
831 Views

 

--- Quote Start ---  

interesting. does Quartus fail to launch? are error messages printed to the console? have you reported this to Altera in an SR? 

--- Quote End ---  

 

Quartus fails to launch (as does every other tool, quartus starts other tools sometimes). 

 

There are errors to the console. To give an example, say you have a quad-core cpu, where one core runs on 3GHz, and three cores run on 800MHz. Then starting *any* tool (including quartus itself) results in something this: 

 

/opt/altera/10.1p/quartus/bin/qcmd 

export: 137: 3000.00: bad variable name 

 

The error message will differ when the cores are running on different frequencies (obviously). 

 

As to reporting this to Altera, no, I did not. Since I'm a free/webversion user, I don't have a support contract, and don't really know where to report problems like this. Any suggestions? 

OTOH, I would find it prudent if Altera had at least one guy/gall watching these forums and picking things like this up (and then implicitly turn them into an internal trouble ticket). They don't seem to be doing that, or are they?
0 Kudos
Altera_Forum
Honored Contributor II
831 Views

ah, i've seen that export error on other threads, i thought it might have been caused by Ubuntu dash because i've never seen it on Fedora. i guess my Intel Core2 must not do frequency scaling? 

 

nice detective work
0 Kudos
Altera_Forum
Honored Contributor II
831 Views

 

--- Quote Start ---  

i guess my Intel Core2 must not do frequency scaling? 

--- Quote End ---  

 

It depends on your kernel configuration, and if the scaling is identical on every core, you won't notice the problem. In my case, it's on a quad core AMD under Ubuntu, which scales every core independently.
0 Kudos
Altera_Forum
Honored Contributor II
831 Views

How can i apply this patch ? I use Ubuntu 10.10 and quartus 10.1 Can you write short instructions of installation you patch for newbies ?

0 Kudos
Altera_Forum
Honored Contributor II
831 Views

patch <thefilewiththepatchinit.txt

0 Kudos
Altera_Forum
Honored Contributor II
831 Views

 

--- Quote Start ---  

patch <thefilewiththepatchinit.txt 

--- Quote End ---  

 

 

--- /opt/altera/10.1/quartus/adm/qenv.sh 2010-11-30 07:25:42.000000000 +0100 

+++ /opt/altera/10.1p/quartus/adm/qenv.sh 

 

Should I change the paths /opt/altera/10.1/quartus/adm/qenv.sh and /opt/altera/10.1p/quartus/adm/qenv.sh to /media/data/altera/10.1/quartus/adm/qenv.sh if i install quartus in this directory?  

 

I have no "altera" folder in /opt/ directory. And yet, I have 32 bit processor in my notebook. Can I use this patch for 32 bit systems?
0 Kudos
Altera_Forum
Honored Contributor II
831 Views

this worked liked a charm. Thank you very much.

0 Kudos
Altera_Forum
Honored Contributor II
831 Views

 

--- Quote Start ---  

 

As to reporting this to Altera, no, I did not. Since I'm a free/webversion user, I don't have a support contract, and don't really know where to report problems like this. Any suggestions? 

OTOH, I would find it prudent if Altera had at least one guy/gall watching these forums and picking things like this up (and then implicitly turn them into an internal trouble ticket). They don't seem to be doing that, or are they? 

--- Quote End ---  

 

 

Well, I am, at least today :) It's not technically part of our job but I do try to hang out from time to time specifically for the reason you mention.  

 

To answer your first question though - AFAIK anyone can report problem at https://mysupport.altera.com, though I confess to never having tried it myself. 

 

As for the specific problem you've found, thanks for reporting it and suggesting a fix. I've asked around and have verified that will be fixed in the next major release of Quartus II. 

 

Cheers, 

Adrian
0 Kudos
Altera_Forum
Honored Contributor II
831 Views

 

--- Quote Start ---  

patch <thefilewiththepatchinit.txt 

--- Quote End ---  

 

 

How do I install this? I have a core i7 quad core notebook, and quartus isn't using parallel processing for my compilations. I've tried to adjust it but I can't fix it.  

 

patch what, where, how. what commands must I run. This is my first time using this software, and i'm new to *nix world.  

Thank you.
0 Kudos
Altera_Forum
Honored Contributor II
831 Views

patch <'/home/evired/Downloads/patch.txt'  

patching file qenv.sh 

Hunk# 1 FAILED at 134. 

1 out of 1 hunk FAILED -- saving rejects to file qenv.sh.rej
0 Kudos
Altera_Forum
Honored Contributor II
831 Views

anyone want to elaborate?

0 Kudos
Altera_Forum
Honored Contributor II
831 Views

Hi BuGless, 

Sincerely thank you for this answer! It helps me solved the "export: 137: " problem, which have been around for months preventing the smooth execution of my batch compilation. 

My computer has an Intel dual core. The original "cat /proc/cpuinfo | grep "cpu MHz" | cut -c 12-18 | uniq" command sometimes return an answer with 2 lines, and this is the root cause of this problem. When I followed your patch to change it to "cat /proc/cpuinfo | grep "cpu MHz" | cut -c 12-18 | head -1", it always return a 1 line answer. 

 

I checked all the Quartus versions installed on my machine and I found that all the versions from 8.0sp1 to 10.1sp1 has this problem. A good thing to notice is that in version 11.0, this problematic line is removed. 

Obviously, some one from Altera has noticed this thread and took action. Hopefully it will not reemerge in the future versions. 

 

Thank you again!
0 Kudos
Altera_Forum
Honored Contributor II
831 Views

Glad to see it helps; that's the reason I traced and posted it. I'm also glad that you can confirm that they fixed it from 11.0 onward (just like aludwin said, earlier in this thread); I didn't have time to check/verify that myself yet.

0 Kudos
Reply