http://forums.netbeans.org/ptopic48696.html
1. Lanch IDE with the following parameters:
-J-Dnativeexecution.support.logger.level=100
-J-Dcnd.remote.logger.level=100
2. Set -j3 in Make options (Tools -> Options -> C/C++ -> Project
Options -> Make Options)
3. Create Quote sample (New Project -> Samples -> Quote) and Clean and
Build it.
4. Go to IDE Log (View -> IDE Log) and check make's parameters ->
the -j3 will be where.
5. Setup some remote host and change build for Quote to that
host (Project Properties -> Build -> Build Host).
6. Clean and Build Quote once more and check the IDE Log -> the -j3
will be where again.
[netbeans 7.2]
https://netbeans.org/projects/cnd/lists/users/archive/2009-03/message/179
This is for running openmp for c++
- mpic++ for some reason or other produces the wrong (???) command line;
- it typically looks like this:
- c++ -m32 -O2 -Wl,-z,noexecstack -I/usr/include/mpich2-i386 -L/usr/lib/mpich2/lib -L/usr/lib/mpich2/lib -lmpichcxx -lmpich -lopa -lpthread -lrt
- but it should look like this (highlighting changes from above only):
- c++ -fopenmp -m32 -O2 -Wl,-z,noexecstack -I/usr/include/mpich2-i386 -L/usr/lib/mpich2/lib -L/usr/lib/mpich2/lib -lmpichcxx -lmpich -lgomp -lpthread -lrt
- it typically looks like this:
- Therefore, in the properties of your NetBeans project, under C++ Compiler::Additional Options you set the command line to
- -fopenmp -m32 -O2 -Wl,-z,noexecstack -I/usr/include/mpich2-i386 -L/usr/lib/mpich2/lib -L/usr/lib/mpich2/lib -lmpichcxx -lmpich -lgomp -lpthread -lrt
- Alternatively you can of course use that as-is on the command line
- ..and compile…and it runs, and according to my perf monitor it uses more than one thread. Perfect.
HOW TO ADD COMMANDS TO COMPILER
rightclick and goto project properties->select the compiler(here c) -> add the commands to Additional options.
I'm thinking if I add mpicc as another tool collection in the host it would work..
Following is the current settings in the properties of the new toolchain I added. We can compile with mpicc now.
I set the absolute srun (or mpirun) path in the same way and Ooola its running!!
Thanks a lot!
ReplyDelete