I have extended a scientific model code written in fortran 90 with a submodel written in c++.
The model couppling works fine using portland 6.0 and 6.1 compilers.
The model written in fortran code is parallelized with openmp directives and is working fine on my dual opteron x2 workstation without the c++ code.
Some general questions on how to tackle the openmp parallelization of the coupled model:
I have no openmp directives in the c++ model. When compiling the coupled model, do I have to set the compiler flags
to the fortran and the c++ compiler flags???
I did so and after quite some time solving the problem with the libnuma openmp https://forums.developer.nvidia.com/t/compiling-for-omp-on-amd64/130266/1
I get an executable. The main differentes in the coupled model are the local libraries which are extended to suit the c++ programms
Using our standard setup
I run the resulting code and get the message:
Warning: OMP_NUM_THREADS or NCPUS (4) greater than available cpus (1)
The programm stalls at this point and eats one processors performance without getting anyfurther…
If I set
the code runs fine.
My question is in generally, is it posible to parallelize a mixed fortran c++ code???