C++ - Convert a code with static arrays and convert it with dynamic arrays

Job ID: 32005240

Budget: €750 – €1,500 EUR

On Debian 10 GNU/Linux, I have a working code in C++ which works fine with MAGMA/CUDA library unless I choose big static arrays.

The goal of my project is to convert as much as possible this static version in dynamic version routine.

There are already a MAGMA/CUDA inversion of matrix implemented which works fine, no need to modify it.

I give in attachment the current working project : just do :

$ python3 XCPP_launcher_magma.py

and if you don't change anything to the downloaded Archive, everything should be compiled and running if you have compiled MAGMA with LAPACK from Intel OneAPI.

The core of the program is contained into main_intel.cpp and XSAF_C_intel.cpp

I have put the versions to modify for MAGMA/CUDA into : main_magma.cpp and XSAF_C_magma.cpp

As you can see in XSAF_C_magma.cpp, there are a lot of static arrays declared : the critical static array to make dynamics are named :

// double** pointer on double
CO_CL;
CO_CL_AB;
CO_I;
CO_CL_D;
CO_CL_ref;

and

CO_CL_WL
CO_CL_WL_AB
CO_WL
CO_CL_WL_D
CO_CL_WL_ref

There are also "temporary arrays" that are declared statically inside the main loop like

CO_CL_temp and CO_CL_temp_D that be rendered as dynamic instead to be static.

The goal at the end is to be able to make run the code with the 2 following parameters values located in params.txt :

Cutting_l_V 60

and

Vlnum 60

If you have enough RAM, the ideal would be to make run the code with :

Cutting_l_V 1

and

Vlnum 4990

But in this case, you have to set " compute_Cl = 'N' " in the launcher script XCPP_launcher_magma.py. This will take a while to generate the 4990 matrix but if the code finishes its task with these 2 input values, that would be great !

Hoping I have been clear, don't hesitate to ask me for questions.

The Archive of code is located on :

http://31.207.36.11/Archive_Project_CUDA_MAGMA.tar.gz

Best regards
Related categories: Linux GPGPU CUDA C++ Programming