-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake Improvements for MPI #393
Comments
Somehow this problem i havent encountered so far on Albedo ... How looks the environment file you used, or which modules did you load? |
Hi Patrick, are you using intelmpi or openmpi? There are different things set by the modules. |
The compile script is about as simple as I can make it:
|
In moment i play with intel compiler my env file with which i compile FESOM2 on albedo looks in moment like ...
|
@mandresm: in the next cleanup I am going to throw out all of these stupid "taken2from` variables, they serve no useful purpose. |
that one can go away, it is set by the module file. I can also set the Libraries variables directly in the module if you want. |
the thing with NETCDF_Fortran_INCLUDE_DIRECTORIES i saw that already, its a left over from my tests. |
Well, the point is: shouldn't the cmake config of fesom be clever enough to figure all of this out without relying on the user (or the module) to set certain variables? If this cmake prefix gets set, everything else should fall into place. But again, I am unfortunately not (yet) a cmake guru... |
FESOM compiles also without setting these environment variables explicitly. I just put them now in to exclude them as a possible source for the I/O problems im hunting for . |
I do not advise do go that route. Finding all the MPI related stuff and use the correct libraries etc. is a bit error prone when doing it from cmake. Instead use the appropriate MPI compiler wrappers for FC, CC and CXX. This is what they are made for. |
Hello,
It seems that the default
CMakeLists.txt
files have difficulties finding the MPI Headers unless these are set via the module file'sCPATH
variable. While I can directly modify the module file on Albedo, this will not be the case in all machines.It might therefore be nice if the
CMakeLists.txt
file (and subsequent Cmake configuration in other folders) was able to cleverly figure out wherempi.h
andmpif.h
are. The cleanest way (I guess) is to useCMAKE_PREFIX_PATH
which is set by the module file, and then includes all the relevantinclude
,lib
and so forth based upon that.Unfortunately, I am not a cmake guru, and am poking around in the dark. Maybe something @hegish can help out with?
Best
Paul
The text was updated successfully, but these errors were encountered: